software-architecture — Claude Code skill: clean architecture rules
A skill that hands the agent coding rules: early returns, splitting long functions, domain names instead of utils. Useful when the agent writes or reviews project code.
npx claude-code-templates@latest --skill development/software-architectureWhat software-architecture does
The skill builds on Clean Architecture and Domain Driven Design. The agent gets a style guide: early returns over nested conditions, arrow functions, splitting components past 80 lines and files past 200 lines. Duplicated code should move into reusable functions and modules.
A separate section covers libraries. Before writing anything custom, the agent looks for an existing answer: an npm package, a third-party service, an API. Hand-rolled code is justified for domain logic, performance-critical paths and security-sensitive parts that need full control. The description names cockatiel as the pick for retry logic instead of writing your own.
There is also a list of anti-patterns. Names like utils, helpers, common and shared count as bad practice; OrderCalculator or InvoiceGenerator are what the skill expects. Business logic should not sit inside UI components, and database queries do not belong in controllers. Nesting stops at three levels, functions at 50 lines. The rules are strict, so on a large legacy codebase the agent will start proposing refactors you never asked for.
What it helps with
- separate business logic from framework code
- move database queries out of controllers
- rename
utilsandhelpersinto domain terms - split a function before it grows out of hand
- pick an existing library instead of building your own
Example prompts for the agent
- Design the order checkout module following Clean Architecture
- Go through this file and point out where business logic mixes with UI
- Check the code for anti-patterns and suggest what to extract into a module
How to install software-architecture
1claude-code-templates
npx claude-code-templates@latest --skill development/software-architecture2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill software-architecture -a claude-code3Manually: put the files in place
~/.claude/skills/software-architecture/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/software-architecture/
Manually: put the files in place
.agents/skills/software-architecture/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/software-architecture/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates software-architecture2Manually: put the files in place
.github/skills/software-architecture/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/software-architectureManually: put the files in place
.devin/skills/software-architecture/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about software-architecture
How do I install software-architecture in Claude Code?
Use the templates: npx claude-code-templates@latest --skill development/software-architecture. Or run npx skills add davila7/claude-code-templates --skill software-architecture -a claude-code. The skill file lands at ~/.claude/skills/software-architecture/SKILL.md.
What does software-architecture do?
It gives the agent development rules: early returns, limits on function and file length, domain naming, layer separation. The agent applies them while writing code, designing architecture or reading existing code.
What is this skill based on?
Clean Architecture and Domain Driven Design. Those principles drive the naming rules, the boundaries between contexts and keeping business logic away from infrastructure.