code-quality
Skill4 starsChanged 5 months agoMITView on GitHub
Writing and reviewing maintainable, correct code in any language. Use when writing new modules, reviewing code, refactoring, naming things, handling errors, or when the user says "clean this up", "code quality", "review this", "refactor", "is this good code", or "best practices".
38 other projects use a version of this.
Adopted by
Most recently taken up by
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- hodstack/hodstacktheir own version, first seen Oct 1, 2026
- AhmedAbdelfattah0/AI-Skillstheir own version, first seen Sep 28, 2026
- notque/vexjoy-agenttheir own version, first seen Sep 26, 2026
- yogvidwankhede/vishwakarmatheir own version, first seen Sep 26, 2026
- mthines/agent-skillstheir own version, first seen Sep 25, 2026
Used with
Projects with it also use spring-boot, design-patterns and 10 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.
MindrallySkillspring-boot
Expert guidance for Spring Boot application development with best practices for RESTful APIs, testing, security, and deployment
Also in 3 projects that use this
ratacatSkilldesign-patterns
Use when designing software architecture, refactoring code structure, solving recurring design problems, or when code exhibits symptoms like tight coupling, rigid hierarchies, scattered responsibilities, or difficult-to-test components. Also use when choosing between architectural approaches or reviewing code for structural improvements.
Also in 3 projects that use this
rogue-dev-studioSkillpython
Python 3.13 with uv package manager via mise. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `python` work when listed in TEAM.yaml or explicitly requested.
Also in 3 projects that use this
0xSeroSkillsecurity
Also in 4 projects that use this
BlockSkilldebugging
Debugging guidelines and best practices
Also in 3 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 3 projects that use this
Other versions38 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 38
- piomin/claude-ai-spring-boot★ 1.3ksame name
- microsoft/winappCli★ 1.3ksame name
- waybarrios/opencode-power-pack★ 531same name
- notque/vexjoy-agent★ 424same name
- instructa/agent-skills★ 139same name
- hodstack/hodstack★ 70same name
- fagemx/edda★ 36same name
- georgekhananaev/claude-skills-vault★ 28same name
- sordi-ai/skill-everything★ 20same name
- PracticalSwan/agent-skills★ 18same name
28 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 repository23 other files it gives its agents.
- ai-agent-designSkill
- ai-build-qualitySkill
- ai-engineeringSkill
- api-contract-designSkill
- architecture-designSkill
- change-hygieneSkill
- database-designSkill
- data-privacy-complianceSkill
- dependency-disciplineSkill
- deployment-safetySkill
- docs-and-runbooksSkill
- legacy-code-changesSkill
- observability-readinessSkill
- payments-and-moneySkill
- performance-improvementSkill
- product-ux-qualitySkill
- release-readinessSkill
- requirements-to-specSkill
- root-cause-debuggingSkill
- saas-multi-tenancySkill
- system-designSkill
- testing-strategySkill
- threat-model-securitySkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 37 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Delete commented-out code on sight.
- Distinctive: line 50
Never mix refactoring and behavior change in one commit.
- Distinctive: line 52
Leave the campsite cleaner, but stay in the campsite: fixing everything you touch turns a 10-line PR into a 500-line hostage situation.
“Common” is measured: kept by at least 6 in 10 of the 37 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Quality
Code quality is not aesthetics. It is one measurable thing: how fast can the next person (human or AI) change this code without breaking it? Every rule below serves that.
The hierarchy — when rules conflict, higher wins
- Correct — handles the real input space, including the ugly parts (empty, null, duplicate, concurrent, huge, malformed).
- Honest — the code's names, types, and structure tell the truth about what it does. No function named
validatethat also saves. - Changeable — the next likely change touches one place.
- Consistent — matches the codebase around it. A "better" pattern that fights the codebase is worse.
- Small/clever/fast — last, and only with evidence it matters.
Writing rules
Shape
- Functions do one thing at one level of abstraction. The test: can you name it accurately without "and"? Length is a symptom, not the rule — a 40-line straight-line function beats 5 fragmented ones you must chase.
- Depth over surface: prefer few functions with real behavior over layers of one-line delegation. Every hop a reader must follow is a cost; charge it against real value.
- Data shapes beat control flow: replacing an if/else ladder with a lookup table, an enum with exhaustive matching, or a well-typed state object usually deletes bugs. Make illegal states unrepresentable where the type system allows.
Names
- Names carry the spec:
retry_delay_secondsnotdelay;is_eligible_for_creditnotcheck. If a good name is impossible, the abstraction is wrong. - Booleans read as assertions (
is_,has_,can_); functions as verbs; avoid negated booleans (not_disabled) that force double negation.
Errors — where most "quality" issues actually live
- Handle or propagate, never swallow. An empty catch block is a bug with extra steps; catching broad
Exceptionto log-and-continue hides corruption. - Fail fast at boundaries: validate inputs where they enter (API edge, file load, config boot), then the interior trusts its inputs. Validation sprinkled everywhere means it's guaranteed nowhere.
- Error messages state what failed, with what input, and what the caller can do — written for the debugging session at 2 a.m.
- Distinguish expected failures (user error → typed error/result, clean message) from bugs (invariant broken → crash loudly). Converting bugs into handled errors hides them.
State & dependencies
- Minimize mutable state; minimize its scope; make mutation obvious. Global mutable state is guilty until proven innocent.
- Side effects live at the edges; the core computes. A function that computes AND writes AND notifies is three functions wearing a trenchcoat.
- Take dependencies explicitly (parameters/constructor), not by reaching into globals — this is what makes code testable without patching.
Comments
- Comment why, never what: constraints, non-obvious reasons, links to the decision. If the code needs a what-comment, rewrite the code.
- Delete commented-out code on sight; git remembers.
Duplication — the nuanced rule
Duplication is cheaper than the wrong abstraction. Extract when the copies must change together for the same reason (shared business rule); keep copies when they merely look alike today (two forms with similar fields). Rule of three: tolerate two, refactor at three — and when you extract, extract the concept, not the coincidence.
Refactoring discipline
- Never mix refactoring and behavior change in one commit; reviewers can verify "no behavior change" or "this specific change", not both at once.
- Refactor with a safety net (tests or at least a manual golden-path check), in steps that each keep the build green.
- Leave the campsite cleaner, but stay in the campsite: fixing everything you touch turns a 10-line PR into a 500-line hostage situation.
Reviewing code (yours or others')
- First pass — intent: does this change do what was asked, and only that? Flag scope creep and silent behavior changes.
- Second pass — the input space: walk empty/null/zero/negative/duplicate/huge/concurrent/unauthorized through every new path.
- Third pass — the seams: every external call (time, network, disk, DB) — what happens when it's slow, fails, or returns garbage?
- Report defects as: input → wrong behavior → consequence. Rank by severity. Style nits go last, batched, and never block correctness discussion.
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.

