agentleFS
saint0xsaint0x/my-skills/new-project-architecture/SKILL.md

new-project-architecture

Skill1 starsChanged 3 months agoMITView on GitHub

Define and enforce production-grade architecture for a new greenfield project or a major structural refactor. Use when Codex needs to choose the project skeleton, directory layout, module boundaries, file decomposition, naming conventions, README shape, and implementation standards for an app, service, library, API, full-stack system, or internal tool where maintainability, scalability, and real production readiness matter more than quick placeholder code.

The file

Show its rules and text

We split this skill into the rules it gives an agent

30 rules. About 0 are common, 28 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈28

    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
  1. Distinctive:

    Use this skill to set the architecture correctly from the first commit.

    line 8
  2. Distinctive:

    Default to real production structure, not demo structure.

    line 10
  3. Distinctive:

    Do not introduce placeholder, fake, or knowingly disposable implementations unless the user explicitly asks for them.

    line 15
  4. Distinctive:

    Prefer maintainable, scalable, modular systems over clever shortcuts.

    line 16
  5. Distinctive:

    If the requested speed or scope would force obviously throwaway architecture, pause and surface the tradeoff before locking in the wrong …

    line 20
  6. Distinctive:

    Create the skeleton before filling in implementation details.

    line 26
  7. Distinctive:

    Prefer small, clean subtrees with obvious responsibility.

    line 35
  8. Distinctive:

    Prefer single-word names for files, directories, and subdirectories when possible.

    line 36
  9. Distinctive:

    Use multi-word names only when they materially improve clarity.

    line 37
  10. Distinctive:

    Avoid bloated files. Target roughly 500 to 900 lines per file.

    line 38
  11. Distinctive:

    Avoid massive top-level modules that mix transport, domain logic, persistence, orchestration, and formatting in one place.

    line 40
  12. Distinctive:

    Create submodules or packages when a subsystem has distinct contracts, data flow, or lifecycle.

    line 41
  13. Distinctive:

    Keep each directory internally coherent.

    line 42
  14. Very specific:

    Keep naming strict, plain, and legible.

    line 43
  15. Very specific:

    Do not create directories such as misc, helpers, common, or utils unless the contents are truly narrow, stable, and well-defined.

    line 45
  16. Distinctive:

    Keep business logic in explicit, testable modules rather than controllers, routes, views, or handlers.

    line 50
  17. Distinctive:

    Keep interfaces narrow and implementation details behind them.

    line 53
  18. Distinctive:

    Prefer composition over monolith classes or god modules.

    line 54
  19. Distinctive:

    Do not leave mocked business behavior in production code.

    line 62
  20. Distinctive:

    Do not create fake repositories, fake adapters, or TODO implementations disguised as architecture.

    line 63
  21. Distinctive:

    Do not hardcode temporary logic that will obviously have to be ripped out for basic scale.

    line 64
  22. Distinctive:

    Default to deterministic, explicit flows over hidden magic.

    line 65
  23. Distinctive:

    Add abstractions only when they clarify ownership or isolate complexity, not to sound architectural.

    line 66
  24. Distinctive:

    Keep the happy path and failure path equally intentional.

    line 67
  25. Distinctive:

    When a simpler implementation is still production-correct, prefer the simpler one.

    line 69
  26. Distinctive:

    Keep the README concise, direct, and high-signal.

    line 73
  27. Distinctive:

    Do not turn the README into a long essay.

    line 85
  28. Distinctive:

    Before finishing a new project or major scaffold, verify:

    line 89
  29. Distinctive:

    no file is becoming a dumping ground

    line 93
  30. Distinctive:

    Read references/project-rules.md before doing substantial greenfield scaffolding or architecture refactors.

    line 101

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

New Project Architecture

Use this skill to set the architecture correctly from the first commit.

Default to real production structure, not demo structure.

