This skill should be used when the user asks to "list features", "find requirements", "show approved specs", "get children of a feature", "index specs", "query specs by status", or needs to search, filter, or programmatically query SPECLAN entities by type, status, or parent relationship.
From speclannpx claudepluginhub thlandgraf/cc-marketplace --plugin speclanThis skill uses the workspace's default tool permissions.
scripts/query.shGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fast, flexible querying of SPECLAN entities with JSON output. Query by type, filter by status or parent, with optional full metadata extraction.
{PREFIX}-{ID}-{slug} naming pattern as source of truthentity_status not status)| Type | Prefix | Pattern | Location |
|---|---|---|---|
| goal | G- | G-###-*.md | goals/ |
| feature | F- | F-####-*.md | features/ (recursive) |
| requirement | R- | R-####-*.md | features/.../requirements/ |
| change-request | CR- | CR-####-*.md | Anywhere in change-requests/ |
${CLAUDE_PLUGIN_ROOT}/skills/speclan-query/scripts/query.sh
./query.sh [OPTIONS] [speclan-dir]
Options:
-t, --type TYPE - Entity type to query (required)-s, --filter-status STATUS - Filter by status (draft|review|approved|in-development|under-test|released|deprecated)-p, --parent ID - Filter by parent ID (e.g., F-1234)-f, --full - Include title and status in output (reads frontmatter)-h, --help - Show usageArguments:
speclan-dir - Path to speclan directory (default: ./speclan)Output:
./query.sh --type feature speclan
Output:
[
{"id":"F-1049","slug":"pet-management","type":"feature","path":"speclan/features/F-1049-pet-management/F-1049-pet-management.md"},
{"id":"F-2847","slug":"user-auth","type":"feature","path":"speclan/features/F-2847-user-auth/F-2847-user-auth.md"}
]
./query.sh --type feature --full speclan
Output:
[
{"id":"F-1049","slug":"pet-management","type":"feature","path":"...","title":"Pet Management","status":"draft"},
{"id":"F-2847","slug":"user-auth","type":"feature","path":"...","title":"User Authentication","status":"approved"}
]
./query.sh --type feature --filter-status approved speclan
./query.sh --type requirement --parent F-1049 speclan
./query.sh --type change-request --parent R-2046 speclan
./query.sh --type requirement --parent F-1049 --filter-status approved --full speclan
./query.sh --type all speclan
Only parses filenames, no file content read:
Activated when: No --full, --filter-status, or --parent flags
Reads YAML frontmatter when needed:
Activated when: --full, --filter-status, or --parent specified
{
"id": "F-1049",
"slug": "pet-management",
"type": "feature",
"path": "speclan/features/F-1049-pet-management/F-1049-pet-management.md"
}
{
"id": "F-1049",
"slug": "pet-management",
"type": "feature",
"path": "speclan/...",
"title": "Pet Management",
"status": "draft"
}
The --parent flag checks multiple locations:
F-1049-slug/requirements/R-2046-slug/)feature:, requirement:, parentId:- G-123)# Index existing features
FEATURES_JSON=$("${CLAUDE_PLUGIN_ROOT}/skills/speclan-query/scripts/query.sh" --type feature --full speclan)
# Check if feature exists
if echo "$FEATURES_JSON" | grep -q '"id":"F-1049"'; then
echo "Feature exists"
fi
# Get editable features (not locked)
EDITABLE=$("${CLAUDE_PLUGIN_ROOT}/skills/speclan-query/scripts/query.sh" --type feature --filter-status draft speclan)
# Get all feature IDs
./query.sh --type feature speclan | grep -oE '"id":"[^"]+"' | cut -d'"' -f4
# Get all paths
./query.sh --type feature speclan | grep -oE '"path":"[^"]+"' | cut -d'"' -f4
# Count entities
./query.sh --type requirement speclan | grep -c '"id"'
./query.sh --type feature --full speclan | grep -oE '"id":"[^"]+"' | cut -d'"' -f4 | while read -r fid; do
echo "Processing feature: $fid"
req_count=$(./query.sh --type requirement --parent "$fid" speclan | grep -c '"id"' || echo 0)
echo " Requirements: $req_count"
done
For the full status lifecycle and editability rules, consult the
speclan-format skill. Key point: statuses draft, review, approved
are editable; in-development, under-test, released require Change Requests;
deprecated is permanently frozen.
| Scenario | Behavior |
|---|---|
| Missing speclan dir | Error message, exit 1 |
| Invalid entity type | Error message, exit 1 |
| No matches found | Empty JSON array [], exit 0 |
| Malformed filename | Skipped silently |
| Template files | Skipped automatically |
| Archived files | Skipped automatically |
/templates/ and /_archived/ are excluded