
get-current-spec
by retsohuang
Custom marketplace for Claude Code plugins that fully customizable.
SKILL.md
name: get-current-spec description: This skill should be used when commands need to determine which spec is active, when the user mentions "spec 001", "work on feature X", or when checking current spec context. Resolves the current working specification through user input, progress.yml, or user selection. allowed-tools: Read, Bash, AskUserQuestion version: 1.0.0
Get Current Spec
Determine the current working specification through a three-tier priority system that checks user input first, then progress.yml, and finally prompts for user selection.
Priority Resolution System
- User input - Parse the message for spec references (highest priority)
- progress.yml - Read from
.claude/spec-kit/memory/progress.yml - User selection - Prompt user to select from available specs
Instructions
Step 1: Parse User Input for Spec References
Check if the user mentioned a specific spec:
node ${CLAUDE_PLUGIN_ROOT}/scripts/dist/cli.js list-features
Look for these patterns in user input:
- Full spec ID: "001-feature-name"
- Spec number: "001", "002", "spec 001"
- Feature name: "user-auth", "work on user-auth"
- Feature reference: "feature 002"
When a match is found:
- Extract the spec ID (format:
NNN-feature-name) - Call set-current-spec skill to update progress.yml
- Proceed to output
Step 2: Read progress.yml
When no spec found in user input, read the stored current spec:
cat .claude/spec-kit/memory/progress.yml
Parse the currentSpec field (format: NNN-feature-name).
When currentSpec exists and its directory exists at .claude/spec-kit/specs/{spec-id}/:
- Use that spec
- Proceed to output
Step 3: Prompt User Selection
When no spec found in input AND no valid currentSpec in progress.yml:
-
List available specs:
node ${CLAUDE_PLUGIN_ROOT}/scripts/dist/cli.js list-features -
Use AskUserQuestion to present options and let user select
-
Call set-current-spec skill with selected spec ID
Output Format
Provide the resolved spec context:
Current Spec: {NNN}-{feature-name}
Feature Number: {NNN}
Feature Name: {feature-name}
Directory: .claude/spec-kit/specs/{NNN}-{feature-name}/
Source: {user input | progress.yml | user selection}
Usage Notes
- Always attempt user input parsing first before checking progress.yml
- Validate that spec directory exists before using
- Update progress.yml when user specifies a different spec
- Called by all spec-kit commands that need context (plan, tasks, implement, clarify)
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です