restore

restore is a command for coding agents from tinesoft/spec-kit-token-budget. It costs 39 tokens per session (1,429 once invoked), scanned A, original, MIT.

A command that restores specification documents from backup files created during compaction. Compaction is a process that shortens stored working material while keeping a full copy available.

In plain words
What is it for?
Use it to restore specification, planning, task, research, data-model, contract, quickstart, or constitution files, either individually or as a group.
Why use it?
It lets you recover the original version of a document if its shortened version is no longer sufficient.

Command

Install

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.

agentmods
npx agentmods add commands/tinesoft/spec-kit-token-budget/restore
Clone the repo
git clone --depth 1 https://github.com/tinesoft/spec-kit-token-budget

Wrote 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.

agentmods badge for restore

README.md
[![agentmods](https://agentmods.dev/badge/commands/tinesoft/spec-kit-token-budget/restore.svg)](https://agentmods.dev/commands/tinesoft/spec-kit-token-budget/restore)
Your own site
<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>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,429 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 5d ago against content hash 4b6caf3e2ca9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

commands/restore.md · 139 lines

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

  1. 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.

  2. Parse $ARGUMENTS:

    • empty → restore every artifact in the active feature directory that has a corresponding .full.md backup.
    • spec | plan | tasks | research | data-model | contracts | quickstart | constitution → restore only that artifact (or that group, in the case of contracts). When the target is constitution, restore both specs/<feature>/constitution.md and .specify/memory/constitution.md, whichever have a .full.md backup. 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.

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 .md path and check that a matching .full.md backup exists. If not, report "no backup found for <file>" and stop.
  • If no argument was given, scan the feature directory for *.full.md files and derive the corresponding *.md path for each. Also scan .specify/memory/ for constitution.full.md; if found, add .specify/memory/constitution.md to 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).

Read the full file on GitHub · 139 lines

Changes

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.

  1. 5d ago First seen · 139 lines · 39 tokens per session scan A 4b6caf3e2ca9

Subscribe to this mod's changes

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.