Core Stance

  • Build production-grade architecture end to end.
  • Do not introduce placeholder, fake, or knowingly disposable implementations unless the user explicitly asks for them.
  • Prefer maintainable, scalable, modular systems over clever shortcuts.
  • Make the codebase easy to reason about for the next engineer, not just fast to generate today.
  • Solve for clean boundaries, clean names, and clean ownership.

If the requested speed or scope would force obviously throwaway architecture, pause and surface the tradeoff before locking in the wrong foundation.

Workflow

  1. Determine the product shape.
  2. Choose the architectural layers and module boundaries.
  3. Create the skeleton before filling in implementation details.
  4. Define the canonical contracts between layers.
  5. Implement real end-to-end paths instead of stubs.
  6. Fill the README with the minimum high-value operating context.
  7. Audit the structure against the rules before finishing.

Structure Rules

  • Organize directories by concern and ownership, not by vague convenience.
  • Prefer small, clean subtrees with obvious responsibility.
  • Prefer single-word names for files, directories, and subdirectories when possible.
  • Use multi-word names only when they materially improve clarity.
  • Avoid bloated files. Target roughly 500 to 900 lines per file.
  • Split a file before it becomes a grab bag or crosses a clean reasoning boundary, even if it is still under the line target.
  • Avoid massive top-level modules that mix transport, domain logic, persistence, orchestration, and formatting in one place.
  • Create submodules or packages when a subsystem has distinct contracts, data flow, or lifecycle.
  • Keep each directory internally coherent. Every child inside it should make sense as part of the same concern.
  • Keep naming strict, plain, and legible. Prefer auth, cache, queue, store, graph, voice, image, worker over vague or ornamental names.

Do not create directories such as misc, helpers, common, or utils unless the contents are truly narrow, stable, and well-defined. Most of the time, hidden architecture debt starts there.

Architecture Rules

  • Build the canonical architecture, not the easiest temporary one.
  • Keep business logic in explicit, testable modules rather than controllers, routes, views, or handlers.
  • Separate transport, domain logic, persistence, background execution, and integration boundaries when those concerns exist.
  • Centralize shared contracts and types where they can remain authoritative.
  • Keep interfaces narrow and implementation details behind them.
  • Prefer composition over monolith classes or god modules.
  • Make scaling paths natural. Do not require a future rewrite just to support more traffic, more features, or more engineers.
  • Choose robust implementations that can remain in place as the system grows.
  • Make operational behavior legible: configuration, errors, retries, jobs, state changes, and integration boundaries should all have a clear home.

Implementation Rules

  • Ship real code paths.
  • Do not leave mocked business behavior in production code.
  • Do not create fake repositories, fake adapters, or TODO implementations disguised as architecture.
  • Do not hardcode temporary logic that will obviously have to be ripped out for basic scale.
  • Default to deterministic, explicit flows over hidden magic.
  • Add abstractions only when they clarify ownership or isolate complexity, not to sound architectural.
  • Keep the happy path and failure path equally intentional.

When a simpler implementation is still production-correct, prefer the simpler one.

README Standard

Keep the README concise, direct, and high-signal.

It should usually cover:

  • what the project is
  • why it exists
  • how it is structured
  • how to run it
  • how to test it
  • how to configure it
  • any critical operational or deployment notes

Do not turn the README into a long essay. Lead with the important facts and keep the sections short.

Final Audit

Before finishing a new project or major scaffold, verify:

  • the top-level structure reflects real system boundaries
  • naming is clean and mostly single-word
  • no file is becoming a dumping ground
  • modules are concern-scoped
  • important logic is not hiding in transport or UI layers
  • the implementation is real, not placeholder architecture
  • the README is concise and useful

Read Next

Read references/project-rules.md before doing substantial greenfield scaffolding or architecture refactors.

Use it for:

  • module-shaping heuristics
  • file-splitting rules
  • naming discipline
  • skeleton checklists
  • production-readiness review

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.