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 thoughtbot/rails-consultant --skill preparatory-refactorgit clone --depth 1 https://github.com/thoughtbot/rails-consultantWrote 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/thoughtbot/rails-consultant/preparatory-refactor)<a href="https://agentmods.dev/skills/thoughtbot/rails-consultant/preparatory-refactor"><img src="https://agentmods.dev/badge/skills/thoughtbot/rails-consultant/preparatory-refactor/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/thoughtbot/rails-consultant/preparatory-refactor"><img src="https://agentmods.dev/badge/skills/thoughtbot/rails-consultant/preparatory-refactor.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.00022 | $0.02171 |
| Opus 5.5 | $0.00009 | $0.00868 |
| Sonnet 5.5 | $0.00004 | $0.00434 |
| Haiku 4.5 | $0.00002 | $0.00217 |
Grade A, and why
preparatory-refactor 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 — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Preparatory refactoring
Make the change easy, then make the easy change. — Kent Beck
You're looking for the refactorings this feature asks for. A preparatory refactoring earns its place by making the feature's diff smaller and more obvious, so if you can't show that, leave it out — a finding that stands on its own without the feature is a code review finding, and /multi-lens-review is where it goes.
You identify, you don't refactor. Nothing here edits code. The report has to survive being pasted into a session that has none of this conversation, which is the real constraint on how long it can be.
Workflow
- Get the feature.
- Find where it lands — one angle, then two more running in the background.
- Sketch the naive diff — what you'd touch if you just wrote it now.
- Name the moves that shrink that diff.
- Report the ones you'd defend.
1. Get the feature
The feature, if the user passed one: $ARGUMENTS
It may be a path to a SPEC, a slug matching a file in docs/specs/ (where /slice writes), or a sentence. Prose is fine — you need to know what the code has to do, not how it'll be worded. If it's vague enough that you can't guess which files it touches, ask one question rather than reading the whole repo hoping to find out.
2. Find where it lands
Three angles, in two waves — the other two are defined in terms of the site's paths, so they can't be dispatched until the site comes back. Every one of them is a subagent: Explore, which is read-only, but it does have Bash, so tell each plainly to read and report, no command that writes, stages, or checks anything out. Tell each one to read whole files rather than sampling excerpts, ask for exact paths and line numbers over prose, and cap it at the 10 files most worth reading. "The highlighter handles ranges" isn't something you can sketch a diff against, and an agent that sampled its way past half the callers reports the ones it saw without saying it stopped.
Wave one is the site: the function, module, or file where this behavior would go, and every caller. Tell the user recon is running, and that the sketch may reach them before the rest of it does.
What ships with it
1 file 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 · 101 lines · 22 tokens per session scan A 6c5632b15c27
preparatory-refactor is a skill published in the GitHub repository thoughtbot/rails-consultant (29 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 2,171 once invoked, about $0.0001 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-11-07.
preparatory-refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| preparatory-refactorthoughtbot/rails-consultant | Skill | 29 | yesterday | MIT | A | 22 | Claude Code |
| csiftwdhwg001/csift | Skill | 34 | 1mo ago | MIT | A | 227 | Claude Code, Codex |
| recursive-decompositionmassimodeluisa/recursive-decomposition-skill | Skill | 54 | 1mo ago | MIT | A | 144 | Claude Code |
| flowsvictorgrein/spec-crew | Skill | 8 | 8mo ago | none | A | 43 | Claude Code, Codex |
| core-buildvictorgrein/spec-crew | Skill | 8 | 8mo ago | none | A | 38 | Claude Code, Codex |
| tools-expertvictorgrein/spec-crew | Skill | 8 | 8mo ago | none | A | 50 | Claude Code, Codex |
| orchestration-governancevictorgrein/spec-crew | Skill | 8 | 8mo ago | none | A | 27 | Claude Code, Codex |