refactoring
Skill2 starsChanged 34 days agoMITView on GitHub
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.
59 other projects use a version of this.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- larchanka/skillstheir own version, first seen Nov 8, 2026
- REPOZY/superpowers-optimizedtheir own version, first seen Nov 8, 2026
- nisarth/claude-skills-storetheir own version, first seen Nov 8, 2026
- ericwang200608-beep/LANYANT-Skillstheir own version, first seen Nov 8, 2026
- AnyOrgName/php-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use ci-cd, dependency-management and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 5 projects that use this
dkprogSkilldependency-management
Apply when wiring dependencies, integrating external services, or designing interfaces between modules. Ensures loose coupling through dependency injection, interface segregation, and proper abstraction boundaries.
Also in 3 projects that use this
javalenciacaiSkillmulti-agent-orchestration
Design and coordinate multi-agent systems where specialized agents work together to solve complex problems. Covers agent communication, task delegation, workflow orchestration, and result aggregation. Use when building coordinated agent teams, complex workflows, or systems requiring specialized expertise across domains.
Also in 3 projects that use this
harrissohail6Skilldatabase-design
Database schema design and SQL best practices. Use when designing tables, writing queries, or optimizing database performance.
Also in 5 projects that use this
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 7 projects that use this
klauswgSkillperformance
Optimize web performance for faster loading and better user experience. Use when asked to "speed up my site", "optimize performance", "reduce load time", "fix slow loading", "improve page speed", or "performance audit".
Also in 7 projects that use this
Other versions59 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 59
- handsontable/handsontable★ 22ksame name
- ciembor/agent-rules-books★ 2.8ksame name
- hitobito/hitobito★ 485same name
- databrickslabs/ontobricks★ 457same name
- DevelopersGlobal/ai-agent-skills★ 216same name
- REPOZY/superpowers-optimized★ 146same name
- extra-org/extra★ 119same name
- tmcfarlane/team-avatar★ 112same name
- larchanka/skills★ 50same name
- nimadorostkar/Claude-Skills-collection★ 33same name
49 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- architectureSkill
- decisionsSkill
- designSkill
- documentationSkill
- impact-triageSkill
- implementationSkill
- initSkill
- integrateSkill
- lessonsSkill
- metricsSkill
- planningSkill
- promote-configSkill
- proposeSkill
- pruneSkill
- requirementsSkill
- reviewSkill
- runSkill
- tuneSkill
- validationSkill
- workspaceSkill
The file
Files
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) is deferred under the run skill invariant Impacts: fold or defer at discovery. A refactor the executor reports and does not execute (contracts/refinement.md, the "reported in the final message" rule) is an impact.
- Re-review, scoped to the refactor diff only, via craft:review's procedure
(same dimensions, per-dimension convergence ≤3). Findings implying FURTHER
refactoring are deferred, not another loop.
gates.phasegreen to close. - Order rationale: this runs BEFORE validation so validation scores the final shape.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

