code-quality
Skill0 starsChanged 4 months agoMITView on GitHub
Reviews cohesion, naming, responsibility, complexity, and maintainability. Do not use as a default companion to every code change.
We split this skill into the rules it gives an agent
14 rules. 0 are common, 13 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 66 edited versions we read keep these.
13
Distinctive
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 10
Keep code cohesive, explicit, maintainable, testable, and appropriately small.
- Distinctive: line 46
Avoid god objects, vague managers, and classes that are just bags of unrelated methods.
- Very specific: line 60
Do not create a utils, helpers, common, or misc dumping ground unless the repository already has that convention and the new code still has …
- Distinctive: line 68
Prefer package boundaries around:
- Distinctive: line 81
Do not mix transport, domain, persistence, configuration, and presentation concerns.
- Distinctive: line 87
Do not leak terms and invariants across contexts accidentally.
- Distinctive: line 93
Default thresholds for human-authored source:
- Distinctive: line 105
If a large file is unavoidable, document why and isolate growth behind clear sections or generated boundaries.
- Distinctive: line 109
Prefer simple, direct solutions.
- Distinctive: line 123
Avoid duplication of knowledge, not merely duplicated text.
- Distinctive: line 137
Prefer composition over unnecessary inheritance.
- Distinctive: line 141
Do not create abstractions with only imaginary future users.
- Distinctive: line 186
Use parser-aware tooling when the task depends on code structure rather than raw text:
- Distinctive: line 195
Do not use broad regex rewrites for syntax-sensitive changes when a structural tool is available and practical.
“Common” is measured: kept by at least 6 in 10 of the 66 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
Skill: code-quality
Purpose
Keep code cohesive, explicit, maintainable, testable, and appropriately small.
This skill encodes SOLID, KISS, DRY, YAGNI, cohesion, coupling, and size discipline as practical rules rather than motivational office posters.
Single Responsibility at Every Level
Function
A function should do one coherent thing.
A function is suspicious when it:
- validates input;
- performs I/O;
- applies domain rules;
- mutates persistence;
- formats output;
- logs business events;
- handles retries;
all in one place.
Split by responsibility, not by arbitrary line count.
Class / Type
A class/type should represent one role:
- domain state;
- lifecycle;
- policy;
- adapter;
- interface implementation;
- dependency grouping;
- stateful workflow.
Avoid god objects, vague managers, and classes that are just bags of unrelated methods.
File / Module
A file/module should have one cohesive theme.
A file is suspicious when it contains:
- unrelated domain concepts;
- mixed layers;
- many independent public entry points;
- repeated section headers needed to understand it;
- several classes that change for unrelated reasons.
Do not create a utils, helpers, common, or misc dumping ground unless the repository already has that convention and the new code still has a cohesive purpose.
Package / Component
A package/component should expose a clear public boundary.
It should not be a directory-shaped junk drawer.
Prefer package boundaries around:
- domain subareas;
- application use cases;
- infrastructure adapters;
- integration clients;
- UI/presentation areas;
- hardware responsibilities.
Layer
A layer should have one architectural responsibility.
Do not mix transport, domain, persistence, configuration, and presentation concerns.
Bounded Context
A bounded context should own one domain language and one model of reality.
Do not leak terms and invariants across contexts accidentally.
Size Limits
Human-authored 10k-line files are forbidden.
Default thresholds for human-authored source:
- function over 60 logical lines: suspicious;
- function over 100 logical lines: split or justify;
- class/type over 300 logical lines: suspicious;
- class/type over 500 logical lines: split or justify;
- file/module over 800 logical lines: split or justify;
- file/module over 1,500 logical lines: strong refactor candidate;
- file/module over 10,000 logical lines: unacceptable except generated/vendor/lock content.
Generated, vendored, lock, and machine-produced migration files may be exceptions.
If a large file is unavoidable, document why and isolate growth behind clear sections or generated boundaries. Better yet, do not make it unavoidable. Humanity has suffered enough.
KISS
Prefer simple, direct solutions.
Avoid:
- abstraction before evidence;
- clever generic code for one caller;
- framework-shaped code without a framework-sized problem;
- dynamic behavior that hides control flow;
- configuration-driven everything.
A 100-line TODO app should still be clean, typed, and testable. It does not need a fake enterprise architecture ceremony.
DRY
Avoid duplication of knowledge, not merely duplicated text.
Duplication is acceptable when:
- abstractions would hide important differences;
- two things are currently similar but likely to evolve separately;
- local clarity matters more than premature reuse.
Refactor duplication when it represents the same domain rule, validation rule, policy, protocol behavior, or integration contract.
SOLID as Practical Rules
- Keep units cohesive.
- Keep dependencies explicit.
- Prefer composition over unnecessary inheritance.
- Separate policies from mechanisms.
- Make extension possible without modifying unrelated behavior.
- Depend on stable abstractions when the architecture justifies them.
- Do not create abstractions with only imaginary future users.
Naming
Names should communicate domain meaning.
Prefer:
create_usersync_device_statetemperature_sensorretry_policycommand_handlerpayment_authorization
Avoid vague names:
do_stuffprocess_datahandle_thingmanagerhelperutilstempobj
Generic names are acceptable only when the scope is tiny and obvious.
Comments
Comments should explain why, not repeat what the code says.
Good comments explain:
- non-obvious constraints;
- protocol quirks;
- business rules;
- compatibility requirements;
- hardware behavior;
- security decisions.
Bad comments narrate obvious code.
Structural Search And Mechanical Changes
Use parser-aware tooling when the task depends on code structure rather than raw text:
ast-grepfor syntax-aware search, linting, and mechanical rewrites;tree-sitteror tree-sitter-backed tooling when grammar-level inspection is needed;rgfor broad text search andfdfor file discovery before slower alternatives.
Do not use broad regex rewrites for syntax-sensitive changes when a structural tool is available and practical.
Prohibited Quality Failures
- god files;
- god objects;
- hidden mutable globals;
- mystery side effects;
- fake TODO implementations;
- broad catch-and-ignore error handling;
- unrelated refactors during bug fixes;
- dependency additions for trivial code;
- public API changes without explicit intent.
Extended References
For deeper quality work, read the relevant documents:
../../engineering/06_responsibility_model.md../../engineering/07_complexity_budget.md../../engineering/08_engineering_smells.md../../engineering/10_antipattern_catalog.md../../engineering/12_naming_bible.md
Other versions73 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 73
- tursodatabase/turso★ 25ksame name
- superdesigndev/treg★ 7ksame name
- doorkeeper-gem/doorkeeper★ 5.5ksame name
- static-web-server/static-web-server★ 2.4ksame name
- piomin/claude-ai-spring-boot★ 1.4ksame name
- microsoft/winappCli★ 1.4ksame name
- glommer/pgmicro★ 1.2ksame name
- vm0-ai/vm0★ 1.2ksame name
- rommapp/argosy-launcher★ 650same name
- waybarrios/opencode-power-pack★ 547same name
63 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.
Used alongsideProjects with it also use spring-boot, logging-patterns and 7 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.
ffsshhttiikkSkillspring-boot
Spring Boot framework and Java enterprise patterns
Also in 3 projects that use this
DIL8654Skilllogging-patterns
Keep logs structured, correlated, low-noise, and safe for production support. Use when adding operational logging, reviewing observability, or improving diagnostics in .NET services.
Also in 3 projects that use this
mstuder-slalomSkilljpa-patterns
JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.
Also in 3 projects that use this
ffsshhttiikkSkilldesign-patterns
Practical application and coding skills for Design Patterns
Also in 4 projects that use this
glommerSkillpr-workflow
General guidelines for Commits, formatting, CI, dependencies, security
Also in 4 projects that use this
vm0-aiSkillcli-design
Design patterns and conventions for the Okou CLI user experience
Also in 3 projects that use this
In this repository62 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-ui-reviewSkill
- agent-retrospectiveSkill
- agents-md-retrospectiveSkill
- agent-squadSkill
- architecture-mapSkill
- architecture-normalizerSkill
- architecture-principlesSkill
- authz-boundary-reviewSkill
- c-cppSkill
- code-reviewSkill
- code-to-figmaSkill
- code-wiki-ruSkill
- context-packSkill
- core-engineeringSkill
- debuggingSkill
- dependency-advisory-auditSkill
- deserialization-parser-reviewSkill
- design-system-extractorSkill
- documentationSkill
- engineering-standardsSkill
- esp32Skill
- esphomeSkill
- external-agent-pack-auditSkill
- fastSkill
- figma-to-codeSkill
- fix-security-findingSkill
- goSkill
- homeassistantSkill
- mcp-tool-routerSkill
- migration-plannerSkill
- mobile-qaSkill
- multi-agent-pr-reviewSkill
- performanceSkill
- playwright-visual-qaSkill
- pythonSkill
- quality-gatesSkill
- refactoringSkill
- responsive-breakpoint-checkSkill
- review-routerSkill
- rustSkill
- secrets-and-config-reviewSkill
- security-diff-reviewSkill
- security-routerSkill
- securitySkill
- session-memorySkill
- specialist-dispatchSkill
- subagent-result-mergeSkill
- supply-chain-reviewSkill
- tdd-guardSkill
- testing-tddSkill
- threat-modelSkill
- typescriptSkill
- ui-buildSkill
- ui-business-appsSkill
- ui-concept-firstSkill
- ui-figmaSkill
- ui-qaSkill
- ui-researchSkill
- ui-routerSkill
- The first 60 shown.
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.

