Agent skill

Clean Architecture

by GabrielMartinMoran in GabrielMartinMoran/mind

Clean Architecture principles and best practices from Robert C.

MITAuto-check passedDevelopment

Install Clean Architecture

skills CLI
$ npx skills add GabrielMartinMoran/mind --skill clean-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install GabrielMartinMoran/mind clean-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/GabrielMartinMoran/mind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/clean-architecture .claude/skills/clean-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
clean-architecture
GitHub stars
148
Used in
1 other repo
Token cost
~1.9k tokens
SKILL.md length
510 words
Files
45 (incl. references, assets)
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Clean Architecture principles and best practices from Robert C.

  • Works in 8 steps: Dependency Direction (CRITICAL) → Entity Design (CRITICAL) → Use Case Isolation (HIGH) → …
  • Tasks involving layers
  • SKILL.md covers When to Apply, Rule Categories by Priority, Quick Reference and How to Use, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Clean Architecture is an agent skill from GabrielMartinMoran/mind. Clean Architecture principles and best practices from Robert C. Martin's book. This skill should be used when designing software systems, reviewing code structure, or refactoring applications to achieve better separation of concerns. Triggers on tasks involving layers, boundaries, dependency direction, entities, use cases, or system architecture.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 47 other files, including reference files and assets (for example `assets/templates/_template.md`, `references/_sections.md` and `references/adapt-anti-corruption-layer.md`).

It sits in Development, covering Design patterns. The repository describes itself as: Mind is an automated memory layer for AI workflows. Say goodbye to your agents amnesia! The licence is MIT.

When your agent uses it

  • Tasks involving layers
  • Dependency direction
  • System architecture

Example prompts

  • “/clean-architecture”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Dependency Direction (CRITICAL)
  2. Entity Design (CRITICAL)
  3. Use Case Isolation (HIGH)
  4. Component Cohesion (HIGH)
  5. Boundary Definition (MEDIUM-HIGH)
  6. Interface Adapters (MEDIUM)
  7. Framework Isolation (MEDIUM)
  8. Testing Architecture (LOW-MEDIUM)

What it can do on your machine

Read from SKILL.md and the folder at commit 36d2f1e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Clean Architecture loads about 1.9k tokens when it runs, and up to ~34k if it reads all its reference files. Until then it costs about 92 tokens; SKILL.md has 510 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~34k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from GabrielMartinMoran/mind at commit 36d2f1e, republished under its MIT licence (© GabrielMartinMoran). 510 words, ~1,850 tokens.

