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 lugassawan/swe-workbench --skill principle-clean-architecturegit clone --depth 1 https://github.com/lugassawan/swe-workbenchWrote 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/lugassawan/swe-workbench/principle-clean-architecture)<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/principle-clean-architecture"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/principle-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/lugassawan/swe-workbench/principle-clean-architecture"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/principle-clean-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00043 | $0.01027 |
| Opus 5 | $0.00022 | $0.00513 |
| Sonnet 5 | $0.00009 | $0.00205 |
| Haiku 4.5 | $0.00004 | $0.00103 |
Grade A, and why
principle-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 6d 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 — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Architecture
The one rule
Source-code dependencies point inward. Inner circles know nothing about outer ones.
[ Frameworks & Drivers ] ← HTTP, DB, UI, CLI
[ Interface Adapters ] ← controllers, presenters, gateways
[ Use Cases ] ← application-specific business rules
[ Entities ] ← enterprise-wide business rules
If a use case imports the ORM, the rule is broken.
Ports and adapters
- Port — interface owned by the domain describing what it needs (
UserRepository.find(id)). - Adapter — implementation in the outer layer (
PostgresUserRepository). - Domain depends on ports. Composition root wires adapters to ports at startup.
Keeping the domain pure
- No imports of HTTP, SQL, ORM types, JSON libraries, or wall-clock time from the domain.
- Pass side-effects in as interfaces (
Clock,IdGenerator,Repository). - Domain types are plain data + behavior — no framework annotations.
Boundary crossings
- Cross layers only via data structures the inner layer defines.
- Outer layers translate to/from these structures. Never leak an ORM entity into a use case.
Testing payoff
- Use cases are unit-testable with fake adapters.
- Integration tests live at the adapter boundary.
- Framework tests (HTTP, DB) stay narrow because business rules are elsewhere.
When NOT to apply
- Throwaway scripts and prototypes — flat is fine.
- Obvious CRUD with no domain logic — a single service file is clearer than four layers.
- Tiny internal tools where ceremony cost exceeds change cost.
Drift smells
- Repositories returning ORM objects instead of domain types.
- Use cases importing HTTP request/response types.
- Presenters holding business rules.
utilspackages imported by the domain.
Layer import rules
| Layer | Can import | Must NOT import |
|---|---|---|
| Domain | Standard library only | Application, Infrastructure, Framework |
| Application | Domain | Infrastructure, Framework |
| Infrastructure | Domain, Application | Framework (except its own SDK) |
| Framework/UI | All layers | — |
What ships with it
10 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.
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.
- 6d ago First seen · 94 lines · 43 tokens per session scan A 446653a13815
principle-clean-architecture is a skill published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed 4d ago), licensed MIT. It adds 43 tokens to every session and 1,027 once invoked, about $0.0002 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
brooks-test
Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…
architecture-patterns
Architecture validation and patterns for clean architecture, backend structure enforcement, project structure validation, test standards, and context-aware sizing. Use when designing system boundaries, enforcing layered architecture, validating project structure, defining test standards, or choosing the right…
functions-development
Build serverless Go or Python functions for Falcon Foundry apps. TRIGGER when user asks to "create a function", "write a serverless function", "build backend logic", runs foundry functions create, or needs help with FDK handler patterns, function testing, or collection integration from functions. Also TRIGGER when…
go-testing-quality
Use when writing or reviewing Go tests, adding coverage, benchmarking, or profiling a Go program. Not for CI/lint wiring (go-tooling-security) or non-Go tests.
testing-dotnet
.NET testing patterns — xUnit conventions, integration tests with WebApplicationFactory, mocking strategies, and test organization.
golang-test-review
Use when reviewing Go test code (new or changed test.go files, test harnesses, fixtures, or test tooling) for a Go-test-expert pass — behavior-over-surface, determinism, parallel-safety, build-tag correctness, and harness reuse. Complements the general code-reviewer with test-specific rigor.