Borrowing it
Nothing to install: this file belongs to girishr/SpecPilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/girishr/SpecPilot/main/.claude/commands/specpilot-backfill.mdgit clone --depth 1 https://github.com/girishr/SpecPilotWrote 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/girishr/specpilot/specpilot-backfill)<a href="https://agentmods.dev/commands/girishr/specpilot/specpilot-backfill"><img src="https://agentmods.dev/badge/commands/girishr/specpilot/specpilot-backfill.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.1 | $0.00023 | $0.01213 |
| Opus 5 | $0.00012 | $0.00607 |
| Sonnet 5 | $0.00005 | $0.00243 |
| Haiku 4.5 | $0.00002 | $0.00121 |
Grade A, and why
specpilot-backfill 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 8d 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backfill missing SpecPilot mandate sections into whichever IDE files already exist in this project. Run the script below — it checks four fingerprints per file and appends whichever are missing, append-only, never overwriting existing content.
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
CANDIDATE_FILES=(
".github/copilot-instructions.md"
"CLAUDE.md"
".cursor/rules/specpilot.mdc"
".windsurfrules"
".antigravity/rules.md"
)
has_critical() { grep -qF "Critical Mandates" "$1"; }
has_philosophy() { grep -qF "## Code Philosophy — Write Only What Needed" "$1"; }
has_rules() { grep -qF "## Code Rules" "$1"; }
has_reanchor() { grep -qF "## Re-Anchor" "$1"; }
append_critical() {
cat <<'BLOCK' >> "$1"
## 🔴 Critical Mandates — Never violate, no exceptions
1. No commit unless asked.
2. No push unless asked.
3. No deploy/publish/release unless asked.
4. No `.specs/` structure changes — content only.
5. Update specs after change:
- Trivial → `planning/tasks.md`
- Feature → `project/requirements.md` + `planning/tasks.md`
- Architectural → all affected files + `CHANGELOG.md`
6. Never reference file contents without reading first. If unread, say so.
7. Never write code or change files unless asked. Ask first.
8. Spec-first gate (scale to task size):
- Trivial → no gate
- Feature → read 1–2 relevant `.specs/` files before coding
- Architectural → update all affected specs, present Spec Report, wait for `yes, proceed`
BLOCK
}
append_philosophy() {
cat <<'BLOCK' >> "$1"
## Code Philosophy — Write Only What Needed
1. Need exist? No → skip. Say why.
2. Already in codebase? → reuse. Not rewrite.
3. Stdlib do it? → use it.
4. Native or installed dep cover it? → use. No new deps.
5. One line do it? → write that.
6. Only then: minimum code that work.
7. Never cut: validation, error handling, security, explicit requirement.
BLOCK
}
append_rules() {
cat <<'BLOCK' >> "$1"
## Code Rules
1. No abstraction, interface, factory, or pattern unless asked.
2. No scaffold "for later". Later scaffold itself.
3. Delete before add.
4. Shortest correct diff win.
5. Fix cause, not symptom. One guard in shared function beat guard in every caller.
6. Boring over clever. Clever = 3am bug.
7. Read before write. Never reference code you haven't read.
BLOCK
}
append_reanchor() {
cat <<'BLOCK' >> "$1"
## Re-Anchor
If you lose context mid-session, read `.specs/project/project.yaml` to restore full project context.
For a ready-made re-anchor prompt, see `.specs/development/prompts.md → ## Re-Anchor Prompt`.
BLOCK
}
for f in "${CANDIDATE_FILES[@]}"; do
if [ ! -f "$f" ]; then
echo "SKIPPED (not found): $f"
continue
fi
added=()
has_critical "$f" || { append_critical "$f"; added+=("Critical Mandates"); }
has_philosophy "$f" || { append_philosophy "$f"; added+=("Code Philosophy"); }
has_rules "$f" || { append_rules "$f"; added+=("Code Rules"); }
has_reanchor "$f" || { append_reanchor "$f"; added+=("Re-Anchor"); }
if [ ${#added[@]} -eq 0 ]; then
echo "ALREADY CURRENT: $f"
else
echo "UPDATED: $f (added: ${added[*]})"
fi
done
echo
echo "== team.devPrefix check =="
YAML=".specs/project/project.yaml"
if [ -f "$YAML" ] && ! grep -q "devPrefix:" "$YAML"; then
echo "MISSING: team.devPrefix in $YAML — ask the user for a short handle (e.g. GitHub username) and add it under a team: section."
fi
After running it:
- Report per file: updated (with which sections were added), already-current, or skipped (file not found).
- If the devPrefix check printed a missing-handle line, ask the user for a short handle (their GitHub/GitLab/Bitbucket username or any short tag) and add it under a
team:section inproject.yamlyourself — the script only detects the gap, it does not prompt interactively. - Never overwrite existing content in any file; every append goes to the end of the file.
Maintenance cost: unlike the CLI's specBackfiller.ts, this command has no shared source-of-truth constant to import — its four fingerprint blocks above are a literal copy and must be manually kept in sync whenever CLAUDE.md/copilot-instructions.md generation changes (buildCriticalMandatesMarkdown(), buildCodePhilosophyMarkdown() in ideConfigGenerator.ts). If this command's output ever looks stale, check those functions first.
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.
- 8d ago First seen · 118 lines · 23 tokens per session scan A 16c9c26b3e63
specpilot-backfill is a command published in the GitHub repository girishr/SpecPilot (37 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 1,213 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-08-30.
Other commands, from other repositories
ensemble:generate-project-router-rules
Generate project-specific router rules by analyzing the project's tech stack.
ensemble:generate-router-rules
Generate router rules by introspecting installed agents and skills.
speckit.spec-stats.open
On-demand view of everything not complete: what stage each is stuck at, what the immediate next artifact/command is, oldest-untouched first, stale warnings past staleafterdays.
session-end
I'll summarize this coding session and update the memory system with our accomplishments.
scout-scan
Scan a path with Scout and walk through the security findings.
init
Birth or wake your homunculus.