Refactoring
Craft phase 7 - widen the lens to the whole codebase for structural gains the diff-scoped passes cannot see; behavior-preserving; may be an honest no-op.From its SKILL.md
npx -y skills add scolladon/craft --skill refactoringAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, as published. Nobody here has run it
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.