SE

senior-architect

Architectural support for building scalable, decoupled systems with layer enforcement.

Install

mkdir -p .claude/skills/senior-architect-peadarpol && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9754" && unzip -o skill.zip -d .claude/skills/senior-architect-peadarpol && rm skill.zip

Installs to .claude/skills/senior-architect-peadarpol

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Comprehensive software architecture skill for designing scalable systems using Clean Architecture/DDD. Includes dependency analysis for layer enforcement.
154 charsno explicit “when” trigger
Advanced

Key capabilities

  • Verify architecture layer dependencies
  • Enforce Clean Architecture boundaries
  • Implement Domain-Driven Design patterns
  • Analyze dependency flow between layers

How it works

The skill uses automated scripts to analyze imports and enforce structural rules that ensure business logic remains decoupled from infrastructure.

Inputs & outputs

You give it
Project source directory
You get back
Dependency violation report

When to use senior-architect

  • Verifying architecture layers
  • Enforcing dependency flow
  • Implementing domain-driven design
  • Decoupling persistence logic

About this skill

Senior Architect

Overview

Maintain structural integrity using Clean Architecture and Domain-Driven Design (DDD). This skill provides tools to verify that dependencies flow towards the domain and that layers remain isolated.

Main Capabilities

This skill provides automated structural verification for the project:

# Script: Dependency Analyzer
# Checks for layer violations (e.g., domain importing infrastructure)
python .agent/skills/senior-architect/scripts/dependency_analyzer.py src/

Architecture Layers

LayerResponsibilityAllowed Dependencies
DomainBusiness logic, Entities, AggregatesNone (External libraries only)
ApplicationUse cases, Services, DTOs, IUnitOfWorkDomain
InfrastructureDatabase, External APIs, UnitOfWorkImplDomain, Application
PresentationUI, APIApplication, Domain

Dependency Rules

  1. Inner Circle First: Nothing in the domain/ directory should import from application/, infrastructure/, or presentation/.
  2. Persistence Ignorance: Entities should not know how they are stored (No DB-specific ORM imports in domain/).
  3. Repository Pattern: Infrastructure implements interfaces defined in the domain/application layers.

Best Practices

  • Bounded Contexts: Keep related models within their functional modules.
  • DTOs vs Entities: Always use Pydantic DTOs for data transfer across layer boundaries.
  • Protocol-Based Type Safety: Use domain protocols to decouple the service layer from concrete model implementations. This ensures type safety and compliance.
  • Strict Exception Handling: Refuse any architecture where broad exceptions are suppressed or ignored. Ensure all exception blocks are accompanied by a raise.
  • Unit of Work Pattern: Use IUnitOfWork (in application layer) to group multiple operations into a single transaction. Services should depend on IUnitOfWork, not individual repositories.
  • Dependency Injection: Use framework-specific dependency injection to inject IUnitOfWork into services.
  • Event-Driven Decoupling: Services focus on Decision Making and State Changes. Side effects (Notifications, Analytics, Integrations) belong in Event Handlers.
  • Layer Rule: Handlers live in the application layer and subscribe in the infrastructure event bus layer.

New Architectural Enforcement (2026)

  • Linter: Use python .agent/skills/senior-architect/scripts/architecture_checks.py for automated boundary checks.
  • DTO Isolation: Strictly enforce that domain/ and application/ are free of presentation/ and web framework imports.
  • Mypy Strictness: Use static checks for the domain and application layers.
  • Async Safety: Use proper event loop policy management in test configurations.

Troubleshooting

If the dependency_analyzer.py reports a violation:

  1. Identify the file and the "forbidden" import.
  2. If it's a cross-layer dependency, consider introducing an Interface/Protocol in the inner layer and implementing it in the outer layer.
  3. If it's a circular dependency within a layer, refactor shared logic into a common or utils module.
  4. If a Service is importing another Service purely for a side effect, refactor to use a Domain Event instead.

When not to use it

  • When importing infrastructure into the domain layer
  • When suppressing exceptions without handling

Prerequisites

Python

Limitations

  • Requires strict adherence to layer responsibilities
  • Domain layer must remain free of framework imports

How it compares

It provides automated structural enforcement for Clean Architecture rather than manual architectural review.

Compared to similar skills

senior-architect side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
senior-architect (this skill)01moReviewAdvanced
mcp-builder1363moReviewAdvanced
architecture-patterns552moNo flagsAdvanced
deepwiki-rs259moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

mcp-builder

anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

136215

architecture-patterns

wshobson

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex backend systems or refactoring existing applications for better maintainability.

55214

deepwiki-rs

sopaco

AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.

25170

langchain-architecture

wshobson

Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.

899

python-design-patterns

wshobson

Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance. Use when making architecture decisions, refactoring code structure, or evaluating when abstractions are appropriate.

1969

python-project-structure

wshobson

Python project organization, module architecture, and public API design. Use when setting up new projects, organizing modules, defining public interfaces with __all__, or planning directory layouts.

860

Search skills

Search the agent skills registry