Provides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Python applications with FastAPI or Flask.

MITAuto-check: notesDevelopment

Install Clean Architecture

skills CLI
$ npx skills add giuseppe-trisciuoglio/developer-kit --skill clean-architecture -a claude-code

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

GitHub CLI
$ gh skill install giuseppe-trisciuoglio/developer-kit 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/giuseppe-trisciuoglio/developer-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/developer-kit-python/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
357
Token cost
~4.1k tokens
SKILL.md length
889 words
Files
3 (incl. references)
Skills in repo
115
Repo updated
First seen
Licence
MIT

At a glance

Provides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Python applications with FastAPI or Flask.

  • Works in 7 steps: Define the Project Structure → Implement the Domain Layer → Implement the Use Cases Layer → …
  • Designing maintainable backends with separation of concerns
  • SKILL.md covers Overview, When to Use, Instructions and Examples, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Clean Architecture is an agent skill from giuseppe-trisciuoglio/developer-kit. Provides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Python applications with FastAPI or Flask. Use when designing maintainable backends with separation of concerns, implementing repository patterns, creating entities/value objects/aggregates, or structuring domain logic independent of frameworks for testability.

Its SKILL.md is about 4.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/fastapi-implementation.md` and `references/python-clean-architecture.md`).

It sits in Development, covering Design patterns and Domain-driven design. It works with Python, FastAPI and Flask. The repository describes itself as: Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI. The licence is MIT.

When your agent uses it

  • Designing maintainable backends with separation of concerns
  • Implementing repository patterns
  • Creating entities/value objects/aggregates
  • Structuring domain logic independent of frameworks for testability

Example prompts

  • “Use the clean-architecture skill to provide implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and…”
  • “/clean-architecture”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Glob, Grep, Bash

Workflow steps

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

  1. Define the Project Structure
  2. Implement the Domain Layer
  3. Implement the Use Cases Layer
  4. Implement the Adapter Layer
  5. Implement the Infrastructure Layer
  6. Create the Application Entry Point
  7. Write Tests

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Glob
    • Grep
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    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 4.1k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 102 tokens; SKILL.md has 889 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Glob, Grep, Bash

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 giuseppe-trisciuoglio/developer-kit at commit fe73fb3, republished under its MIT licence (© giuseppe-trisciuoglio). 889 words, ~4,090 tokens.

Download SKILL.mdSave it as .claude/skills/clean-architecture/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
clean-architecture
description
Provides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Python applications with FastAPI or Flask. Use when designing maintainable backends with separation of concerns, implementing repository patterns, creating entities/value objects/aggregates, or structuring domain logic independent of frameworks for testability.
allowed-tools
Read, Write, Edit, Glob, Grep, Bash

Clean Architecture, DDD & Hexagonal Architecture for Python

Overview

This skill provides comprehensive guidance for implementing Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design patterns in Python applications. It focuses on creating maintainable, testable, and framework-independent business logic through proper separation of concerns.

Core Concepts

Layered Architecture (Clean Architecture) - Dependencies flow inward, inner layers know nothing about outer layers:

+-------------------------------------+
|  Infrastructure (Frameworks, DB)   |  <- Outer layer
+-------------------------------------+
|  Adapters (Controllers, Repos)     |
+-------------------------------------+
|  Use Cases (Application Logic)     |
+-------------------------------------+
|  Domain (Entities, Value Objects)  |  <- Inner layer
+-------------------------------------+

Layers:

  • Domain: Entities, value objects, domain events, repository interfaces
  • Use Cases: Application business rules, orchestrate domain objects
  • Adapters: Interface implementations (controllers, repositories, gateways)
  • Infrastructure: Framework configuration, database connections, external clients

Hexagonal Architecture (Ports & Adapters)

  • Ports: Abstract interfaces defining what the application needs
  • Adapters: Concrete implementations of ports
  • Domain Core: Business logic with no external dependencies

Domain-Driven Design Tactical Patterns

  • Entities: Objects with identity and lifecycle
  • Value Objects: Immutable objects defined by attributes
  • Aggregates: Consistency boundaries with aggregate roots
  • Repositories: Persistence abstraction for aggregates
  • Domain Events: Capture significant occurrences in the domain

When to Use

  • Designing new Python backend systems with separation of concerns
  • Refactoring tightly coupled code into layered architectures
  • Implementing domain-driven design with bounded contexts
  • Creating testable business logic independent of frameworks
  • Building applications with FastAPI or Flask using clean patterns
  • Setting up repository patterns with SQLAlchemy or async databases
  • Implementing use case patterns with proper dependency injection

Instructions

1. Define the Project Structure

Create the layered directory structure following the dependency rule:

myapp/
+-- domain/                    # Inner layer - no external deps
|   +-- entities/             # Business entities
|   +-- value_objects/        # Immutable value objects
|   +-- events/               # Domain events
|   +-- repositories/         # Abstract repository interfaces (ports)
+-- use_cases/                # Application layer
+-- adapters/                 # Interface adapters
|   +-- repositories/         # Repository implementations
|   +-- controllers/          # API controllers
+-- infrastructure/           # Framework & external concerns
|   +-- database.py          # Database configuration
|   +-- container.py         # Dependency injection container
|   +-- config.py            # Application settings
+-- main.py                  # Application entry point
2. Implement the Domain Layer

Start from the innermost layer with no external dependencies:

  1. Create Value Objects using frozen dataclasses with validation in __post_init__
  2. Define Entities with identity, behavior, and factory methods (e.g., create())
  3. Define Repository Interfaces (Ports) as abstract base classes with abstract methods
  4. Keep all domain logic in entities - avoid anemic models
3. Implement the Use Cases Layer

Create application-specific business rules:

  1. Define Request/Response dataclasses for input/output
  2. Create Use Case classes that receive repository interfaces via constructor injection
  3. Implement the execute() method that orchestrates domain objects
  4. Handle validation and business errors, returning appropriate responses
4. Implement the Adapter Layer

Create concrete implementations of domain interfaces:

  1. Implement Repository classes that extend domain interfaces
  2. Use SQLAlchemy async sessions or other ORM tools
  3. Map between domain entities and database models
  4. Create Controllers (FastAPI routers) that invoke use cases
5. Implement the Infrastructure Layer

Configure frameworks and external dependencies:

  1. Set up database connections and session management
  2. Configure the dependency injection container
  3. Wire all components together
  4. Define application settings and configuration
6. Create the Application Entry Point

Build the FastAPI or Flask application:

  1. Initialize the DI container and wire modules
  2. Configure application lifespan (startup/shutdown)
  3. Register routers and middleware
  4. Export the application factory function
7. Write Tests

Test each layer in isolation:

  1. Unit test use cases with mocked repositories
  2. Unit test domain entities and value objects
  3. Integration test adapters with test databases
  4. End-to-end test the full application stack

Examples

Example 1: Domain Layer - Value Object & Entity
python
# domain/value_objects/email.py
from dataclasses import dataclass
import re

@dataclass(frozen=True)
class Email:
    value: str
    def __post_init__(self):
        if not re.match(r'^[\w\.-]+@[\w\.-]+\.\w+$', self.value):
            raise ValueError(f"Invalid email: {self.value}")
    def __str__(self) -> str:
        return self.value


# domain/entities/user.py
from dataclasses import dataclass, field
from datetime import datetime
from uuid import UUID, uuid4
from domain.value_objects.email import Email

@dataclass
class User:
    email: Email
    name: str
    id: UUID = field(default_factory=uuid4)
    is_active: bool = True
    created_at: datetime = field(default_factory=datetime.utcnow)

    def deactivate(self) -> None:
        self.is_active = False

    def can_login(self) -> bool:
        return self.is_active

    @classmethod
    def create(cls, email: Email, name: str) -> "User":
        return cls(email=email, name=name)
Example 2: Repository Port (Interface)
python
# domain/repositories/user_repository.py
from abc import ABC, abstractmethod
from typing import Optional
from uuid import UUID
from domain.entities.user import User
from domain.value_objects.email import Email

class IUserRepository(ABC):
    @abstractmethod
    async def find_by_id(self, user_id: UUID) -> Optional[User]: ...
    @abstractmethod
    async def find_by_email(self, email: Email) -> Optional[User]: ...
    @abstractmethod
    async def save(self, user: User) -> User: ...
    @abstractmethod
    async def delete(self, user_id: UUID) -> bool: ...
Example 3: Use Case Layer
python
# use_cases/create_user.py
from dataclasses import dataclass
from typing import Optional
from uuid import UUID
from domain.entities.user import User
from domain.value_objects.email import Email
from domain.repositories.user_repository import IUserRepository

@dataclass
class CreateUserRequest:
    email: str
    name: str

@dataclass
class CreateUserResponse:
    user_id: Optional[UUID]
    success: bool
    error_message: Optional[str] = None

class CreateUserUseCase:
    def __init__(self, user_repository: IUserRepository):
        self._user_repository = user_repository

    async def execute(self, request: CreateUserRequest) -> CreateUserResponse:
        try:
            email = Email(request.email)
        except ValueError as e:
            return CreateUserResponse(None, False, str(e))
        if await self._user_repository.find_by_email(email):
            return CreateUserResponse(None, False, "Email already registered")
        user = User.create(email=email, name=request.name)
        saved = await self._user_repository.save(user)
        return CreateUserResponse(saved.id, True)
Example 4: Adapter Layer - Repository Implementation
python
# adapters/repositories/sqlalchemy_user_repository.py
from typing import Optional
from uuid import UUID
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy import select
from domain.entities.user import User
from domain.value_objects.email import Email
from domain.repositories.user_repository import IUserRepository

class SQLAlchemyUserRepository(IUserRepository):
    def __init__(self, session: AsyncSession):
        self._session = session

    async def find_by_id(self, user_id: UUID) -> Optional[User]:
        result = await self._session.execute(
            select(UserModel).where(UserModel.id == user_id)
        )
        row = result.scalar_one_or_none()
        return self._to_entity(row) if row else None

    async def find_by_email(self, email: Email) -> Optional[User]:
        result = await self._session.execute(
            select(UserModel).where(UserModel.email == str(email))
        )
        row = result.scalar_one_or_none()
        return self._to_entity(row) if row else None

    async def save(self, user: User) -> User:
        model = UserModel(
            id=user.id, email=str(user.email), name=user.name,
            is_active=user.is_active, created_at=user.created_at
        )
        self._session.add(model)
        await self._session.commit()
        return user

    def _to_entity(self, model) -> User:
        return User(
            id=model.id, email=Email(model.email), name=model.name,
            is_active=model.is_active, created_at=model.created_at
        )
Example 5: Dependency Injection Container
python
# infrastructure/container.py
from dependency_injector import containers, providers
from adapters.repositories.sqlalchemy_user_repository import SQLAlchemyUserRepository
from use_cases.create_user import CreateUserUseCase
from infrastructure.database import get_session

class Container(containers.DeclarativeContainer):
    db_session = providers.Factory(get_session)
    user_repository = providers.Factory(SQLAlchemyUserRepository, session=db_session)
    create_user_use_case = providers.Factory(
        CreateUserUseCase, user_repository=user_repository
    )
Example 6: FastAPI Controller
python
# adapters/controllers/user_controller.py
from fastapi import APIRouter, Depends, HTTPException, status
from pydantic import BaseModel, EmailStr
from use_cases.create_user import CreateUserUseCase, CreateUserRequest
from infrastructure.container import Container
from dependency_injector.wiring import inject, Provide

router = APIRouter(prefix="/users", tags=["users"])

class CreateUserInput(BaseModel):
    email: EmailStr
    name: str

@router.post("/", status_code=status.HTTP_201_CREATED)
@inject
async def create_user(
    data: CreateUserInput,
    use_case: CreateUserUseCase = Depends(Provide[Container.create_user_use_case])
):
    request = CreateUserRequest(email=data.email, name=data.name)
    response = await use_case.execute(request)
    if not response.success:
        raise HTTPException(status_code=400, detail=response.error_message)
    return {"id": str(response.user_id)}
Example 7: Application Entry Point
python
# main.py
from fastapi import FastAPI
from contextlib import asynccontextmanager
from adapters.controllers import user_controller
from infrastructure.container import Container
from infrastructure.database import init_db

@asynccontextmanager
async def lifespan(app: FastAPI):
    await init_db()
    yield

def create_app() -> FastAPI:
    container = Container()
    container.wire(modules=[user_controller])
    app = FastAPI(title="Clean Architecture API", lifespan=lifespan)
    app.container = container
    app.include_router(user_controller.router)
    return app

app = create_app()
Example 8: Unit Testing Use Cases
python
# tests/unit/test_create_user_use_case.py
import pytest
from unittest.mock import AsyncMock
from use_cases.create_user import CreateUserUseCase, CreateUserRequest
from domain.entities.user import User
from domain.value_objects.email import Email

@pytest.fixture
def mock_repository():
    return AsyncMock()

@pytest.fixture
def use_case(mock_repository):
    return CreateUserUseCase(user_repository=mock_repository)

@pytest.mark.asyncio
async def test_create_user_success(use_case, mock_repository):
    mock_repository.find_by_email.return_value = None
    mock_repository.save.return_value = User(
        email=Email("test@example.com"), name="Test User"
    )
    request = CreateUserRequest(email="test@example.com", name="Test User")
    response = await use_case.execute(request)
    assert response.success is True
    assert response.user_id is not None

@pytest.mark.asyncio
async def test_create_user_duplicate_email(use_case, mock_repository):
    mock_repository.find_by_email.return_value = AsyncMock()
    request = CreateUserRequest(email="test@example.com", name="Test User")
    response = await use_case.execute(request)
    assert response.success is False
    assert "already registered" in response.error_message
Show full SKILL.md (364 more words)Show less

Best Practices

  1. Dependency Rule: Dependencies must always point inward toward the domain - never outward
  2. Immutable Value Objects: Always use frozen dataclasses for value objects with validation in __post_init__
  3. Rich Domain Models: Put business logic in entities, not in services or use cases
  4. Use Cases as Orchestrators: Use cases coordinate workflows but domain objects make decisions
  5. Async by Default: Use async/await for all I/O operations to support modern async frameworks
  6. Pydantic at Boundary: Use Pydantic models only at the API boundary, never in domain layer
  7. Repository per Aggregate: Create one repository per aggregate root, not per entity
  8. Factory Methods: Use @classmethod factory methods like create() for entity construction with invariants
  9. Dependency Injection: Inject dependencies through constructors for testability
  10. Structured Responses: Return structured response objects from use cases, not raw entities

Constraints and Warnings

Architecture Constraints
  • Dependency Rule: Dependencies must always point inward toward the domain - never outward
  • Framework Independence: Domain layer must have no framework dependencies (no FastAPI, SQLAlchemy, Pydantic imports)
  • Interface Segregation: Keep repository interfaces focused and small - avoid god interfaces
  • Repository per Aggregate: Create one repository per aggregate root, not per entity
Implementation Constraints
  • Immutable Value Objects: Always use frozen dataclasses for value objects
  • Rich Domain Models: Put business logic in entities, not in services or use cases
  • Use Cases as Orchestrators: Use cases coordinate workflows but domain objects make decisions
  • Async by Default: Use async/await for all I/O operations to support modern async frameworks
  • Pydantic at Boundary: Use Pydantic models only at the API boundary, not in domain layer
Common Pitfalls to Avoid
  • Anemic Domain Models: Entities with only getters/setters and no behavior violate DDD principles
  • Leaky Abstractions: ORM models leaking into domain layer creates tight coupling
  • Fat Controllers: Business logic in controllers instead of use cases defeats the architecture
  • Missing Abstractions: Direct database calls in use cases break the dependency rule
  • Circular Dependencies: Be careful with imports between layers - use dependency injection to avoid
  • Over-Engineering: Not every CRUD app needs full DDD - evaluate complexity before applying

References

  • references/python-clean-architecture.md - Python-specific patterns including Result type, Specification pattern, Event Bus, and manual DI
  • references/fastapi-implementation.md - Complete FastAPI example with middleware, Docker setup, and integration tests

© giuseppe-trisciuoglio, 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 2 other files (references) in plugins/developer-kit-python/skills/clean-architecture of giuseppe-trisciuoglio/developer-kit.

  • SKILL.md
  • references/fastapi-implementation.md
  • references/python-clean-architecture.md

Open the folder on GitHubat commit fe73fb3

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 skillgiuseppe-trisciuoglio/developer-kit357—~4.1kAutomated safety check: NotesMIT
Framework Migration AssistantArabelaTso/Skills-4-SE253—~1.9kAutomated safety check: PassApache-2.0
Mastering Python SkillSpillwaveSolutions/agent-brain119—~1.4kAutomated safety check: NotesMIT
Specx Diwire Compositionmaksimzayats/specx202—~1.1kAutomated safety check: PassMIT
Fix Slow Endpointvpcarlos/profyle123—~2.1kAutomated safety check: PassMIT
Sentry Python SDKgetsentry/sentry-for-ai268—~4.1kAutomated safety check: PassApache-2.0

Similar skills

  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Mastering Python Skill

    SpillwaveSolutions/agent-brain

    Modern Python coaching covering language foundations through advanced production patterns.

    119 GitHub stars~1.4k tokensUpdated 21 days ago
    DevelopmentAuto-check: notes
  • Specx Diwire Composition

    maksimzayats/specx

    Wire dependency injection for a specx Python service with diwire.

    202 GitHub stars~1.1k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Fix Slow Endpoint

    vpcarlos/profyle

    Diagnose and fix a slow endpoint or request in a Python web app (FastAPI, Flask, Django, Tornado, any ASGI/WSGI framework) using real Profyle/VizTracer traces, then prove the fix by replaying the…

    123 GitHub stars~2.1k tokensUpdated 6 days ago
    Backend & APIsAuto-check passed
  • Sentry Python SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Python. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~4.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Route To Openapi

    zebbern/claude-code-guide

    Generates RESTful API documentation (OpenAPI 3.0 / Swagger spec) by scanning route definitions in code for Flask, FastAPI, Express, Gin, and other frameworks.

    4.7k GitHub stars~1.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from giuseppe-trisciuoglio/developer-kit

All 115 skills in this repo
  • Nestjs Drizzle Crud Generator

    giuseppe-trisciuoglio/developer-kit

    Generates complete CRUD modules for NestJS applications with Drizzle ORM.

    357 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check: notes
  • Spring Boot Actuator

    giuseppe-trisciuoglio/developer-kit

    Provides patterns to configure Spring Boot Actuator for production-grade monitoring, health probes, secured management endpoints, and Micrometer metrics across JVM services.

    357 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check: notes
  • Spring Boot Crud Patterns

    giuseppe-trisciuoglio/developer-kit

    Provides and generates complete CRUD workflows for Spring Boot 3 services.

    357 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check: notes
  • Spring Boot Security JWT

    giuseppe-trisciuoglio/developer-kit

    Provides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based…

    357 GitHub stars~3.9k tokensUpdated 1 mo ago
    Auto-check: notes
  • AWS CLI Beast

    giuseppe-trisciuoglio/developer-kit

    Provides advanced AWS CLI patterns for managing EC2, Lambda, S3, DynamoDB, RDS, VPC, IAM, and CloudWatch.

    357 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check: notes
  • PR Review Comments

    giuseppe-trisciuoglio/developer-kit

    Posts review findings from a JSON file as inline comments on a GitHub Pull Request, attaching each comment to its file and line.

    357 GitHub stars~1k tokensUpdated 1 mo ago
    Auto-check: notes

Categories

Questions about Clean Architecture

What does Clean Architecture do?

Provides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Python applications with FastAPI or Flask. Clean Architecture is an agent skill from giuseppe-trisciuoglio/developer-kit. Provides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Python applications with FastAPI or Flask.

When should I use Clean Architecture?

Clean Architecture fits situations like: designing maintainable backends with separation of concerns; implementing repository patterns; creating entities/value objects/aggregates; structuring domain logic independent of frameworks for testability.

How do I install Clean Architecture in Claude Code?

Run `npx skills add giuseppe-trisciuoglio/developer-kit --skill clean-architecture -a claude-code`. Or copy the skill folder (plugins/developer-kit-python/skills/clean-architecture in giuseppe-trisciuoglio/developer-kit) 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 giuseppe-trisciuoglio/developer-kit --skill clean-architecture -a codex`. Or copy the skill folder (plugins/developer-kit-python/skills/clean-architecture in giuseppe-trisciuoglio/developer-kit) 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 giuseppe-trisciuoglio/developer-kit --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. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep, Bash.

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 notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. 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 4.1k tokens (SKILL.md is roughly 16k 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 8.6k 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: Framework Migration Assistant (ArabelaTso/Skills-4-SE, 253 stars), Mastering Python Skill (SpillwaveSolutions/agent-brain, 119 stars), Specx Diwire Composition (maksimzayats/specx, 202 stars) and Fix Slow Endpoint (vpcarlos/profyle, 123 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clean Architecture?

giuseppe-trisciuoglio (a GitHub user) maintains it in giuseppe-trisciuoglio/developer-kit, which has 357 GitHub stars. The repository holds 115 skills in this directory. The repository was last updated on September 10, 2026.

Source: giuseppe-trisciuoglio/developer-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.