From claude-resources
Project structure principles. Use when starting a new project, major restructuring, or auditing package dependencies. Pair with language-specific project-init skill.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:project-structureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Organize code by domain entity, not by technical layer.
Organize code by domain entity, not by technical layer.
Group code by business entity (user, order, product), not by type (controllers, models, services). Layered architecture scatters related feature code across directories — a single "user" change touches controllers/, models/, services/, and repositories/. Entity-focused keeps related code together so a feature change touches one package.
Each entity package encapsulates:
Shared infrastructure in dedicated packages:
| Type | Key Structure |
|---|---|
| Service (HTTP/gRPC) | entry point + internal packages (entity + cross-cutting) + migrations |
| CLI Tool | entry point + internal packages (commands + config) |
| Library | root API surface + internal implementation + examples |
Check periodically:
| Shortcut | Reality |
|---|---|
| "Flat structure is simpler" | Flat becomes chaos at scale. Entity-focused packages scale naturally. |
| "We need a utils package" | Utils is a code smell. Put code where it belongs by domain. |
| "Layered architecture is standard" | Layers scatter related code. Entity-focused keeps related code together. |
| "We'll restructure later" | Structure is expensive to change. Get it right early. |
npx claudepluginhub deandum/claude-resources --plugin go-skillsGuides organizing project directories by language and framework conventions. Use when creating, reorganizing, or adding modules to a project.
Organizes Python projects with module cohesion, __all__ public APIs, flat directory structures, and test placement strategies. Use for new setups, refactoring, or library packaging.
Detects anti-patterns and architectural debt in codebases, proposes patterns like GoF SOLID DDD CQRS Microservices Cloud, generates boilerplate code. For Next.js FastAPI NestJS Django Express Go.