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/classified-ai-core-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 cleanly instead of layering sediment. Use when a change reveals duplicated concepts, local adapters, obsolete owners, compatibility wrappers, parallel abstractions, or "just tack this on" pressure in any code area.
- License
- MIT
- Metadata
- author: Classified AI · category: uncategorized · maturity: beta
- Instructions
- 67 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
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 there is one concept with clear consumers. ## Workflow 1. Name the duplicated concept. Identify the thing that should 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. 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. ## Rules - **Do not over-weigh the sunk cost of the existing architecture.** "It already exists and works" is not an argument for keeping a shape — coding agents make large architecture switches cheap, so size a refactor by the quality of the end state, not by the volume of code it replaces. When behavior must survive, pin it with tests at the consumer surface and swap the architecture underneath — though most of the time even the old seams shouldn't survive verbatim: a big refactor is the chance to redraw them into the shape the codebase would want today, not to faithfully rebuild the old interfaces on a new foundation. - Prefer one shared primitive over N adapters. An adapter is acceptable only at an external boundary or as a short-lived migration seam. - **Know what already exists before you build something new.** Before writing a new mechanism — a shape, computation, asset, state machine, data contract — search the codebase for one that already does this, or something close enough to share. Only once you know what's there can you make the real decision: reuse it, consolidate two near-duplicates, or extract the shared core into an independent module both call — and that decision belongs *before* you start, not bolted on after. Reuse is not automatically the answer; the existing thing may be wrong, or genuinely different, and then you build new deliberately. The failure this prevents is building in ignorance of what's already there: two implementations that must agree then silently drift, each re-deriving details the other already settled (orientation, units, edge cases, ordering). - Do not preserve dev-only compatibility by default. Unshipped scaffolding should move to the clean contract immediately. - Make ownership visible in stats, tests, or debug output when divergence was the bug class. - **A check that RE-DERIVES a value the code already computes will drift from it.** A test or second consumer that recomputes geometry, state, or a derived quantity independently can disagree with the code over a difference invisible on paper — an operation-order or rounding subtlety — and fire false verdicts. Export the owner's computed value and have the check consume that, so it enforces exactly what the code produced: one owner for the computation, not two that happen to mostly agree. - **A symmetric or featureless placeholder can hide an orientation or coordinate bug in the thing it stands in for.** A symmetric stand-in renders the same whether or not the coordinate frame is flipped, so the defect stays invisible until a real asymmetric asset exposes it. When you swap a placeholder for the real asset, re-verify orientation and framing, not just that it renders. - Update the spec or handoff with the new invariant, not the mechanical file list. - If the refactor starts widening into unrelated behavior, slice it: land the shared contract first, then port consumers in reviewable passes.
From Classified-AI-Core/skill-library, MIT.
More from Classified-AI-Core/skill-library
- 0.479score
prompt-improver
skeletorjs
Improve and optimize prompts for Claude using Anthropic's official best practices and the 5-Element Persona Framework.
SkillCFreshness: CClaude Code +9 - 0.476score
supermemory
skeletorjs
Long-term memory for AI agents via Supermemory's knowledge graph API.
SkillCFreshness: CClaude Code +9 - 0.475score
self-improvement
skeletorjs
AI self-improvement and reflection skill.
SkillCFreshness: CClaude Code +9 - 0.474score
close-spec
Classified AI
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it…
SkillCFreshness: CClaude Code +9 - 0.474score
premortem
Classified AI
Run a premortem on any plan, launch, product, hire, strategy, or decision.
SkillCFreshness: CClaude Code +9 - 0.474score
write-spec
Classified AI
Break large features into independently verifiable, human-reviewable slices under specs/<feature>/.
SkillCFreshness: CClaude Code +9 - 0.472score
share-skill
rc2.zo.computer
Safely prepare and guide skills for contribution to the Zo Skills Registry.
SkillCFreshness: CClaude Code +9 - 0.471score
simplify
skeletorjs
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality.
SkillCFreshness: CClaude Code +9 - 0.466score
plan-code-changes
0.zo.computer
Plan out code changes using a plan file.
SkillCFreshness: CClaude Code +9 - 0.448score
skill-creator
Anthropic
Guide for creating effective skills.
SkillCFreshness: CClaude Code +9 - 0.447score
brainstorming
Obra
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior.
SkillCFreshness: CClaude Code +9 - 0.442score
template-skill
Anthropic
A starter template for writing your own skill.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jul 23, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- www.classified.llc/resources
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Classified AI
- 0.474score
close-spec
Classified AI
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it…
SkillCFreshness: CClaude Code +9 - 0.474score
premortem
Classified AI
Run a premortem on any plan, launch, product, hire, strategy, or decision.
SkillCFreshness: CClaude Code +9 - 0.474score
write-spec
Classified AI
Break large features into independently verifiable, human-reviewable slices under specs/<feature>/.
SkillCFreshness: CClaude Code +9
Cite this page
refactor-clean skill. Agent Mart. https://agentmart.dev/skills/classified-ai-core-refactor-clean (last updated 2026-10-24)