refactor-clean
Refactor toward one clear owner per concept instead of adding sediment.
Skill by threecee
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/threecee-refactor-clean
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/refactor-clean
What's inside
- Skill name
refactor-clean- Description
- Refactor toward one clear owner per concept instead of adding sediment. Use when a change reveals duplication, obsolete paths, compatibility wrappers, parallel abstractions, or an overloaded module.
- License
- MIT
- Instructions
- 53 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- full-guide.md · references/
SKILL.md (first lines)
# Clean Refactoring
Replace the old shape with the simpler shape the codebase would want if it were
designed today. Refactoring is not adding a compatibility layer beside the problem;
it is moving ownership until every concept has exactly one clear home. That cuts
both ways: merging N duplicated owners into one, and splitting one over-loaded
module into the several owners it was hiding.
## Trigger
Use when the current shape obscures ownership or makes a small behavior change disproportionately costly.
## Checklist
## Workflow
1. Name the concept that lacks one clear owner — duplicated across several owners,
or several concepts fused into one over-loaded module. Identify the thing(s)
that should each have one owner: environment, pricing rule, geometry source,
state machine, data contract, renderer phase, API shape, UI state, or test
oracle.
2. Find every current owner and consumer. Treat wrappers, aliases, pass-local
constants, copied structs, and "temporary" branches as sediment until proven
otherwise. Consumers are more than importers: a test in another language
that reads the file as text, a tool whose baseline is keyed by the file's
path, a test that patches a dotted name, a driver executed by a test from a
research directory. Before the first move, split, rename or delete, run the
consumer inventory in `interpretation/investigation-practice.md`
("Consumer inventory") and decide live-versus-historical per file from
executing readers, not from the directory a file sits in.
3. Promote the concept to its natural home. Pick the module that would own it from
scratch, then make old call sites consume that owner directly.
4. Delete or collapse the stale path in the same pass when feasible. If a bridge must
remain, make it tiny, named as compatibility, and give it a removal condition.
5. Verify behavior through consumers, not just the new module. A clean refactor is
only proven when the surfaces that used to diverge now report or exercise the
same source of truth — and when each consumer's own apparatus has run (the
frontend contract, the path-keyed SAST gate, the docgen run), not only the
module's suite. A moved line is a NEW finding to a path-keyed baseline: fix
the code, never relieve the baseline for the move. A guard that patches a
name and stays green proves the name existed, not that the path was taken;
pin it at the owner and show it red on a planted call before the refactor
leans on it.
## Done
Done when each concept has one clear owner, stale paths are removed or explicitly bounded, and every affected consumer proves the new invariant.
Detailed refactoring rules and examples: [full guide](references/full-guide.md).From threecee/software-factory-kit, MIT.
More from threecee/software-factory-kit
- 0.563score
code-review
threecee
Review a current diff for correctness, stale references, ownership, test quality, unnecessary compatibility, and cleanup.
SkillBFreshness: B★ 2Claude Code +9 - 0.563score
compare-screenshots
threecee
Compare screenshots to judge which image is less wrong, not to match a baseline.
SkillBFreshness: B★ 2Claude Code +9 - 0.559score
implement-spec
threecee
Implement an approved spec through reviewable passes.
SkillBFreshness: B★ 2Claude Code +9 - 0.559score
finishing-a-development-branch
threecee
Use after implementation and tests are complete to choose and safely execute merge, pull-request, keep, or discard handling while respecting normal, linked…
SkillBFreshness: B★ 2Claude Code +9 - 0.559score
independent-lane-review
threecee
Run a fresh-context, multi-model adversarial review of a lane before train assembly or on demand.
SkillBFreshness: B★ 2Claude Code +9 - 0.559score
brainstorming
threecee
Explore intent and produce an approved design before unbriefed creative implementation.
SkillBFreshness: B★ 2Claude Code +9 - 0.559score
audit-choices
threecee
Audit decisions an implementing agent made beyond the brief, without changing code.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
log-triage
threecee
Extract failing tests, assertion messages, tracebacks, and red gate results from a large run or verify log without reading its full text.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
claude
threecee
Use Claude Code as an independent `claude -p` subagent when the user explicitly asks for Claude, wants a second-agent opinion from Claude, or asks to delegate…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
handback-digest
threecee
Draft one choices-ledger entry per choice in a lane handback, in the ledger's own ELI5 entry format, as the starting point for the orchestrator's…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
bulk-reader
threecee
Answer a narrow question over one or more large repository files without reading their raw content into context.
SkillBFreshness: B★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 8, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/threecee/software-factory-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from threecee
- 0.563score
code-review
threecee
Review a current diff for correctness, stale references, ownership, test quality, unnecessary compatibility, and cleanup.
SkillBFreshness: B★ 2Claude Code +9 - 0.563score
compare-screenshots
threecee
Compare screenshots to judge which image is less wrong, not to match a baseline.
SkillBFreshness: B★ 2Claude Code +9 - 0.559score
implement-spec
threecee
Implement an approved spec through reviewable passes.
SkillBFreshness: B★ 2Claude Code +9 - 0.559score
finishing-a-development-branch
threecee
Use after implementation and tests are complete to choose and safely execute merge, pull-request, keep, or discard handling while respecting normal, linked…
SkillBFreshness: B★ 2Claude Code +9 - 0.559score
independent-lane-review
threecee
Run a fresh-context, multi-model adversarial review of a lane before train assembly or on demand.
SkillBFreshness: B★ 2Claude Code +9 - 0.559score
brainstorming
threecee
Explore intent and produce an approved design before unbriefed creative implementation.
SkillBFreshness: B★ 2Claude Code +9
Cite this page
refactor-clean skill. Agent Mart. https://agentmart.dev/skills/threecee-refactor-clean (last updated 2026-10-24)