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 wsauret/flywheel --skill refactor-safety-netgit clone --depth 1 https://github.com/wsauret/flywheelWrote 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/wsauret/flywheel/refactor-safety-net)<a href="https://agentmods.dev/skills/wsauret/flywheel/refactor-safety-net"><img src="https://agentmods.dev/badge/skills/wsauret/flywheel/refactor-safety-net/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/wsauret/flywheel/refactor-safety-net"><img src="https://agentmods.dev/badge/skills/wsauret/flywheel/refactor-safety-net.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.00017 | $0.01691 |
| Opus 5.5 | $0.00007 | $0.00676 |
| Sonnet 5.5 | $0.00003 | $0.00338 |
| Haiku 4.5 | $0.00002 | $0.00169 |
Grade A, and why
refactor-safety-net 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 28d 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 — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor Safety Net
Input: a planned refactor that changes how behavior is produced and promises that the behavior itself does not change, its plan document, and the code it rewires.
Mandatory gates:
- The matrix, the corpus replay, and the equivalence check all pass against the unmodified code, and the corpus and its generator are committed, before the first refactor commit lands.
- During the refactor, a matrix or corpus diff that you cannot explain is the regression that the net exists to catch. Stop and revert. Do not update the test to make it pass.
- A deliberate behavior change updates the schema, the characterization test, and a written rationale in the same commit as the code. The diff between the old and new golden artifacts is the reviewable record of each behavior change.
- Run the net again after every rebase, because concurrent work on the same files changes the baseline.
1. Decide whether the net applies
Build the net when the refactor does one of these:
- collapses or moves a seam: two code paths that produce the same output, a coordinate translation layer, or a protocol boundary;
- keeps an observable contract that code you do not change consumes: a wire schema, a projection shape, or a client;
- touches a surface with a history of incidents, such as session loading or output hydration.
Skip it for pure renames, dead-code removal, and changes that wire-level tests already pin. The net costs a medium-sized phase, so spend it only where a silent regression costs more.
2. Write the contract inventory
Before any test exists, write each contract that the refactor can break into the plan document with a file:line citation. Sort each contract into one category:
| Category | Definition | Protection |
|---|---|---|
| A: untouched by design | Contracts keyed on stable identity and structurally outside the change, such as identity-keyed lazy tool-body expansion or per-kind wire shapes | Point characterization tests that pass unchanged before and after |
| B: implicit equivalence | Two code paths that must agree while nothing enforces it, such as a block rendered live and the same block replayed later | An executable equivalence check (step 5) |
| C: the change surface | Contracts keyed on the thing that the refactor changes: coordinates, offsets, routing decisions | The full characterization matrix (step 3) and the golden corpus (step 4) |
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.
- 28d ago First seen · 92 lines · 17 tokens per session scan A 704dd9f23e29
refactor-safety-net is a skill published in the GitHub repository wsauret/flywheel (19 stars, last pushed today), licensed Apache-2.0. It adds 17 tokens to every session and 1,691 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-03.
refactor-safety-net compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactor-safety-netwsauret/flywheel | Skill | 19 | today | Apache-2.0 | A | 17 | Claude Code, Codex |
| investigateAbyssCN/oh-my-dag | Skill | 44 | 1mo ago | MIT | A | 77 | Claude Code, Codex |
| test-fixture-designerlfyxhappy/lfcode | Skill | 2 | 2mo ago | MIT | A | 60 | Claude Code, Codex |
| unit-test-engineerlfyxhappy/lfcode | Skill | 2 | 2mo ago | MIT | A | 58 | Claude Code, Codex |
| codew-release-qa-sweepHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 31 | Claude Code, Codex |
| gh-find-prsHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 27 | Claude Code, Codex |
| contributor-onboardingHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 57 | Claude Code, Codex |