Clean architecture layers
Skill swd3k/skills/agent-skills/programming/clean-architecture-layers
Portable agent skills for desktop apps, programming, UI, and web design - Codex, Claude, Cursor, Grok. English SKILL.md playbooks (Photino, Inno, CI, landings).
npx -y skills add swd3k/skills --skill clean-architecture-layersAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 19 days oldThe repository was created 19 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 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.
What its author says it does
Copied from the file, not written here
Structure app code into Core, Infrastructure, UI/API layers with clear dependency direction. Use when scaffolding solutions, refactoring god-projects, or deciding where business logic lives.
SKILL.md
1.4 KB, as published. Nobody here has run it
Clean Architecture Layers
Dependencies point inward. UI and frameworks depend on Core — never reverse.
Default layout (.NET / general)
src/
App.Core/ # domain, use cases, ports (interfaces)
App.Infrastructure/ # files, HTTP, DB, OS integrations
App.Ui/ or App.Api/ # Photino, ASP.NET, CLI
tests/
App.Core.Tests/
App.Infrastructure.Tests/
Rules
- Core has no UI, EF, Photino, or HTTP client package refs.
- Infrastructure implements Core interfaces.
- Composition root (Program.cs) wires implementations.
- Feature changes: Core first if business rules change.
Workflow
- Name the use cases (ApplyHosts, CheckUpdate…).
- Define ports as interfaces in Core.
- Implement adapters in Infrastructure.
- UI only calls use cases / services via interfaces.
- Unit-test Core without OS; integration-test Infrastructure.
Pitfalls
- Business rules inside button click handlers
- Circular project references "just this once"
- Huge Shared project that becomes a dump
Acceptance
- Core tests run on Linux CI without Windows packages
- New storage backend = new Infrastructure class, Core untouched