Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add j4flmao/agent-skills --skill clean-architecturegit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/j4flmao/agent-skills/clean-architecture)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/clean-architecture"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/clean-architecture/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/clean-architecture"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/clean-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00118 | $0.04554 |
| Opus 5 | $0.00059 | $0.02277 |
| Sonnet 5 | $0.00024 | $0.00911 |
| Haiku 4.5 | $0.00012 | $0.00455 |
Grade A, and why
backend-clean-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 545 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend Clean Architecture
Purpose
Enforce strict layer separation in backend code. Domain layer has zero dependencies on frameworks, databases, or external libraries. Every piece of code must belong to exactly one layer.
Agent Protocol
Trigger
Exact user phrases: "where does this code go", "what layer", "clean architecture", "hexagonal", "ports and adapters", "domain layer", "application layer", "infrastructure layer", "should this be in service or repository", "layer violation", "architecture rule".
Input Context
Before activating, verify:
- The stack is known (NestJS, Go, Rust, Python, Spring Boot).
- The user has described a specific piece of code or asked about a specific location.
- The project's folder structure is visible or has been described.
Output Artifact
No file output. This skill produces text guidance.
Response Format
Answer exactly:
{code piece} -> {Layer}: {one-sentence justification}
File: {suggested file path}
If there is a violation:
VIOLATION: {file}:{line}
Layer {X} imports Layer {Y} which is NOT allowed.
Fix: {specific refactor instruction}
Direction: {layer name} -> {layer name} is the correct direction.
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output.
Completion Criteria
- The layer for the code has been identified.
- If a violation exists, it has been identified with specific file/line.
- The fix direction has been specified.
- No layer rules have been explained — only applied.
Max Response Length
Layer assignment: 3 lines. Violation: 5 lines.
Architecture Decision Tree
Where Does This Code Go?
Is the code a business concept/rule?
├── Yes → Does it depend on a framework, DB, or external library?
│ ├── No → Domain Layer (Entity, Value Object, Domain Service, Repository Interface)
│ └── Yes → INFRASTRUCTURE LAYER VIOLATION — extract pure logic to Domain
├── No → Does it orchestrate business operations?
│ ├── Yes → Application Layer (Use Case, Command/Query Handler, Port Interface)
│ └── No → Does it handle external input (HTTP, CLI, message)?
│ ├── Yes → Presentation Layer (Controller, Middleware, DTO, Resolver)
│ └── No → Does it implement external concerns?
│ ├── Yes → Infrastructure Layer (DB repo, API client, queue)
│ └── No → Reconsider the architecture — every piece fits one layer
What ships with it
12 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/clean-arch-advanced.md 8.1 KB
- references/clean-arch-errors.md 7.2 KB
- references/clean-arch-events.md 6.9 KB
- references/clean-arch-fundamentals.md 4.8 KB
- references/clean-arch-layers.md 5.7 KB
- references/clean-arch-testing.md 7.4 KB
- references/dependency-injection.md 16 KB
- references/dependency-rule-deep.md 9.9 KB
- references/entity-boundaries.md 4.8 KB
- references/layer-structure.md 8.6 KB
- references/testing-strategy.md 8.5 KB
- references/use-case-patterns.md 16 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 545 lines · 118 tokens per session scan A 8234281741aa
backend-clean-architecture is a skill published in the GitHub repository j4flmao/agent-skills (22 stars, last pushed 4d ago), licensed MIT. It adds 118 tokens to every session and 4,554 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
microservices-architecture
Guides service boundary analysis, communication pattern selection, data consistency design, API contract strategy, and resilience checklist for microservices systems. Complements the microservices fragment. Invoked when the user asks to design a microservices system, split a monolith, or review service boundaries.
express
Minimal-friction implementation path for well-scoped tasks. Assumes the developer has full context, knows the codebase, and does not need planning ceremony. Use when the developer says "/express", wants to move fast on a well-understood single-layer change, or explicitly opts out of the full workflow.
Event-Driven Semantics & Delivery Guarantees
Ensure event-driven designs specify delivery guarantees, ordering, idempotency, schema evolution, and replay/backfill strategy.
Trust Boundaries & Authorization Architecture
Ensure designs define trust boundaries, authn/authz responsibilities, and propagation of identity/claims across services.
External Dependencies & Vendor Risks
Ensure designs document third-party dependencies, SLAs, quotas, failure modes, and vendor lock-in mitigation.
Cache Strategy Consistency Guard
Detect undefined or inconsistent cache strategies (layers, consistency, invalidation, TTL, failure handling) in design documents.