separation-of-concerns

Installation
SKILL.md

Separation of Concerns

Mental Model: Verticals and Horizontals

Vertical = all code for ONE feature, grouped together Horizontal = capabilities used by MULTIPLE features

  • features/ — verticals, containing some combination of entrypoint/, commands/, queries/, domain/, infra/
    • commands/ orchestrates write operations (state mutations or external side-effects)
    • queries/ usually queries database directly but can query domain if easier
    • domain/ contains business rules
    • entrypoint/ only needed when exposing external interface (HTTP, CLI, events)
    • infra/ feature-specific infrastructure (mappers, middleware, persistence implementations)
  • platform/ — horizontals, contains domain/ and infra/
    • domain/ depends on nothing — never imports from infra/
    • infra/ CAN depend on domain/ (implements domain contracts)
  • shell/ — app wiring/routing only (no business logic). Registers routes, bootstraps frameworks, connects message brokers. Not a package entry point — libraries use src/index.ts for that.
  • src/index.ts — library package entry point. Pure barrel file (only re-export statements, no logic). Only needed for packages consumed by other packages.
Related skills

More from ntcoding/claude-skillz

Installs
19
GitHub Stars
314
First Seen
Feb 21, 2026