architecture
Skill2 starsChanged 4 months agoMITView on GitHub
Design, review, and refactor production-grade file and folder structures plus dependency boundaries for frontend, backend, full-stack, monorepo, modular-monolith, and service-based applications. Use when scaffolding a new application; deciding where code belongs; organizing code by domain or feature; separating apps, packages, infrastructure, tests, generated code, and public APIs; cleaning up a messy repository; defining ownership and module boundaries; planning a safe structural migration; or assessing whether an architecture can scale. Apply framework-native conventions and synthesize public patterns from large engineering organizations without claiming access to their proprietary internal layouts.
82 other projects use a version of this.
Adopted by
Most recently taken up by
- MagicJosh/rastheir own version, first seen Oct 6, 2026
- wellwelwel/lagunetheir own version, first seen Oct 4, 2026
- patrickjaja/claude-desktop-extratheir own version, first seen Oct 4, 2026
- fabiandistler/agentstheir own version, first seen Sep 30, 2026
- afonsoft/skillstheir own version, first seen Sep 30, 2026
- rafaelh/skillstheir own version, first seen Sep 30, 2026
Used with
Projects with it also use deployment-procedures, behavioral-modes 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.
xfstudioSkilldeployment-procedures
Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.
Also in 5 projects that use this
xfstudioSkillbehavioral-modes
AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
Also in 4 projects that use this
tiendatworkSkill2d-games
2D game development principles. Sprites, tilemaps, physics, camera.
Also in 3 projects that use this
tiendatworkSkill3d-games
3D game development principles. Rendering, shaders, physics, cameras.
Also in 3 projects that use this
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
- +1 more from xfstudio
- +5 more from tiendatwork
Other versions82 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 82
- iOfficeAI/AionUi★ 33ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- ktnyt/cclsp★ 675same name
- patrickjaja/claude-desktop-extra★ 657same name
- FerroxLabs/wayland★ 608same name
- owainlewis/blueprint★ 410same name
- microsoft/powerplatform-build-tools★ 308same name
- techygarg/lattice★ 197same name
- sd0xdev/sd0x-harness★ 191same name
- wellwelwel/lagune★ 172same name
72 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 repository4 other files it gives its agents.
- build-design-systemSkill
- gauntletSkill
- hero-fxSkill
- saas-playbookSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 24 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 74 edited versions we read keep these.
24
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 8
Treat the directory tree as a map of runtime boundaries, ownership, and allowed dependencies.
- Distinctive: line 16
Keep code with the feature, team, test suite, and deployment unit that change together.
- Distinctive: line 18
Keep entry points, routes, controllers, and framework adapters thin.
- Distinctive: line 20
Prefer a well-bounded modular monolith until independent deployment, scaling, reliability, security, or ownership requirements justify …
- Distinctive: line 21
Use the shallowest tree that preserves meaningful boundaries.
- Distinctive: line 30
Read local instructions and architecture records.
- Distinctive: line 42
Use a single application repository for one deployable with little reusable code.
- Distinctive: line 43
Use a modular monolith for a growing backend with several business capabilities but one practical deployment boundary.
- Distinctive: line 44
Use a monorepo when multiple apps or packages require atomic changes, shared tooling, and coordinated dependency management.
- Distinctive: line 45
Use multiple repositories or services only when independent lifecycle or access boundaries outweigh coordination cost.
- Distinctive: line 47
Read repository-topologies.md before choosing or changing repository topology.
- Distinctive: line 63
Read core-principles.md for dependency rules, scale calibration, naming, tests, and enforcement.
- Distinctive: line 70
When citing or deliberately borrowing large-company practices, read public-patterns.md.
- Distinctive: line 76
When asked for a recommendation, return:
- Distinctive: line 88
When asked to change code:
- Distinctive: line 91
Update imports, package/build declarations, aliases, tests, fixtures, ownership files, and documentation in the same change.
- Distinctive: line 92
Add compatibility exports or adapters when a staged migration needs them.
- Distinctive: line 93
Avoid mixing structural moves with unrelated behavior changes.
- Distinctive: line 94
Remove obsolete paths only after callers migrate.
- Distinctive: line 98
Run the repository's formatter, type checker, tests, build, and architecture rules.
- Distinctive: line 100
no unexpected dependency cycles or deep imports into module internals.
- Distinctive: line 105
every deployable has an obvious entry point, configuration boundary, health/observability integration, and test path.
- Distinctive: line 109
If automated boundary tooling is unavailable, document a simple import rule and add the narrowest lint, build, or test enforcement the …
- Distinctive: line 124
Do not approve a structure merely because its tree looks tidy.
“Common” is measured: kept by at least 6 in 10 of the 74 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
Architecture
Treat the directory tree as a map of runtime boundaries, ownership, and allowed dependencies. Optimize for the next maintainer finding and changing code safely, not for visual symmetry.
Apply these rules
- Preserve repository instructions, framework-reserved paths, build-tool conventions, and established domain language unless a change has a concrete payoff.
- Group product code primarily by business capability or feature. Use technical layers inside a capability when they clarify dependency direction.
- Give every module one purpose, one public surface, and private implementation details.
- Make dependencies explicit, acyclic, and enforceable. Do not rely on folders alone.
- Keep code with the feature, team, test suite, and deployment unit that change together.
- Promote code to shared space only after genuine reuse and stable semantics exist.
- Keep entry points, routes, controllers, and framework adapters thin. Put decisions in application or domain modules.
- Separate generated artifacts, migrations, fixtures, operational configuration, and source code.
- Prefer a well-bounded modular monolith until independent deployment, scaling, reliability, security, or ownership requirements justify services.
- Use the shallowest tree that preserves meaningful boundaries. Do not create one-file directories or speculative abstractions.
- Describe recommendations as a synthesis of public practices. Never present a sample tree as “the Google structure” or “the Meta structure.”
Follow the workflow
1. Discover constraints
For an existing repository:
- Read local instructions and architecture records.
- Inspect the tree, manifests, workspace/build configuration, import aliases, entry points, routes, persistence code, tests, deployment files, and ownership rules.
- Identify the framework's mandatory structure and the repository's current dependency direction.
- Find code that changes together, duplicated “shared” code, cross-boundary imports, cycles, oversized directories, and ambiguous names.
- Preserve unrelated user changes.
For a greenfield repository, infer only reversible defaults. Ask about a missing constraint only when it would materially change repository topology, deployment boundaries, data ownership, or framework choice.
2. Select a topology
Choose the smallest topology that fits:
- Use a single application repository for one deployable with little reusable code.
- Use a modular monolith for a growing backend with several business capabilities but one practical deployment boundary.
- Use a monorepo when multiple apps or packages require atomic changes, shared tooling, and coordinated dependency management.
- Use multiple repositories or services only when independent lifecycle or access boundaries outweigh coordination cost.
Read repository-topologies.md before choosing or changing repository topology.
3. Define boundaries before names
For each proposed module, state:
- responsibility and owning business capability;
- public API or entry point;
- private implementation area;
- owned state, schema, or external integration;
- allowed incoming and outgoing dependencies;
- test boundary;
- runtime and deployment boundary, if any.
Resolve unclear ownership before inventing directories. Use domain terms such as billing, catalog, or identity; avoid vague buckets such as common, helpers, misc, or manager.
Read core-principles.md for dependency rules, scale calibration, naming, tests, and enforcement.
4. Adapt the concrete layout
- For browser, mobile-web, React, Vue, Angular, Svelte, or route-driven UI work, read frontend.md.
- For APIs, workers, jobs, modular monoliths, event consumers, or services, read backend.md.
- For full-stack work, read both references and then place deployables and reusable packages using repository-topologies.md.
- When citing or deliberately borrowing large-company practices, read public-patterns.md.
Adapt examples to the detected language and framework. Do not force a generic src/ tree over conventions such as Next.js route segments, Rails engines, Django apps, Go packages, Java source sets, or .NET projects.
5. Produce or implement the result
When asked for a recommendation, return:
- assumptions and constraints;
- the selected topology and why;
- an annotated target tree;
- allowed and forbidden dependency directions;
- public module surfaces and ownership;
- testing, configuration, generated-code, and operational placement;
- trade-offs and rejected alternatives;
- an incremental migration sequence for existing code;
- automated enforcement to prevent regression.
When asked to change code:
- Move one coherent boundary at a time.
- Update imports, package/build declarations, aliases, tests, fixtures, ownership files, and documentation in the same change.
- Add compatibility exports or adapters when a staged migration needs them.
- Avoid mixing structural moves with unrelated behavior changes.
- Remove obsolete paths only after callers migrate.
6. Validate
Run the repository's formatter, type checker, tests, build, and architecture rules. Also verify:
- no unexpected dependency cycles or deep imports into module internals;
- production code does not depend on test helpers;
- shared code does not depend on product features;
- backend domain/application code does not depend directly on delivery frameworks;
- frontend shared UI does not own feature workflows;
- every deployable has an obvious entry point, configuration boundary, health/observability integration, and test path;
- generated output and secrets are not treated as hand-maintained source;
- the resulting tree remains navigable without empty placeholder layers.
If automated boundary tooling is unavailable, document a simple import rule and add the narrowest lint, build, or test enforcement the stack supports.
Review rubric
Judge a structure by these questions:
- Can a new contributor identify where a feature starts within a minute?
- Can a feature be changed without editing unrelated global buckets?
- Can module internals change without breaking callers?
- Does the dependency graph match the intended architecture?
- Are ownership, state, tests, and operations located near the code they govern?
- Can a module grow, split, or be extracted without a repository-wide rewrite?
- Is every shared abstraction backed by real consumers?
- Does framework upgrade guidance still apply without fighting the layout?
Do not approve a structure merely because its tree looks tidy. Approve it when boundaries are understandable, dependencies are controlled, and routine changes stay local.
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.

