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 agentmods add skills/scolladon/craft/refactoringnpx skills add scolladon/craft --skill refactoringgit clone --depth 1 https://github.com/scolladon/craftWrote 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/scolladon/craft/refactoring)<a href="https://agentmods.dev/skills/scolladon/craft/refactoring"><img src="https://agentmods.dev/badge/skills/scolladon/craft/refactoring.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 | $0.00038 | $0.00482 |
| Opus 5 | $0.00019 | $0.00241 |
| Sonnet 5 | $0.00008 | $0.00096 |
| Haiku 4.5 | $0.00004 | $0.00048 |
Grade A, and why
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 3d 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.
What it actually says
craft:refactoring
Preamble (always runs — non-overridable)
- Manifest read (lint if standalone); gates as in implementation's preamble.
Procedure (default body — a manifest override: replaces everything below)
- Judgment — session-owned, in-thread: quick candidate scan seeded by the feature's diff, radiating only as far as the feature's concerns reach: duplication now warranting centralization, responsibilities in the wrong layer, the Nth consumer of a pattern that should become shared. Bounded by YAGNI/KISS — no speculative abstraction.
- Nothing clears the bar → first-class no-op. Record
NO-OP(refactoring): nothing cleared the bar — <justification>in the run record, the 1–3 line justification stating what was considered and why nothing changed; the run record is carried into the PR body (documentation phase), so the no-op is stated, not hidden. This is a recorded outcome symmetric with the decisions phase'sNO-OP(decisions):line — same token, kept idiom — not an implicit skip. Spawning an agent merely to conclude no-op is forbidden waste. A silent skip is not allowed. - Candidates survive → scope each into a precise spec (what moves where, which symbols/files, expected mechanical test changes, blast radius), then spawn craft:refactor-executor with the specs, gates, and context files. Integrate-don't-defer: in-scope gains land NOW in this change; only a genuinely feature-sized refactor (own design + ADRs) becomes a follow-up entry.
- Re-review, scoped to the refactor diff only, via craft:review's procedure
(same dimensions, per-dimension convergence ≤3). Findings implying FURTHER
refactoring become follow-ups, not another loop.
gates.phasegreen to close. - Order rationale: this runs BEFORE validation so validation scores the final shape.
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.
- 3d ago First seen · 35 lines · 38 tokens per session scan A 37ca005f8e05
refactoring is a skill published in the GitHub repository scolladon/craft (2 stars, last pushed 15d ago), licensed MIT. It adds 38 tokens to every session and 482 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.
Other skills, from other repositories
define
Manifest builder. Turns shared understanding into a verifiable Manifest with Deliverables, Acceptance Criteria, Global Invariants, and an Initial Approach. Use when planning features, scoping refactors, debugging complex issues, or when the user asks to define, scope, plan, spec out, make a manifest, or break down a…
check-pr
Read-only inspection of a single GitHub PR lifecycle — checks CI, review threads, description sync, and mergeability, and returns PASS or FAIL with per-gate findings. Never invokes the merge button. Use when verifying a PR is ready to merge, polling lifecycle progress, checking mergeability, or babysitting a GitHub PR…
babysit-pr
Author-side PR lifecycle babysitter and companion to review-pr. Use when the user wants to tend an existing GitHub PR through CI, review threads, description sync, mergeability, auto-fixes, or asks to babysit a PR with or without an existing manifest.
review-code
Review a change along one specific quality dimension — bugs, design, simplicity, maintainability, testability, test quality, type safety, contracts, operational readiness, docs, prose value, change intent, defect-class completeness after a fix, or CLAUDE.md adherence. Loads exactly one dimension reference and audits…
just-define
Goal-based Manifest builder. Encodes shared understanding into a verifiable Manifest — Deliverables, Acceptance Criteria, Global Invariants — deciding for itself how to interview. Use when the user asks to just define it, spec it lean, or make a manifest with minimal process.
update-lid
Configure or reconcile a project for linked-intent development (LID). Dispatches on project state — fresh bootstrap, append directives to an existing agent-instructions file (AGENTS.md or CLAUDE.md), add missing mode marker, reconcile convention drift, or run mode transitions. Invoked as /update-lid. For fresh…