Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/alfredoperez/speckit-companionnpx agentmods add commands/alfredoperez/speckit-companion/speckit.companion.mark-completeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/alfredoperez/speckit-companion/speckit.companion.mark-complete)<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/speckit.companion.mark-complete"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/speckit.companion.mark-complete/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/speckit.companion.mark-complete"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/speckit.companion.mark-complete.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00018 | $0.01157 |
| Opus 5 | $0.00009 | $0.00579 |
| Sonnet 5 | $0.00004 | $0.00231 |
| Haiku 4.5 | $0.00002 | $0.00116 |
Grade A, and why
speckit.companion.mark-complete scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mark Spec Complete
Promote the active feature to the terminal completed status in .spec-context.json. This is the
Companion workflow's final step: it runs after implement has finished so the spec lands at the
end of the Active → Completed lifecycle. The command writes completed via the shared
write-context.py path — you never hand-edit .spec-context.json to do it.
The stock speckit workflow has no terminal step and force-closes without ever writing completed;
this step is what gives the Companion pipeline its explicit completion gate.
Prerequisites
- Verify Python is available by running
python3 --version. - If
python3is not available, warn the user and skip:[companion] Warning: python3 not detected; skipped mark-complete. Do not fail the host command.
Execution
Run the writer from the repository root:
python3 .specify/extensions/companion/scripts/write-context.py --mark-complete --by ai
The script resolves the active feature directory on its own (--feature-dir →
SPECIFY_FEATURE_DIRECTORY → SPECIFY_FEATURE → .specify/feature.json → git branch prefix).
Pass --feature-dir specs/<NNN>-<slug> when you already know it.
--mark-complete keeps currentStep at implement (the last real step) and sets status: completed, preserving the canonical invariant that the last history entry's step equals
currentStep. It is the only sanctioned writer of completed.
Fold living-spec deltas (opt-in, best-effort)
Account for every loaded capability first — a delta or an explicit skip, never silence. Living
specs stay current only if completion writes the change back, so before folding, read
livingSpecs.loaded in this feature's .spec-context.json and go through every name in it. For a
loaded capability whose behavior this feature actually changed, append a delta block to this
feature's spec.md — ## ADDED / MODIFIED / REMOVED / RENAMED Requirements — capturing the real new
or changed requirement, and mark each block with <!-- capability: <name> --> so the fold routes it
to the right spec. For a loaded capability this feature did not change (one you merely read for
context), record an explicit skip instead — one call per untouched capability, so "correctly nothing"
stays distinguishable from "silently nothing":
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago Changed · +14 lines 12dd02df62d0
- 9d ago First seen · 84 lines · 18 tokens per session scan A 020804dc3413
speckit.companion.mark-complete is a command published in the GitHub repository alfredoperez/speckit-companion (90 stars, last pushed yesterday), licensed MIT. It adds 18 tokens to every session and 1,157 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other commands, from other repositories
migrate-to-typescript
Migrate JavaScript project to TypeScript.
svelte:component
Create new Svelte components with best practices, proper structure, and optional TypeScript support.
autospec.plan
Generate YAML implementation plan from feature specification.
code-locate
Given a behavior description, locate candidate code paths and line ranges in the active codebase that probably implement it. Output up to 10 candidates with HIGH/MEDIUM/LOW confidence, one-line rationale per candidate, and an explicit search trail; propose a SOURCEOFTRUTH.md update so the next workflow step (typically…
harvest-session-learnings
Scan the current working session and the active task's artifacts for reusable, generalizable lessons (what was tried, what failed and why, what surprised us, what the next task should do differently) and propose anchored entries to append to the task's LEARNINGS.md, the produce-side counterpart to the ADR-0017 consume…
screen-spec
Generate a screen specification from a Figma frame using MCP tools (getdesigncontext, getscreenshot). Produces a spec doc matching the SCREENSPEC.md template with layout sketch, components used, spacing observed, data dependencies, copy, accessibility notes, interactions, and error states. Use when documenting a…