agentsclimarketplace

Layered architecture

Skill vaibhavsaxena022/skills/layered-architecture

Enforce clean Controller → Facade → Service → Repository layering in a service. Use when adding or reviewing code to keep responsibilities in the right layer and prevent logic or entities from leaking across boundaries.From its SKILL.md

Install
npx -y skills add vaibhavsaxena022/skills --skill layered-architecture

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.0 KB, 304 tokens by cl100k_base, as published. Nobody here has run it

Layered Architecture

Dependencies point downward only: Controller → Facade → Service → Repository.

Layer responsibilities

  • Controller — the HTTP edge: validate the request, delegate, map the result to a DTO + status code.
  • Facade — orchestration across services (only when a use case spans several); no data access, no HTTP.
  • Service — the business logic and rules; owns the transaction boundary.
  • Repository — data access only: queries and persistence.

Do

  • Keep controllers thin: parse/validate → call down → map response + correct status code.
  • Put business logic in services; open transactions there (on writes).
  • Add a facade only when orchestrating multiple services/repositories.
  • Return DTOs from controllers; map entities at the boundary.
  • Let each layer call only the layer directly below it.
  • Use constructor injection.

Don't

  • Don't put business logic or if-heavy decisions in controllers.
  • Don't return entities from controllers or leak them upward.
  • Don't let repositories make business decisions.
  • Don't give services HTTP concerns (status codes, request objects).
  • Don't skip a layer or call upward.
  • Don't add a facade for a simple single-service call.

When reviewing, flag

Logic in controllers · entities returned to clients · repositories with business rules · services handling HTTP · transactions opened at the wrong layer.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,614. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.