Agent skill
architecture-patterns
A specialist skill that recognises and applies common software architecture patterns within a codebase. This skill should be used during the design and development phases of a project.
Install this agent skill to your Project
npx add-skill https://github.com/nicholasgriffintn/claude-code/tree/main/skills/architecture-patterns
SKILL.md
Architecture Patterns Skill
Tooling Notes
This skill should only use read-only commands and avoid modifying files.
Workflow
Copy this checklist and use it to track your progress through the performance optimisation process:
Architecture Patterns Checklist
- [ ] Understand Requirements
- [ ] Gather and analyse the functional and non-functional requirements of the project.
- [ ] Identify Suitable Patterns
- [ ] Review common architecture patterns (e.g., MVC, Microservices, Layered, Event-Driven).
- [ ] Select patterns that align with project requirements and constraints.
- [ ] Design Architecture
- [ ] Create high-level diagrams illustrating the chosen architecture patterns.
- [ ] Define components, their interactions, and data flow.
- [ ] Document trade-offs
- [ ] Document the advantages and disadvantages of the selected patterns.
- [ ] Justify the choice of patterns based on project needs.
- [ ] Review and Validate
Appropriate Patterns
Here are some common software architecture patterns and their typical use cases:
- Model-View-Controller (MVC): Suitable for web applications with a clear separation between data (Model), user interface (View), and business logic (Controller).
- Layered Architecture: Useful for applications that benefit from separation of concerns, with distinct layers for presentation, business logic, and data access.
- Event-Driven Architecture: Best for applications that need to respond to events asynchronously, such as real-time systems.
MVC Pattern Diagram
┌───────────────┐
│ View │ ← User Interface
└──────┬────────┘
│
┌──────▼────────┐
│ Controller │ ← Business Logic
└──────┬────────┘
│
┌──────▼────────┐
│ Model │ ← Data Management
└───────────────┘
Layered Architecture Diagram
┌─────────────────────────────┐
│ Presentation │ ← UI, API Controllers
├─────────────────────────────┤
│ Application │ ← Use Cases, Services
├─────────────────────────────┤
│ Domain │ ← Business Logic, Entities
├─────────────────────────────┤
│ Infrastructure │ ← Database, External APIs
└─────────────────────────────┘
Event Driven Architecture Diagram
┌───────────────┐ ┌───────────────┐
│ Event │─────▶│ Event │
│ Producer │ │ Consumer │
└───────────────┘ └───────────────┘
│ │
│ │
▼ ▼
┌────────────────────────────────┐
│ Event Bus / Queue │ ← Message Broker
└────────────────────────────────┘
Decision Framework
When selecting architecture patterns, consider the following framework:
- Scalability: Will the pattern support future growth in users and data?
- Maintainability: Does the pattern facilitate easy updates and modifications?
- Performance: Will the pattern meet the performance requirements of the application?
- Complexity: Is the pattern appropriate for the complexity of the project, or does it introduce unnecessary overhead?
- Team Expertise: Does the development team have experience with the chosen patterns?
Output Template
When documenting the architecture patterns applied, use the following template:
# Decision Record: [What was decided]
## Project Overview
A brief summary of the project, its purpose, and main features.
## Options Considered
A list of architecture patterns considered for the project.
## Trade-offs
A detailed analysis of the advantages and disadvantages of each considered pattern.
## Decision
The chosen architecture.
## Consequences
A summary of the expected outcomes and any potential challenges associated with the chosen architecture.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
testing-strategy
A specialist skill that designs and implements a testing strategy for a codebase. This skill should be used after code development and before code review.
project-analysis
A specialist skill that analyses a codebase to understand its structure, dependencies, and architecture. This skill should be used at the start of a new project or when onboarding to an existing codebase.
backend-design
Design robust backend systems and APIs. Use when users ask to plan or implement services, data models, or integrations.
security-review
A specialist skill for security reviews, threat modeling, and remediation guidance. Use for auth/permissions changes, secrets or PII handling, public endpoints, or dependency upgrades.
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use when users ask to build web components, pages, or applications.
performance-optimisation
Analyses and optimises performance across frontend, backend and database interactions. Identifies bottlenecks and implements solutions to enhance speed and efficiency.
Didn't find tool you were looking for?