architecture-quality
Skill213 starsChanged 3 days agoMITView on GitHub
Keep web applications, APIs and services readable as they grow: choose feature or domain seams, assign state ownership, enforce dependency direction, keep adapters thin, and verify file shape. Use when starting or extending a web app, backend, frontend, API or multi-page product; when a change makes a module hard to read; when architecture review finds a god file, cross-feature imports, a circular dependency or a framework-heavy domain. Load architecture-first first for a new system, and refactoring-safely for an existing oversized module. Do not use for a one-file script, throwaway spike or a purely local naming change.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Before a non-trivial web or service change, record these five facts in ARCHITECTURE.md or docs/architecture/README.md:
- Distinctive: line 36
If the project is a small script or a single-module experiment, state that scope and skip the document.
- Distinctive: line 42
Keep routes/controllers thin: parse input, call a use-case or feature API, map the result and return.
- Distinctive: line 44
Keep domain/use-case code framework-free where practical.
- Very specific: line 50
Treat a utils or common import that keeps growing as a boundary question.
- Distinctive: line 52
Prefer a modular monolith until an independently deployable or scalable boundary is proven.
- Distinctive: line 57
Run the repository audit before broadening a new app and after a structural change:
- Distinctive: line 85
Do not install all four. Pick one boundary mechanism, commit its rules, and run it in the same CI lane as the tests that prove the behavior.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Architecture quality — readable by construction
This skill turns the architecture decision into a small, repeatable delivery
contract. It complements architecture-first; it does not add layers for their own
sake.
Working contract
Before a non-trivial web or service change, record these five facts in
ARCHITECTURE.md or docs/architecture/README.md:
- Feature/domain modules — name them by reason to change, not by a generic
utils,helpersorservicesbucket. - Ownership — each mutable state, database table boundary and external side effect has one owner.
- Dependency direction — policy/domain code is independent of the web framework, ORM, queue and filesystem; adapters point inward through small ports.
- Vertical slice — prove one user-visible path from entry point to state and test before multiplying layers or pages.
- Verification boundary — list the architecture checks and the test command that must remain green after the change.
If the project is a small script or a single-module experiment, state that scope and skip the document. A missing document is a finding only once the project has enough shape to need one, not a reason to create ceremony around a toy.
Web application shape
- Keep routes/controllers thin: parse input, call a use-case or feature API, map the result and return. Do not put business policy, SQL and provider retries in a route.
- Keep domain/use-case code framework-free where practical. Inject ports for storage, clocks, queues and providers; keep concrete adapters at the edge.
- Organize user-facing behavior by feature or bounded context. A page may compose features, but one feature must not reach into another feature's private state.
- Give each page a stable route-level composition boundary. Shared UI primitives are visual primitives, not a second business-logic layer.
- Treat a
utilsorcommonimport that keeps growing as a boundary question. Move code to the module that owns its reason to change; do not create a universal bag. - Prefer a modular monolith until an independently deployable or scalable boundary is proven. A microservice split is not a substitute for a missing internal boundary.
Shape checks
Run the repository audit before broadening a new app and after a structural change:
python "${CLAUDE_PLUGIN_ROOT}/scripts/architecture_audit.py" --root .The audit is intentionally conservative. It reports, rather than invents, findings:
- a sizeable application with no
ARCHITECTURE.mdor architecture directory; - a source file crossing the calibrated shape thresholds;
- an explicitly declared project marker without a readable architecture anchor.
The live module-shape-advisor.py hook repeats the file-shape check after
Write|Edit|MultiEdit in both Codex and Claude. It is advisory: acknowledge the
finding, split at an ownership boundary, or record why the file is intentionally
large. CLAUDE_ALLOW_BIG_MODULES=1 is an explicit, reviewable escape hatch, not a
default.
For dependency rules, use the tool native to the stack when the project has earned it:
- Python:
import-lintercontracts for allowed import direction; - JavaScript/TypeScript:
dependency-cruiserfor cycles, orphans and forbidden folder edges; - Java:
ArchUnitarchitecture tests alongside unit tests; - C/C++: compiler/include tooling plus explicit CMake target boundaries; do not infer a domain architecture from a raw include graph alone.
Do not install all four. Pick one boundary mechanism, commit its rules, and run it in the same CI lane as the tests that prove the behavior.
Review questions
- Can a new feature be changed without editing an unrelated feature's internals?
- Does a route, page or controller own policy that belongs inside a use-case/domain?
- Is state ownership named, or are modules reaching into shared mutable objects?
- Are imports crossing a documented boundary? If yes, is the exception recorded with a reason and expiry?
- Is the file becoming large because one change is crossing multiple reasons to change? If yes, split the seam before adding more behavior.
- Did the change update the architecture document and the focused architecture/test evidence together?
Gotchas
- Folders are not boundaries. Moving files without changing imports or ownership only makes the same coupling harder to see.
- Thin controllers can still hide a fat service. Inspect the next boundary; a
generic
ApplicationServiceis often a god module with a nicer name. - A metric is a signal, not a verdict. Generated code, migrations and large declarative tables need explicit exemptions; production logic needs an explanation before an exemption.
- Microservices can multiply unreadability. Network boundaries add failure, deployment and observability costs; prove the module boundary first.
Troubleshooting
| Symptom | Likely cause | Action |
| The audit reports a missing architecture anchor | An app marker and several source files exist, but the boundary is implicit | Write the small module/ownership/dependency map before adding more features |
module-shape-advisor reports a large file | Local edits accumulated in one ownership boundary | Add characterization tests, split one named slice, then rerun the audit |
| A cycle appears | Two modules own part of the same concept or one imports an implementation detail | Move the concept behind an inner port or extract a genuinely shared concept |
| Every change touches many folders | Layer-first layout scatters a feature across technical layers | Recut the next slice by feature; migrate incrementally with tests |
| The guard is noisy on generated code | The file is outside the built-in exemption list | Add a narrow, documented project exemption; do not silence the whole hook |
Other versions1 project uses a version of this.
Word for word · 1
- AnastasiyaW/codex-claude-code-config★ 213100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-harness-designSkill
- agents-best-practicesSkill
- diffusion-engineeringSkill
- flux2-klein-promptingSkill
- flux2-lora-trainingSkill
- forensic-prompt-compilerSkill
- ml-research-labSkill
- notebooklm-grounded-researchSkill
- vlm-segmentationSkill
- feature-newSkill
- harness-designSkill
- layer-newSkill
- plan-swarm-reviewSkill
- pixel-art-storyboardSkill
- pixel-art-studioSkill
- architecture-firstSkill
- bug-reproducerSkill
- code-complexitySkill
- control-cliSkill
- control-uiSkill
- deep-reviewSkill
- deslopSkill
- distill-feedbackSkill
- harness-feedbackSkill
- proof-verifySkill
- refactoring-safelySkill
- repo-mapSkill
- root-cause-deliverySkill
- system-and-data-designSkill
- testing-strategySkill
- thermo-nuclear-code-quality-reviewSkill
- verify-thisSkill
- workflow-orchestrationSkill
- frontend-designSkill
- motion-framerSkill
- ui-designSkill
- ui-ux-pro-maxSkill
- ios-developmentSkill
- lean-codeSkill
- cross-harness-continuationSkill
- deepseek-provider-contractSkill
- desktop-sessions-discoverySkill
- epistemic-challengeSkill
- gemini-delegateSkill
- harness-auditSkill
- observability-monitoringSkill
- remote-compute-opsSkill
- plan-to-ticketsSkill
- product-meaning-extractorSkill
- remotion-production-guideSkill
- script-evaluatorSkill
- video-narrative-arcSkill
- video-post-productionSkill
- article-structure-reviewSkill
- cavemanSkill
- humanize-englishSkill
- humanize-russianSkill
- owner-voiceSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

