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 skills add Arasz/ai-raccoon --skill spec-driven-refactoringgit clone --depth 1 https://github.com/Arasz/ai-raccoonWrote 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/skills/arasz/ai-raccoon/spec-driven-refactoring)<a href="https://agentmods.dev/skills/arasz/ai-raccoon/spec-driven-refactoring"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/spec-driven-refactoring/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/skills/arasz/ai-raccoon/spec-driven-refactoring"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/spec-driven-refactoring.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.00080 | $0.03127 |
| Opus 5.5 | $0.00032 | $0.01251 |
| Sonnet 5.5 | $0.00016 | $0.00625 |
| Haiku 4.5 | $0.00008 | $0.00313 |
Grade A, and why
spec-driven-refactoring 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 yesterday.
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 — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Spec-Driven Refactoring
Large refactors (schema migrations, concept renames, structural reorganizations) have more surface area for stale assumptions than normal features. This workflow adds two review gates to catch inconsistencies before they compound.
When to use
- Multi-file structural changes (5+ files across schemas, scripts, tests, docs)
- Schema migrations (field renames, type changes, file relocations)
- Concept renames that ripple through the entire codebase
- Any refactor where "I thought X was at line Y" mistakes would be expensive
Procedure
1. Analyze
Read all affected files. Identify every contract the refactor touches:
- Schemas (JSON Schema, TypeScript interfaces, etc.)
- Scripts (build, scaffold, validate, install)
- Tests (which test files reference the old structure)
- Docs (architecture docs, authoring guides, README)
2. Write spec
Produce a markdown specification covering:
- Problem statement — what's wrong and why
- Design decisions — numbered, explicit choices with rationale
- Proposed structure — new/modified/removed files in a table
- Schemas — full JSON Schema definitions for new contracts
- Implementation order — phased, with validation gates between phases
- Risks — what could go wrong
Save to docs/specs/ (or project equivalent).
3. Spec review
Delegate a review sub-agent. Feed it the spec + all key context files. Ask it to check:
- Logical gaps or missing pieces
- Naming consistency (especially across old→new renames)
- Migration path correctness
- Schema completeness and self-consistency
- Implementation order dependencies (does Phase 2 need Phase 1's output?)
Categorize findings: Critical / Medium / Low. Return GO/NO-GO with conditions.
4. Fix spec findings
Address all Critical and Medium findings. Low findings can be deferred to implementation but should be tracked in the spec's review tracker.
5. Pre-implementation consistency check
Delegate a SECOND sub-agent to verify the spec's claims against the actual codebase:
- Do claimed line numbers match?
- Do file paths exist?
- Do schema fields match the spec's descriptions?
- Do test files reference the paths the spec claims?
- Are there files the spec forgot to mention?
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- yesterday First seen · 257 lines · 80 tokens per session scan A 7f63e3239c53
spec-driven-refactoring is a skill published in the GitHub repository Arasz/ai-raccoon (7 stars, last pushed today), licensed MIT. It adds 80 tokens to every session and 3,127 once invoked, about $0.0003 per session on Opus 5.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-12-05.
spec-driven-refactoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| spec-driven-refactoringArasz/ai-raccoon | Skill | 7 | today | MIT | A | 80 | Claude Code, Codex |
| qualityariaxhan/kernel-claude | Skill | 16 | yesterday | MIT | A | 41 | Claude Code |
| tearitapartariaxhan/kernel-claude | Skill | 16 | yesterday | MIT | A | 43 | Claude Code |
| memory-to-skillzilliztech/memsearch | Skill | 3.0k | 2d ago | MIT | A | 82 | Claude Code, Codex |
| huggingface-vision-trainerwaybarrios/opencode-power-pack | Skill | 562 | 5d ago | MIT | A | 48 | Claude Code |
| semgrep-rule-variant-creatorwaybarrios/opencode-power-pack | Skill | 562 | 5d ago | MIT | A | 50 | Claude Code |
| huggingface-paper-publisherwaybarrios/opencode-power-pack | Skill | 562 | 5d ago | MIT | A | 42 | Claude Code |