Download SKILL.mdSave it as .claude/skills/clean-architecture/SKILL.md (or your agent's skills folder). This skill also uses 44 other files; get the full folder from GitHub.
name
clean-architecture
description
Clean Architecture principles and best practices from Robert C. Martin's book. This skill should be used when designing software systems, reviewing code structure, or refactoring applications to achieve better separation of concerns. Triggers on tasks involving layers, boundaries, dependency direction, entities, use cases, or system architecture.

Clean Architecture Best Practices

Comprehensive guide to Clean Architecture principles for designing maintainable, testable software systems. Based on Robert C. Martin's "Clean Architecture: A Craftsman's Guide to Software Structure and Design." Contains 42 rules across 8 categories, prioritized by architectural impact.

When to Apply

Reference these guidelines when:

  • Designing new software systems or modules
  • Structuring dependencies between layers
  • Defining boundaries between business logic and infrastructure
  • Reviewing code for architectural violations
  • Refactoring coupled systems toward cleaner structure

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Dependency DirectionCRITICALdep-
2Entity DesignCRITICALentity-
3Use Case IsolationHIGHusecase-
4Component CohesionHIGHcomp-
5Boundary DefinitionMEDIUM-HIGHbound-
6Interface AdaptersMEDIUMadapt-
7Framework IsolationMEDIUMframe-
8Testing ArchitectureLOW-MEDIUMtest-

Quick Reference

1. Dependency Direction (CRITICAL)
2. Entity Design (CRITICAL)
3. Use Case Isolation (HIGH)
4. Component Cohesion (HIGH)
Show full SKILL.md (201 more words)Show less
5. Boundary Definition (MEDIUM-HIGH)
6. Interface Adapters (MEDIUM)
7. Framework Isolation (MEDIUM)
8. Testing Architecture (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

© GabrielMartinMoran, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 44 other files (references, assets) in .agents/skills/clean-architecture of GabrielMartinMoran/mind.

  • SKILL.md
  • assets/templates/_template.md
  • references/_sections.md
  • references/adapt-anti-corruption-layer.md
  • references/adapt-controller-thin.md
  • references/adapt-gateway-abstraction.md
  • references/adapt-mapper-translation.md
  • references/adapt-presenter-formats.md
  • references/bound-boundary-cost-awareness.md
  • references/bound-defer-decisions.md
  • references/bound-humble-object.md
  • references/bound-main-component.md
  • references/bound-partial-boundaries.md
  • references/bound-service-internal-architecture.md
  • references/comp-common-closure.md
  • references/comp-common-reuse.md
  • references/comp-reuse-release-equivalence.md
  • references/comp-screaming-architecture.md
  • … and 27 more

Open the folder on GitHubat commit 36d2f1e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in GabrielMartinMoran/mind, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Clean Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Clean Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clean Architecture this skillGabrielMartinMoran/mind1481 repos~1.9kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Swiftui View RefactorDimillian/Skills4k5 repos~2kAutomated safety check: PassMIT
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0
Effect Client WrapperUsefulSoftwareCo/executor4.1k1 repos~1.4kAutomated safety check: PassMIT
Architecture PatternsKartikLabhshetwar/better-shot2.4k2 repos~1.4kAutomated safety check: PassCustom licence

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Swiftui View Refactor

    Dimillian/Skills

    Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage.

    4k GitHub starsUsed in 5 repos~2k tokens
    DevelopmentAuto-check passed
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Effect Client Wrapper

    UsefulSoftwareCo/executor

    Pattern for wrapping third-party SDK clients (Stripe, Resend, AWS, etc.) with Effect.

    4.1k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Architecture Patterns

    KartikLabhshetwar/better-shot

    Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.4k tokens
    DevelopmentAuto-check passed
  • GitVersion .NET Development

    GitTools/GitVersion

    Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

    3.1k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed

More from GabrielMartinMoran/mind

  • Bun Development

    GabrielMartinMoran/mind

    Modern JavaScript/TypeScript development with Bun runtime. An agent skill from GabrielMartinMoran/mind.

    148 GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Clean Code

    GabrielMartinMoran/mind

    Applies principles from Robert C. An agent skill from GabrielMartinMoran/mind.

    148 GitHub starsUsed in 6 repos~1.1k tokens
    Auto-check passed

Categories

Questions about Clean Architecture

What does Clean Architecture do?

Clean Architecture principles and best practices from Robert C. Clean Architecture is an agent skill from GabrielMartinMoran/mind. Clean Architecture principles and best practices from Robert C.

When should I use Clean Architecture?

Clean Architecture fits situations like: tasks involving layers; dependency direction; system architecture.

How do I install Clean Architecture in Claude Code?

Run `npx skills add GabrielMartinMoran/mind --skill clean-architecture -a claude-code`. Or copy the skill folder (.agents/skills/clean-architecture in GabrielMartinMoran/mind) into .claude/skills/clean-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Clean Architecture in Codex?

Run `npx skills add GabrielMartinMoran/mind --skill clean-architecture -a codex`. Or copy the skill folder (.agents/skills/clean-architecture in GabrielMartinMoran/mind) into .agents/skills/clean-architecture in your project. Codex loads it when a task matches its description.

Can I use Clean Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add GabrielMartinMoran/mind --skill clean-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clean-architecture, .gemini/skills/clean-architecture, .github/skills/clean-architecture and .opencode/skills/clean-architecture in your project.

What does Clean Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Clean Architecture is instructions for the agent only.

Does Clean Architecture access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Clean Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Clean Architecture use?

Clean Architecture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clean Architecture use?

About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 32k tokens, read only when the agent opens those files.

What are the alternatives to Clean Architecture?

Skills that share tags, products or a category with Clean Architecture: Vercel Composition Patterns (supabase/supabase, 111k stars), Swiftui View Refactor (Dimillian/Skills, 4k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k stars) and Effect Client Wrapper (UsefulSoftwareCo/executor, 4.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clean Architecture?

GabrielMartinMoran (a GitHub user) maintains it in GabrielMartinMoran/mind, which has 148 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 30, 2026.

Source: GabrielMartinMoran/mind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.