code-smells
Skill1 starsChanged 39 days agoMITView on GitHub
Named code smell baseline for reviewing changed code, from Fowler's Refactoring chapter 3. Referenced by pr-reviewer and the per-stack reviewer skills. Use when reviewing a diff for design problems the linter cannot name.
4 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- dmoreq/agent-grimoiretheir own version, first seen Nov 8, 2026
- ROCm/rocprofiler-systems-skillstheir own version, first seen Oct 27, 2026
- clinton3141/skillsedited, first seen Oct 25, 2026
- barlevysh/code-smells-skilltheir own version, first seen Apr 11, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- clinton3141/skills★ 015% same
Wrote their own version · 3
- barlevysh/code-smells-skill★ 7same name
- ROCm/rocprofiler-systems-skills★ 5same name
- dmoreq/agent-grimoire★ 0same name
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 repository38 other files it gives its agents.
- agent-conductSkill
- bugfixSkill
- deliverSkill
- final-responseSkill
- frontend-designSkill
- go-conventionsSkill
- go-implementorSkill
- go-reviewerSkill
- go-test-strengthSkill
- implementation-principlesSkill
- nextflow-conventionsSkill
- nextflow-implementorSkill
- nextflow-reviewerSkill
- nextjs-fastapi-conventionsSkill
- nextjs-fastapi-implementorSkill
- nextjs-fastapi-reviewerSkill
- orchestratorSkill
- phase-creatorSkill
- phase-reviewerSkill
- prose-principlesSkill
- pr-resolverSkill
- pr-reviewerSkill
- python-conventionsSkill
- python-implementorSkill
- python-reviewerSkill
- spec-authorSkill
- spec-proofreaderSkill
- spec-reviewerSkill
- spec-writerSkill
- subagentsSkill
- swift-conventionsSkill
- swift-implementorSkill
- swift-reviewerSkill
- testing-principlesSkill
- tightenSkill
- unslopSkill
- verificationSkill
- writing-for-agentsSkill
The file
Files
Code Smells Skill
A fixed set of named smells to match against changed code, so a review can name a design problem precisely instead of gesturing at it. Use alongside implementation-principles, which owns the rules about reuse, abstraction, and refactoring scope.
Two Binding Rules
- The project's conventions win. Where the project's conventions skill endorses something this list would flag, the convention decides. Skip anything the project's linter or type checker already enforces.
- Every entry is a judgement call. Report a hit as "possible feature envy" with the hunk quoted, not as a violation. A smell blocks a review only when it breaks a documented convention or a rule in implementation-principles.
The Baseline
- Mysterious name. A function, variable, or type whose name does not reveal what it does or holds. Rename it. If no honest name comes, the design is unclear.
- Duplicated code. The same logic shape in more than one place in the change. Extract it and call it from both, but only when both are the same responsibility (see implementation-principles on forced DRY).
- Feature envy. A function that reaches into another type's data more than its own. Move it onto the data it uses.
- Data clumps. The same few fields or parameters travelling together. Bundle them into one type and pass that.
- Primitive obsession. A string, int, or map standing in for a domain concept that deserves its own type.
- Repeated switches. The same branch on the same type recurring across the change. Replace it with one dispatch point that every site shares.
- Shotgun surgery. One logical change forcing scattered edits across many files. Gather what changes together.
- Divergent change. One file edited for several unrelated reasons. Split it so each part changes for one reason.
- Speculative generality. Abstraction, parameters, or hooks for needs no current requirement has. Delete it, and inline back until a real need appears.
- Message chains.
a.b().c().d()navigation the caller should not depend on. Hide the walk behind one call on the first object. - Middle man. A type or function that mostly delegates onward. Call the real target.
- Refused bequest. A subclass or implementer that ignores or overrides most of what it inherits. Use composition.
Reporting
For each hit, give the file and lines, the smell's name, and the concrete fix. Group smells below spec and correctness findings: they are design feedback, not defects.
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.

