separation-of-concerns_skill

This skill helps organize code by enforcing verticals horizontals shell structure, guiding where new files belong to maximize modularity and reuse.
  • Python

247

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill ntcoding/claude-skillz --skill separation-of-concerns

  • README.md11.9 KB
  • SKILL.md17.6 KB

Overview

This skill enforces a clear separation-of-concerns architecture for projects using features/, platform/, and shell/ layouts. It checks file placement, dependency directions, and folder conventions to keep business logic, wiring, and infrastructure correctly isolated. The goal is predictable organization that reduces coupling and makes refactors safe and fast.

How this skill works

The skill inspects new or changed files and determines the correct layer by asking a decision tree: does the code wire startup, translate external formats, orchestrate writes, or implement business rules? It verifies dependency directions (inward-only), forbids cross-feature imports, and enforces infra sub-folder conventions and that domain contains no I/O. It flags violations like business logic in commands, helpers inside command/query folders, or files dumped directly into infra/ roots.

When to use it

  • On new file creation to decide where the file should live
  • During refactors that move code between features or shared modules
  • When reviewing PRs for code-organization and layer violations
  • While creating or updating library packages that follow feature+platform layout
  • When introducing shared domain concepts or infrastructure wrappers

Best practices

  • Follow the placement decision tree and stop at the first matching layer
  • Keep domain pure: no DB, HTTP, filesystem, or external calls in domain/
  • Co-locate files by change (feature folders), not by type (no global types/validators folders)
  • Commands orchestrate (load→delegate→persist) and contain no business rules
  • Platform/infra must use prescribed sub-folders and never hold files at infra/ root

Example use cases

  • A reviewer sees validation inside a command file — skill suggests moving rules into feature domain/
  • A new HTTP handler appears in a feature — skill recommends entrypoint/ for translation logic and shell/ for route wiring
  • Shared tax logic is duplicated in two features — skill flags extraction to platform/domain/
  • A database client was added at platform/infra/connection.ts — skill enforces platform/infra/persistence/ placement
  • A query file performing writes is created — skill warns to move side effects into commands/

FAQ

Yes. If multiple features use it, extract to platform/ (domain or infra) or a dedicated library so features never cross-import.

Can domain define repository interfaces?

Yes. Domain defines contracts and value objects but must not perform I/O; implementations live in infra/.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational