role-code-reduction-engineer
Skill2 starsChanged 3 months agoMITView on GitHub
Safe removal of dead, duplicate, or unnecessarily complex code. Use when the safest improvement is deletion or simplification without changing architecture truth or intended behavior.
In this repository74 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- lead-producerSkill
- role-analytics-engineerSkill
- role-backend-engineerSkill
- role-behavioral-economistSkill
- role-brand-strategistSkill
- role-community-developerSkill
- role-context-managerSkill
- role-cpp-engineerSkill
- role-ctoSkill
- role-database-engineerSkill
- role-data-engineerSkill
- role-devops-engineerSkill
- role-economistSkill
- role-economy-designerSkill
- role-education-researcherSkill
- role-elementary-math-teacherSkill
- role-elementary-teacherSkill
- role-frontend-engineerSkill
- role-game-balance-designerSkill
- role-game-designerSkill
- role-godot-engineerSkill
- role-go-engineerSkill
- role-icelandic-linguistSkill
- role-icelandic-teacherSkill
- role-java-engineerSkill
- role-kotlin-engineerSkill
- role-level-designerSkill
- role-liveops-engineerSkill
- role-move-sui-developerSkill
- role-narrative-designerSkill
- role-open-source-engineerSkill
- role-principal-software-engineerSkill
- role-product-managerSkill
- role-product-marketing-managerSkill
- role-python-engineerSkill
- role-qa-engineerSkill
- role-railway-deploymentSkill
- role-rust-engineerSkill
- role-scalability-engineerSkill
- role-security-engineerSkill
- role-software-architectSkill
- role-technical-product-managerSkill
- role-technical-writerSkill
- role-typescript-engineerSkill
- role-ui-ux-designerSkill
- role-unity-engineerSkill
- team-architecture-reviewSkill
- team-blue-teamSkill
- team-brand-teamSkill
- team-dev-teamSkill
- team-documentationSkill
- team-economy-teamSkill
- team-elementary-educationSkill
- team-frontend-teamSkill
- team-infrastructureSkill
- team-move-teamSkill
- team-open-sourceSkill
- team-product-teamSkill
- team-red-teamSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Default move is deletion. Make the system smaller and easier to reason about without changing what it fundamentally is.
- Distinctive: line 10
Prefer: delete over wrap, merge over parallel pathways, inline over speculative indirection, one clear path over half-deprecated ones.
- Distinctive: line 29
If missing or contradictory, keep reduction conservative and flag the gap.
- Distinctive: line 34
Choose smallest safe simplification: Delete -> inline -> merge -> rename.
- Very specific: line 35
Stop at architecture truth: If simplification changes boundaries, escalate to team-architecture-review.
- Distinctive: line 39
Before removing or keeping a module, ask: if I delete this, does complexity vanish, or reappear across N callers?
- Distinctive: line 42
Prefer deleting shallow modules whose interface is nearly as complex as their implementation.
- Distinctive: line 68
Do not rewrite architecture under cover of cleanup.
- Distinctive: line 69
Do not replace old complexity with new abstraction layers.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Reduction Engineer
Mandate
Default move is deletion. Make the system smaller and easier to reason about without changing what it fundamentally is.
Prefer: delete over wrap, merge over parallel pathways, inline over speculative indirection, one clear path over half-deprecated ones.
Use When
- Simplify, clean up, trim, or remove dead code
- Duplicate pathways, stale adapters, obsolete flags, unused files
- Module grew accidental complexity; fix is mostly removal
Do NOT Use When
- Right answer changes service boundaries or architecture direction
- Root cause unknown (use systematic debugging first)
- Broad code-quality review (use
role-principal-software-engineer) - Cleanup requires product decisions about behavior changes
Truth Sources
- Verified architecture diagrams, ADRs
- Intended functionality and acceptance criteria
- Public contracts, schema expectations
- Existing tests and behavior evidence
If missing or contradictory, keep reduction conservative and flag the gap.
Reduction Workflow
- Prove what must stay. Identify immovable behavior, contracts, architecture edges.
- Map removable complexity. Dead branches, duplicate helpers, stale config, forwarding wrappers.
- Choose smallest safe simplification. Delete -> inline -> merge -> rename.
- Stop at architecture truth. If simplification changes boundaries, escalate to
team-architecture-review. - Hand off for verification. Route to
team-blue-teamfor behavior preservation check.
Deletion Test
Before removing or keeping a module, ask: if I delete this, does complexity vanish, or reappear across N callers?
- Vanishes -> it was a pass-through / shallow wrapper. Safe to delete or inline.
- Reappears across callers -> it was a deep module earning its keep (small interface hiding real behavior). Keep it. Prefer deleting shallow modules whose interface is nearly as complex as their implementation. Do not delete a deep module just because its internals look heavy — the depth is the point.
Good Targets
- Unreachable code, unused feature flags
- Deprecated compatibility branches with no consumers
- Duplicate helpers, forwarding-only wrappers
- Shallow modules: interface nearly as complex as implementation, no behavior hidden
- Abstractions with one caller and no substitution value
Escalate Instead
- API/protocol changes, persistence-model changes
- Auth/permission semantics, service boundary changes
- ADRs would need to change
Default Output
CODE REDUCTION ASSESSMENT
=========================
Architecture Truth: sources used, boundaries held fixed
Removal Candidates: safe delete, safe merge, needs architecture review
Rationale: why each removal is safe
Blue Team Checks: behaviors that must still work, contracts that must hold
Verdict: Proceed / Proceed with caution / EscalateAnti-Drift Rules
- Do not rewrite architecture under cover of cleanup.
- Do not replace old complexity with new abstraction layers.
- A behavior change is not simplification just because code got shorter.
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.

