speckit.companion.after-specify — Claude Code and Codex command
speckit.companion.after-specify — a command for Claude Code and Codex that writes the current spec-kit step to .spec-context.json for the Companion GUI. Runs from the repository root after the specify stage completes.
MIT ★ 110 updated 2026-11-03
.claude/commands/speckit.companion.after-specify.mdWhat speckit.companion.after-specify does
The command executes the Python script write-context.py with parameters --hook finish --step specify. If Python 3 is not available, the step is not recorded, but execution continues without interruption.
Use it in spec-kit workflows where you need to preserve state between development phases. The .spec-context.json file acts as memory for the Companion GUI, letting it track progress and project context across steps.
What it helps with
- record the completion of the specify stage in context
- sync spec-kit state with Companion GUI
- preserve the current development step for subsequent commands
Example prompts for the agent
- After finishing the specification step, run
speckit.companion.after-specifyfrom the repository root - Execute the command to mark the transition from specify to the next phase
- Use it in automation after each spec-kit block completes
How to install speckit.companion.after-specify
Manually: put the files in place
.claude/commands/speckit.companion.after-specify.mdCall it with /speckit.companion.after-specify. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/speckit.companion.after-specify.mdCall it with /prompts:speckit.companion.after-specify. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/speckit.companion.after-specify.prompt.mdManually: put the files in place
.gemini/commands/speckit.companion.after-specify.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about speckit.companion.after-specify
How do I install speckit.companion.after-specify in Claude Code?
Create the file .claude/commands/speckit.companion.after-specify.md in your project root with the command description and path to the script.
What does speckit.companion.after-specify do?
It writes the current spec-kit step (finish/specify) to .spec-context.json, which Companion GUI uses to track progress through the workflow.
What happens if Python 3 is not installed?
The command skips recording the step but does not fail; you can proceed without errors.
Source text
speckit.companion.after-specify.md · MIT
--- description: "Capture the current spec-kit step into .spec-context.json for the Companion GUI" --- # Capture Specify Finish Run this from the repository root to record that specify finished; if `python3` is missing, say the step was not recorded and carry on. ```bash python3 .specify/extensions/companion/scripts/write-context.py --hook finish --step specify ```
© alfredoperez · MIT · alfredoperez/speckit-companion