speckit.companion.before-step — Claude Code command
The speckit.companion.before-step command records a spec-kit step’s start in .spec-context.json for the Companion GUI. Run it before specify, plan, tasks, or implement.
MIT ★ 110 updated 2026-11-03
.claude/commands/speckit.companion.before-step.mdWhat speckit.companion.before-step does
Run the command from the repository root before the spec-kit step begins. It calls .specify/extensions/companion/scripts/write-context.py with the start hook and passes the step name through --step. Accepted step names are specify, plan, tasks, and implement.
The script needs python3. If that executable is missing, the step is left unrecorded and work should continue. For Claude Code, place the command file at .claude/commands/speckit.companion.before-step.md; for Codex, use ~/.codex/prompts/speckit.companion.before-step.md.
What it helps with
- record when a spec-kit step begins for the Companion GUI
- write the active stage to
.spec-context.json - pass the step name to the script with
--step
Example prompts for the agent
- Before
specify, run/speckit.companion.before-stepto record the step starting. - Call
/speckit.companion.before-stepfor theimplementstage before it begins. - Record the start of
planwith/speckit.companion.before-step.
How to install speckit.companion.before-step
Manually: put the files in place
.claude/commands/speckit.companion.before-step.mdCall it with /speckit.companion.before-step. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/speckit.companion.before-step.mdCall it with /prompts:speckit.companion.before-step. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/speckit.companion.before-step.prompt.mdManually: put the files in place
.gemini/commands/speckit.companion.before-step.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about speckit.companion.before-step
How do I install speckit.companion.before-step in Claude Code?
Place the command file at .claude/commands/speckit.companion.before-step.md.
What does speckit.companion.before-step do?
It passes the upcoming spec-kit stage to a script, which records its start in .spec-context.json for the Companion GUI.
What happens if Python 3 is missing?
The step is not recorded, and the command instructions say to continue working.
Source text
speckit.companion.before-step.md · MIT
--- description: "Capture a spec-kit step's start into .spec-context.json for the Companion GUI" --- # Capture Step Start Run this from the repository root, passing the step that is about to run (specify, plan, tasks or implement) as `--step`; if `python3` is missing, say the step was not recorded and carry on. ```bash python3 .specify/extensions/companion/scripts/write-context.py --hook start --step <step> ```
© alfredoperez · MIT · alfredoperez/speckit-companion