How this skill is triggered — by the user, by Claude, or both
Slash command
/spex:implementThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Do NOT re-invoke this skill via the Skill tool.
Do NOT re-invoke this skill via the Skill tool. Do NOT re-read these instructions or any other document in a loop. If you encounter any error or are unsure how to proceed, STOP and tell the user. Execute the workflow below once, then stop.
You are implementing an existing specification. Your $ARGUMENTS contain the spec file path (if provided by the user).
Implement according to the spec. Do not write new specs in this session.
$ARGUMENTS contains --workspace <dir>. If so, use that directory and skip config lookup..claude/skill-configs/spex/config.local.yaml (local scope, gitignored).claude/skill-configs/spex/config.yaml (project scope, committed to repo)"No spex config found. I need a workspace directory to store spec files. You can either:
- Specify a custom path
- Use the default
.agent-workspace/specsI'll create
.claude/skill-configs/spex/config.yamlwith your choice. (Seeconfig.example.yamlin the spex plugin for reference.)" Wait for the user's response, then create the config file before continuing.
${SPECS_DIR} to the resolved workspace_dir. All paths below use this variable.Step 1: Read the spec
If a spec file path was provided in $ARGUMENTS, use that path directly.
Otherwise, find the latest non-future spec automatically:
python3 -c "
import os
import re
import sys
from datetime import datetime
specs_dir = sys.argv[1]
now = datetime.now()
pattern = re.compile(r'^(\d{6})-(\d{6})-(.*)')
valid_specs = []
for entry in os.listdir(specs_dir):
full_path = os.path.join(specs_dir, entry)
if not (os.path.isfile(full_path) or os.path.isdir(full_path)):
continue
match = pattern.match(entry)
if match:
date_part, time_part, _ = match.groups()
year = int('20' + date_part[0:2])
month = int(date_part[2:4])
day = int(date_part[4:6])
hour = int(time_part[0:2])
minute = int(time_part[2:4])
second = int(time_part[4:6])
try:
spec_dt = datetime(year, month, day, hour, minute, second)
if spec_dt <= now:
valid_specs.append((spec_dt, entry))
except ValueError:
continue
if valid_specs:
latest = sorted(valid_specs, key=lambda x: x[0], reverse=True)[0]
print(latest[1])
" "${SPECS_DIR}"
The script outputs the name of the latest spec (file or directory). Construct the full path as ${SPECS_DIR}/{name}.
Reading the spec depends on whether it's a file or directory:
.md file directly.{dir}/README.md for the overview, then read each PN-*.md file for phase details.Understand:
Step 2: Create implementation todo list
RECOMMENDED: Use TodoWrite to create a todo list with ALL steps, including wrap-up. This prevents forgetting to update/archive the spec after long implementations.
Create todos for:
Example:
TodoWrite:
- Implement feature X according to spec
- Run tests to verify requirements
- Update spec status to "Completed" with commit hash
- Archive spec to ${SPECS_DIR}/archive/implemented/
- Git add and commit all changes (code + spec)
Step 3: Update spec status to "In Progress"
Edit the spec's status field (in the .md file for single-phase specs, or in README.md for directory specs):
**Status:** In Progress
**Started:** YYYY-MM-DD
Optional: Move to active directory
# Single-phase spec (file)
git mv ${SPECS_DIR}/{spec}.md ${SPECS_DIR}/active/{spec}.md
# Phased spec (directory)
git mv ${SPECS_DIR}/{spec}/ ${SPECS_DIR}/active/{spec}/
Step 4: Implement according to spec
Follow the implementation details exactly:
Follow all usual best practices:
Step 5: Verify requirements
# Test the implementation
npm run dev # or appropriate test command
# Verify all spec requirements met
# Check each item in Implementation Details section
Step 6: Update spec status to "Completed"
Edit the spec's status field (the .md file for single-phase specs, or README.md for directory specs):
**Status:** Completed
**Implementation:**
- Commit: {hash} - {message}
- Commit: {hash} - {message}
**Completed:** YYYY-MM-DD
Step 7: Archive the spec
# Move to implemented archive
mkdir -p ${SPECS_DIR}/archive/implemented
# Single-phase spec (file)
git mv ${SPECS_DIR}/{spec}.md ${SPECS_DIR}/archive/implemented/{spec}.md
# OR from active/
git mv ${SPECS_DIR}/active/{spec}.md ${SPECS_DIR}/archive/implemented/{spec}.md
# Phased spec (directory)
git mv ${SPECS_DIR}/{spec}/ ${SPECS_DIR}/archive/implemented/{spec}/
# OR from active/
git mv ${SPECS_DIR}/active/{spec}/ ${SPECS_DIR}/archive/implemented/{spec}/
Step 8: Git add and commit everything
# Add all changes (implementation + updated spec)
git add [files-you-modified]
git add ${SPECS_DIR}/archive/implemented/{spec}.md # or wherever spec is
# Commit with reference to spec
git commit -m "feat: implement [feature name]
Implements spec: {timestamp}-name.md
- [Brief description of changes]
- [Another change]
Status: Completed"
Before committing, verify:
${SPECS_DIR}/archive/implemented/Content principles:
Code examples format:
// src/components/Example.tsx:42
const problematic = () => { /* ... */ };
// Fixed version:
const corrected = () => { /* ... */ };
**Status:** Requires Implementation
Starting work:
**Status:** In Progress
**Started:** YYYY-MM-DD
When complete:
**Status:** Completed
**Implementation:**
- Commit: abc123 - feat: implement feature X
- Commit: def456 - fix: handle edge case in feature X
**Completed:** YYYY-MM-DD
If deprecated:
**Status:** Deprecated
**Reason:** [Brief explanation]
**Superseded By:** [Link to replacement]
**Deprecated:** YYYY-MM-DD
${SPECS_DIR}/
├── {timestamp}-name.md # Single-phase specs (flat file)
├── {timestamp}-name/ # Phased specs (directory)
│ ├── README.md # Overview, principles, decisions, progress
│ ├── P1-{name}.md # Phase 1 detail
│ ├── P2-{name}.md # Phase 2 detail
│ └── ...
├── active/ # In progress (Status: In Progress)
├── archive/
│ ├── implemented/ # Completed (Status: Completed)
│ └── deprecated/ # Obsolete (Status: Deprecated)
└── drafts/ # Work-in-progress ideas
${SPECS_DIR}/archive/implemented/git add [all-files] && git commitREADME.md for overview, then read each PN-*.md for phase detailsREADME.md to "In Progress"PN-*.md file exactly[x] in the phase file as completedREADME.md status, git mv entire directory to archive, final commitnpx claudepluginhub isnbh0/shared --plugin spexGuides implementation of specification tasks with checklists, step-by-step file edits, tests, acceptance criteria validation, and progress tracking. Phase 4 of Spec Kit workflow.
Transforms ideas into structured specifications (requirements, design, tasks) before implementation. Use when building features, fixing bugs, refactoring, or designing systems.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.