Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/tinesoft/spec-kit-token-budget/restoregit clone --depth 1 https://github.com/tinesoft/spec-kit-token-budgetWrote 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/tinesoft/spec-kit-token-budget/restore)<a href="https://agentmods.dev/commands/tinesoft/spec-kit-token-budget/restore"><img src="https://agentmods.dev/badge/commands/tinesoft/spec-kit-token-budget/restore.svg" alt="Measured on agentmods" 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 | $0.00039 | $0.01429 |
| Opus 5 | $0.00019 | $0.00714 |
| Sonnet 5 | $0.00008 | $0.00286 |
| Haiku 4.5 | $0.00004 | $0.00143 |
Grade A, and why
restore 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 5d 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 — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/speckit.token-budget.restore
The user has invoked /speckit.token-budget.restore with arguments: $ARGUMENTS.
Your task
Restore one or more SDD artifacts in the active feature to their original
(pre-compaction) state, using the <artifact>.full.md backups that
/compact created. Delete each backup after a successful restore.
Inputs
-
Resolve the active feature directory (typically
specs/<NNN-feature-name>/) from the current git branch using the existing spec-kit conventions. If the user is not on a feature branch, ask which feature to operate on and stop. -
Parse
$ARGUMENTS:- empty → restore every artifact in the active feature directory that has a
corresponding
.full.mdbackup. spec|plan|tasks|research|data-model|contracts|quickstart|constitution→ restore only that artifact (or that group, in the case ofcontracts). When the target isconstitution, restore bothspecs/<feature>/constitution.mdand.specify/memory/constitution.md, whichever have a.full.mdbackup. Warn and skip any that do not.- a relative or absolute path → restore that specific file.
--dry-run→ report what would be restored, write nothing.
- empty → restore every artifact in the active feature directory that has a
corresponding
Algorithm — apply in order, per artifact
Step 1 — Discover candidates
Build the list of artifacts to process:
- If a specific artifact name or path was given, resolve it to its
.mdpath and check that a matching.full.mdbackup exists. If not, report "no backup found for<file>" and stop. - If no argument was given, scan the feature directory for
*.full.mdfiles and derive the corresponding*.mdpath for each. Also scan.specify/memory/forconstitution.full.md; if found, add.specify/memory/constitution.mdto the candidate list (resolve from the project root, not the feature directory). - If no backups exist at all, print "No compaction backups found in
<feature-dir>." and stop (not an error).
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.
- 5d ago First seen · 139 lines · 39 tokens per session scan A 4b6caf3e2ca9
restore is a command published in the GitHub repository tinesoft/spec-kit-token-budget (7 stars, last pushed 2mo ago), licensed MIT. It adds 39 tokens to every session and 1,429 once invoked, about $0.0002 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-08-31.
Other commands, from other repositories
sddp-autopilot
Run the full SDD feature-delivery pipeline.
archive
Archive a feature specification into main project memory after merge, resolving gaps and conflicts.
sddp-implement-qc-loop
Run implement and QC in a continuous loop.
sddp-implement
Implement the current feature tasks.
sddp-plan
Create an implementation plan from the current feature specification.
sddp-prd
Create or refine the canonical product document.