sequenzia/agent-alchemy/architecture-patterns
Claude Code and agent skill by sequenzia/agent-alchemy
- community
Checking that the SKILL.md file is still in the repository.
Provides architectural pattern knowledge for designing feature implementations including MVC, event-driven, microservices, and CQRS patterns. Use when designing system architecture or choosing implementation patterns.
Install
npx vskill@latest install sequenzia/agent-alchemy/architecture-patternsSKILL.md
The same SKILL.md was published earlier as sequenzia/agent-alchemy/architecture-patterns.
Architecture Patterns
This skill provides knowledge about common architectural patterns to help design feature implementations. Apply these patterns based on the project's existing architecture and the feature's requirements.
Diagram Convention
Architecture visualizations use Mermaid syntax with classDef styling (color:#000 for text readability). When creating architecture visualizations based on these patterns, follow the technical-diagrams skill conventions.
Pattern Selection Guide
Choose patterns based on:
- Existing architecture - Match what's already in use
- Team familiarity - Use patterns the team knows
- Feature requirements - Some patterns fit better for certain features
- Scale requirements - Consider current and future scale
Layered Architecture (N-Tier)
When to use: Most web applications, CRUD operations, clear separation of concerns needed
Layers:
Key rules:
- Dependencies flow downward only
- Each layer only talks to the layer directly below
- Domain layer has no external dependencies
Implementation tips:
- Use interfaces at layer boundaries
- Keep domain logic in the domain layer, not controllers
- Use DTOs to transfer data between layers
MVC (Model-View-Controller)
When to use: Web applications with server-rendered views, simple CRUD apps
Components:
Model: Data and business logic View: Presentation/UI Controller: Handles input, coordinates model and view
Implementation tips:
- Keep controllers thin - delegate to services
- Models should be framework-agnostic when possible
- Views should have minimal logic
Repository Pattern
When to use: Data access abstraction, testability, multiple data sources
Structure:
Benefits:
- Abstracts data access details
- Easy to swap implementations
- Simplifies testing with in-memory implementations
Service Layer Pattern
When to use: Complex business logic, multiple entry points (API, CLI, queue)
Structure:
Implementation tips:
- Services contain business logic, not controllers
- One service per domain concept
- Services can call other services (but avoid cycles)
Event-Driven Architecture
When to use: Decoupled components, async processing, audit trails, notifications
Patterns:
Event Emitter (Simple)
Message Queue (Distributed)
Event structure:
Implementation tips:
- Events should be immutable
- Include enough context to process without additional queries
- Handle idempotency for at-least-once delivery
CQRS (Command Query Responsibility Segregation)
When to use: Complex domains, different read/write patterns, high-performance reads needed
Structure:
Simplified CQRS:
Implementation tips:
- Start simple - same database, different models
- Use for complex domains where read/write models differ
- Consider eventual consistency implications
Ports and Adapters (Hexagonal)
When to use: High testability needs, multiple I/O channels, long-lived applications
Structure:
Key concept: Business logic at center, all I/O through ports/adapters
Implementation tips:
- Define ports (interfaces) for all external interactions
- Adapters implement ports for specific technologies
- Domain code never imports adapter code
Microservices Patterns
When to use: Large teams, independent deployability, different scaling needs
API Gateway
Single entry point that routes to services
Service Discovery
Services register themselves, clients look them up
Circuit Breaker
Prevent cascade failures when services are down
Saga Pattern
Coordinate transactions across services
Choosing the Right Pattern
| Scenario | Recommended Pattern | |
|---|---|---|
| Simple CRUD app | MVC + Repository | |
| Complex business logic | Layered + Service Layer | |
| Need audit trail | Event-Driven | |
| High read/write disparity | CQRS | |
| Maximum testability | Hexagonal | |
| Multiple teams/services | Microservices patterns |
Anti-Patterns to Avoid
- Big Ball of Mud - No clear structure
- God Object - One class does everything
- Spaghetti Code - Tangled dependencies
- Golden Hammer - Using one pattern for everything
- Premature Optimization - Complex patterns for simple needs
Application Guidelines
- Match existing architecture - Don't introduce new patterns unnecessarily
- Start simple - Add complexity only when needed
- Document decisions - Explain why a pattern was chosen
- Consider team skills - A simpler pattern well-executed beats a complex one poorly understood
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude/dev-tools/skills/architecture-patterns/SKILL.md
Popularity
- Repository stars
- 42
- Repository forks
- 7
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sequenzia/agent-alchemy/architecture-patterns)