Senior architect

This skill should be used when the user asks to "design system architecture", "evaluate microservices vs monolith", "create architecture diagrams", "analyze dependencies", "choose a database", "plan for scalability", "make technical decisions", or "review system design".

How to use it

Claude Code
  1. Run the line below. It pulls the whole folder into ~/.claude/skills/senior-architect, including the files SKILL.md points to.
  2. Describe your job in plain words. Claude Code follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit alirezarezvani/claude-skills/engineering-team/skills/senior-architect#main ~/.claude/skills/senior-architect

For one project only, change the path to .claude/skills/senior-architect. This skill also uses architecture.md, package.json, requirements.txt, UserService.ts, Next.js, Node.js — copying SKILL.md alone won't be enough. See the folder on GitHub.

Claude (web or desktop app)
  1. On this page open ⋯ → Download .md.
  2. Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
  3. Pick the file and Save. Claude shows the name and description and runs a security scan.
  4. Check the skill is switched on.
  5. Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
  1. ChatGPT: make a Project and paste it into Instructions.
  2. Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Source of Senior architect

Show the full text344 lines
namedescription
senior-architectThis skill should be used when the user asks to "design system architecture", "evaluate microservices vs monolith", "create architecture diagrams", "analyze dependencies", "choose a database", "plan for scalability", "make technical decisions", or "review system design". Use for architecture decision records (ADRs), tech stack evaluation, system design reviews, dependency analysis, and generating architecture diagrams in Mermaid, PlantUML, or ASCII format.

Senior Architect

Architecture design and analysis tools for making informed technical decisions.

Table of Contents


Quick Start

# Generate architecture diagram from project
python scripts/architecture_diagram_generator.py ./my-project --format mermaid

# Analyze dependencies for issues
python scripts/dependency_analyzer.py ./my-project --output json

# Get architecture assessment
python scripts/project_architect.py ./my-project --verbose

Tools Overview

1. Architecture Diagram Generator

Generates architecture diagrams from project structure in multiple formats.

Solves: "I need to visualize my system architecture for documentation or team discussion"

Input: Project directory path Output: Diagram code (Mermaid, PlantUML, or ASCII)

Supported diagram types:

  • component - Shows modules and their relationships
  • layer - Shows architectural layers (presentation, business, data)
  • deployment - Shows deployment topology

Usage:

# Mermaid format (default)
python scripts/architecture_diagram_generator.py ./project --format mermaid --type component

# PlantUML format
python scripts/architecture_diagram_generator.py ./project --format plantuml --type layer

# ASCII format (terminal-friendly)
python scripts/architecture_diagram_generator.py ./project --format ascii

# Save to file
python scripts/architecture_diagram_generator.py ./project -o architecture.md

Example output (Mermaid):

graph TD
    A[API Gateway] --> B[Auth Service]
    A --> C[User Service]
    B --> D[(PostgreSQL)]
    C --> D

2. Dependency Analyzer

Analyzes project dependencies for coupling, circular dependencies, and outdated packages.

Solves: "I need to understand my dependency tree and identify potential issues"

Input: Project directory path Output: Analysis report (JSON or human-readable)

Analyzes:

  • Dependency tree (direct and transitive)
  • Circular dependencies between modules
  • Coupling score (0-100)
  • Outdated packages

Supported package managers:

  • npm/yarn (package.json)
  • Python (requirements.txt, pyproject.toml)
  • Go (go.mod)
  • Rust (Cargo.toml)

Usage:

# Human-readable report
python scripts/dependency_analyzer.py ./project

# JSON output for CI/CD integration
python scripts/dependency_analyzer.py ./project --output json

# Check only for circular dependencies
python scripts/dependency_analyzer.py ./project --check circular

# Verbose mode with recommendations
python scripts/dependency_analyzer.py ./project --verbose

Example output:

Dependency Analysis Report
==========================
Total dependencies: 47 (32 direct, 15 transitive)
Coupling score: 72/100 (moderate)

Issues found:
- CIRCULAR: auth → user → permissions → auth
- OUTDATED: lodash 4.17.15 → 4.17.21 (security)

Recommendations:
1. Extract shared interface to break circular dependency
2. Update lodash to fix CVE-2020-8203

3. Project Architect

Analyzes project structure and detects architectural patterns, code smells, and improvement opportunities.

Solves: "I want to understand the current architecture and identify areas for improvement"

Input: Project directory path Output: Architecture assessment report

Detects:

  • Architectural patterns (MVC, layered, hexagonal, microservices indicators)
  • Code organization issues (god classes, mixed concerns)
  • Layer violations
  • Missing architectural components

Usage:

# Full assessment
python scripts/project_architect.py ./project

# Verbose with detailed recommendations
python scripts/project_architect.py ./project --verbose

# JSON output
python scripts/project_architect.py ./project --output json

# Check specific aspect
python scripts/project_architect.py ./project --check layers

Example output:

Architecture Assessment
=======================
Detected pattern: Layered Architecture (confidence: 85%)

Structure analysis:
  ✓ controllers/  - Presentation layer detected
  ✓ services/     - Business logic layer detected
  ✓ repositories/ - Data access layer detected
  ⚠ models/       - Mixed domain and DTOs

Issues:
- LARGE FILE: UserService.ts (1,847 lines) - consider splitting
- MIXED CONCERNS: PaymentController contains business logic

Recommendations:
1. Split UserService into focused services
2. Move business logic from controllers to services
3. Separate domain models from DTOs

Decision Workflows

Database Selection Workflow

Use when choosing a database for a new project or migrating existing data.

Step 1: Identify data characteristics

Characteristic Points to SQL Points to NoSQL
Structured with relationships ✓
ACID transactions required ✓
Flexible/evolving schema ✓
Document-oriented data ✓
Time-series data ✓ (specialized)

Step 2: Evaluate scale requirements

  • <1M records, single region → PostgreSQL or MySQL
  • 1M-100M records, read-heavy → PostgreSQL with read replicas
  • 100M records, global distribution → CockroachDB, Spanner, or DynamoDB

  • High write throughput (>10K/sec) → Cassandra or ScyllaDB

Step 3: Check consistency requirements

  • Strong consistency required → SQL or CockroachDB
  • Eventual consistency acceptable → DynamoDB, Cassandra, MongoDB

Step 4: Document decision Create an ADR (Architecture Decision Record) with:

  • Context and requirements
  • Options considered
  • Decision and rationale
  • Trade-offs accepted

Quick reference:

PostgreSQL → Default choice for most applications
MongoDB    → Document store, flexible schema
Redis      → Caching, sessions, real-time features
DynamoDB   → Serverless, auto-scaling, AWS-native
TimescaleDB → Time-series data with SQL interface

Architecture Pattern Selection Workflow

Use when designing a new system or refactoring existing architecture.

Step 1: Assess team and project size

Team Size Recommended Starting Point
1-3 developers Modular monolith
4-10 developers Modular monolith or service-oriented
10+ developers Consider microservices

Step 2: Evaluate deployment requirements

  • Single deployment unit acceptable → Monolith
  • Independent scaling needed → Microservices
  • Mixed (some services scale differently) → Hybrid

Step 3: Consider data boundaries

  • Shared database acceptable → Monolith or modular monolith
  • Strict data isolation required → Microservices with separate DBs
  • Event-driven communication fits → Event-sourcing/CQRS

Step 4: Match pattern to requirements

Requirement Recommended Pattern
Rapid MVP development Modular Monolith
Independent team deployment Microservices
Complex domain logic Domain-Driven Design
High read/write ratio difference CQRS
Audit trail required Event Sourcing
Third-party integrations Hexagonal/Ports & Adapters

See references/architecture_patterns.md for detailed pattern descriptions.


Monolith vs Microservices Decision

Choose Monolith when:

  • Team is small (<10 developers)
  • Domain boundaries are unclear
  • Rapid iteration is priority
  • Operational complexity must be minimized
  • Shared database is acceptable

Choose Microservices when:

  • Teams can own services end-to-end
  • Independent deployment is critical
  • Different scaling requirements per component
  • Technology diversity is needed
  • Domain boundaries are well understood

Hybrid approach: Start with a modular monolith. Extract services only when:

  1. A module has significantly different scaling needs
  2. A team needs independent deployment
  3. Technology constraints require separation

Reference Documentation

Load these files for detailed information:

File Contains Load when user asks about
references/architecture_patterns.md 9 architecture patterns with trade-offs, code examples, and when to use "which pattern?", "microservices vs monolith", "event-driven", "CQRS"
references/system_design_workflows.md 6 step-by-step workflows for system design tasks "how to design?", "capacity planning", "API design", "migration"
references/tech_decision_guide.md Decision matrices for technology choices "which database?", "which framework?", "which cloud?", "which cache?"

Tech Stack Coverage

Languages: TypeScript, JavaScript, Python, Go, Swift, Kotlin, Rust Frontend: React, Next.js, Vue, Angular, React Native, Flutter Backend: Node.js, Express, FastAPI, Go, GraphQL, REST Databases: PostgreSQL, MySQL, MongoDB, Redis, DynamoDB, Cassandra Infrastructure: Docker, Kubernetes, Terraform, AWS, GCP, Azure CI/CD: GitHub Actions, GitLab CI, CircleCI, Jenkins


Common Commands

# Architecture visualization
python scripts/architecture_diagram_generator.py . --format mermaid
python scripts/architecture_diagram_generator.py . --format plantuml
python scripts/architecture_diagram_generator.py . --format ascii

# Dependency analysis
python scripts/dependency_analyzer.py . --verbose
python scripts/dependency_analyzer.py . --check circular
python scripts/dependency_analyzer.py . --output json

# Architecture assessment
python scripts/project_architect.py . --verbose
python scripts/project_architect.py . --check layers
python scripts/project_architect.py . --output json

Getting Help

  1. Run any script with --help for usage information
  2. Check reference documentation for detailed patterns and workflows
  3. Use --verbose flag for detailed explanations and recommendations
1---
2name: "senior-architect"
3description: This skill should be used when the user asks to "design system architecture", "evaluate microservices vs monolith", "create architecture diagrams", "analyze dependencies", "choose a database", "plan for scalability", "make technical decisions", or "review system design". Use for architecture decision records (ADRs), tech stack evaluation, system design reviews, dependency analysis, and generating architecture diagrams in Mermaid, PlantUML, or ASCII format.
4---
5 
6# Senior Architect
7 
8Architecture design and analysis tools for making informed technical decisions.
9 
10## Table of Contents
11 
12- [Quick Start](#quick-start)
13- [Tools Overview](#tools-overview)
14 - [Architecture Diagram Generator](#1-architecture-diagram-generator)
15 - [Dependency Analyzer](#2-dependency-analyzer)
16 - [Project Architect](#3-project-architect)
17- [Decision Workflows](#decision-workflows)
18 - [Database Selection](#database-selection-workflow)
19 - [Architecture Pattern Selection](#architecture-pattern-selection-workflow)
20 - [Monolith vs Microservices](#monolith-vs-microservices-decision)
21- [Reference Documentation](#reference-documentation)
22- [Tech Stack Coverage](#tech-stack-coverage)
23- [Common Commands](#common-commands)
24 
25---
26 
27## Quick Start
28 
29```bash
30# Generate architecture diagram from project
31python scripts/architecture_diagram_generator.py ./my-project --format mermaid
32 
33# Analyze dependencies for issues
34python scripts/dependency_analyzer.py ./my-project --output json
35 
36# Get architecture assessment
37python scripts/project_architect.py ./my-project --verbose
38```
39 
40---
41 
42## Tools Overview
43 
44### 1. Architecture Diagram Generator
45 
46Generates architecture diagrams from project structure in multiple formats.
47 
48**Solves:** "I need to visualize my system architecture for documentation or team discussion"
49 
50**Input:** Project directory path
51**Output:** Diagram code (Mermaid, PlantUML, or ASCII)
52 
53**Supported diagram types:**
54- `component` - Shows modules and their relationships
55- `layer` - Shows architectural layers (presentation, business, data)
56- `deployment` - Shows deployment topology
57 
58**Usage:**
59```bash
60# Mermaid format (default)
61python scripts/architecture_diagram_generator.py ./project --format mermaid --type component
62 
63# PlantUML format
64python scripts/architecture_diagram_generator.py ./project --format plantuml --type layer
65 
66# ASCII format (terminal-friendly)
67python scripts/architecture_diagram_generator.py ./project --format ascii
68 
69# Save to file
70python scripts/architecture_diagram_generator.py ./project -o architecture.md
71```
72 
73**Example output (Mermaid):**
74```mermaid
75graph TD
76 A[API Gateway] --> B[Auth Service]
77 A --> C[User Service]
78 B --> D[(PostgreSQL)]
79 C --> D
80```
81 
82---
83 
84### 2. Dependency Analyzer
85 
86Analyzes project dependencies for coupling, circular dependencies, and outdated packages.
87 
88**Solves:** "I need to understand my dependency tree and identify potential issues"
89 
90**Input:** Project directory path
91**Output:** Analysis report (JSON or human-readable)
92 
93**Analyzes:**
94- Dependency tree (direct and transitive)
95- Circular dependencies between modules
96- Coupling score (0-100)
97- Outdated packages
98 
99**Supported package managers:**
100- npm/yarn (`package.json`)
101- Python (`requirements.txt`, `pyproject.toml`)
102- Go (`go.mod`)
103- Rust (`Cargo.toml`)
104 
105**Usage:**
106```bash
107# Human-readable report
108python scripts/dependency_analyzer.py ./project
109 
110# JSON output for CI/CD integration
111python scripts/dependency_analyzer.py ./project --output json
112 
113# Check only for circular dependencies
114python scripts/dependency_analyzer.py ./project --check circular
115 
116# Verbose mode with recommendations
117python scripts/dependency_analyzer.py ./project --verbose
118```
119 
120**Example output:**
121```
122Dependency Analysis Report
123==========================
124Total dependencies: 47 (32 direct, 15 transitive)
125Coupling score: 72/100 (moderate)
126 
127Issues found:
128- CIRCULAR: auth → user → permissions → auth
129- OUTDATED: lodash 4.17.15 → 4.17.21 (security)
130 
131Recommendations:
1321. Extract shared interface to break circular dependency
1332. Update lodash to fix CVE-2020-8203
134```
135 
136---
137 
138### 3. Project Architect
139 
140Analyzes project structure and detects architectural patterns, code smells, and improvement opportunities.
141 
142**Solves:** "I want to understand the current architecture and identify areas for improvement"
143 
144**Input:** Project directory path
145**Output:** Architecture assessment report
146 
147**Detects:**
148- Architectural patterns (MVC, layered, hexagonal, microservices indicators)
149- Code organization issues (god classes, mixed concerns)
150- Layer violations
151- Missing architectural components
152 
153**Usage:**
154```bash
155# Full assessment
156python scripts/project_architect.py ./project
157 
158# Verbose with detailed recommendations
159python scripts/project_architect.py ./project --verbose
160 
161# JSON output
162python scripts/project_architect.py ./project --output json
163 
164# Check specific aspect
165python scripts/project_architect.py ./project --check layers
166```
167 
168**Example output:**
169```
170Architecture Assessment
171=======================
172Detected pattern: Layered Architecture (confidence: 85%)
173 
174Structure analysis:
175 ✓ controllers/ - Presentation layer detected
176 ✓ services/ - Business logic layer detected
177 ✓ repositories/ - Data access layer detected
178 ⚠ models/ - Mixed domain and DTOs
179 
180Issues:
181- LARGE FILE: UserService.ts (1,847 lines) - consider splitting
182- MIXED CONCERNS: PaymentController contains business logic
183 
184Recommendations:
1851. Split UserService into focused services
1862. Move business logic from controllers to services
1873. Separate domain models from DTOs
188```
189 
190---
191 
192## Decision Workflows
193 
194### Database Selection Workflow
195 
196Use when choosing a database for a new project or migrating existing data.
197 
198**Step 1: Identify data characteristics**
199| Characteristic | Points to SQL | Points to NoSQL |
200|----------------|---------------|-----------------|
201| Structured with relationships | ✓ | |
202| ACID transactions required | ✓ | |
203| Flexible/evolving schema | | ✓ |
204| Document-oriented data | | ✓ |
205| Time-series data | | ✓ (specialized) |
206 
207**Step 2: Evaluate scale requirements**
208- <1M records, single region → PostgreSQL or MySQL
209- 1M-100M records, read-heavy → PostgreSQL with read replicas
210- >100M records, global distribution → CockroachDB, Spanner, or DynamoDB
211- High write throughput (>10K/sec) → Cassandra or ScyllaDB
212 
213**Step 3: Check consistency requirements**
214- Strong consistency required → SQL or CockroachDB
215- Eventual consistency acceptable → DynamoDB, Cassandra, MongoDB
216 
217**Step 4: Document decision**
218Create an ADR (Architecture Decision Record) with:
219- Context and requirements
220- Options considered
221- Decision and rationale
222- Trade-offs accepted
223 
224**Quick reference:**
225```
226PostgreSQL → Default choice for most applications
227MongoDB → Document store, flexible schema
228Redis → Caching, sessions, real-time features
229DynamoDB → Serverless, auto-scaling, AWS-native
230TimescaleDB → Time-series data with SQL interface
231```
232 
233---
234 
235### Architecture Pattern Selection Workflow
236 
237Use when designing a new system or refactoring existing architecture.
238 
239**Step 1: Assess team and project size**
240| Team Size | Recommended Starting Point |
241|-----------|---------------------------|
242| 1-3 developers | Modular monolith |
243| 4-10 developers | Modular monolith or service-oriented |
244| 10+ developers | Consider microservices |
245 
246**Step 2: Evaluate deployment requirements**
247- Single deployment unit acceptable → Monolith
248- Independent scaling needed → Microservices
249- Mixed (some services scale differently) → Hybrid
250 
251**Step 3: Consider data boundaries**
252- Shared database acceptable → Monolith or modular monolith
253- Strict data isolation required → Microservices with separate DBs
254- Event-driven communication fits → Event-sourcing/CQRS
255 
256**Step 4: Match pattern to requirements**
257 
258| Requirement | Recommended Pattern |
259|-------------|-------------------|
260| Rapid MVP development | Modular Monolith |
261| Independent team deployment | Microservices |
262| Complex domain logic | Domain-Driven Design |
263| High read/write ratio difference | CQRS |
264| Audit trail required | Event Sourcing |
265| Third-party integrations | Hexagonal/Ports & Adapters |
266 
267See `references/architecture_patterns.md` for detailed pattern descriptions.
268 
269---
270 
271### Monolith vs Microservices Decision
272 
273**Choose Monolith when:**
274- [ ] Team is small (<10 developers)
275- [ ] Domain boundaries are unclear
276- [ ] Rapid iteration is priority
277- [ ] Operational complexity must be minimized
278- [ ] Shared database is acceptable
279 
280**Choose Microservices when:**
281- [ ] Teams can own services end-to-end
282- [ ] Independent deployment is critical
283- [ ] Different scaling requirements per component
284- [ ] Technology diversity is needed
285- [ ] Domain boundaries are well understood
286 
287**Hybrid approach:**
288Start with a modular monolith. Extract services only when:
2891. A module has significantly different scaling needs
2902. A team needs independent deployment
2913. Technology constraints require separation
292 
293---
294 
295## Reference Documentation
296 
297Load these files for detailed information:
298 
299| File | Contains | Load when user asks about |
300|------|----------|--------------------------|
301| `references/architecture_patterns.md` | 9 architecture patterns with trade-offs, code examples, and when to use | "which pattern?", "microservices vs monolith", "event-driven", "CQRS" |
302| `references/system_design_workflows.md` | 6 step-by-step workflows for system design tasks | "how to design?", "capacity planning", "API design", "migration" |
303| `references/tech_decision_guide.md` | Decision matrices for technology choices | "which database?", "which framework?", "which cloud?", "which cache?" |
304 
305---
306 
307## Tech Stack Coverage
308 
309**Languages:** TypeScript, JavaScript, Python, Go, Swift, Kotlin, Rust
310**Frontend:** React, Next.js, Vue, Angular, React Native, Flutter
311**Backend:** Node.js, Express, FastAPI, Go, GraphQL, REST
312**Databases:** PostgreSQL, MySQL, MongoDB, Redis, DynamoDB, Cassandra
313**Infrastructure:** Docker, Kubernetes, Terraform, AWS, GCP, Azure
314**CI/CD:** GitHub Actions, GitLab CI, CircleCI, Jenkins
315 
316---
317 
318## Common Commands
319 
320```bash
321# Architecture visualization
322python scripts/architecture_diagram_generator.py . --format mermaid
323python scripts/architecture_diagram_generator.py . --format plantuml
324python scripts/architecture_diagram_generator.py . --format ascii
325 
326# Dependency analysis
327python scripts/dependency_analyzer.py . --verbose
328python scripts/dependency_analyzer.py . --check circular
329python scripts/dependency_analyzer.py . --output json
330 
331# Architecture assessment
332python scripts/project_architect.py . --verbose
333python scripts/project_architect.py . --check layers
334python scripts/project_architect.py . --output json
335```
336 
337---
338 
339## Getting Help
340 
3411. Run any script with `--help` for usage information
3422. Check reference documentation for detailed patterns and workflows
3433. Use `--verbose` flag for detailed explanations and recommendations
344 

Discussion

Alternatives

Also in ArchitectureSee all 533 in Development →
A Philosophy of Software Design FrameworkManage software complexity through deep modules, information hiding, and strategic programming. Use when the user mentions "module design", "API too complex", "shallow class", "complexity budget", "strategic vs tactical", "deep module", "information leakage", "pass-through method", "this code is over-engineered", or "simplify this design". Also trigger when reviewing an interface for simplicity, evaluating whether an abstraction is pulling its weight, deciding whether a comment is worth writing, or choosing between general-purpose and special-purpose approaches. Covers deep vs shallow modules, red flags for complexity, and comments as design documentation. For code quality, see clean-code. For architecture boundaries, see clean-architecture.Coding · MITArchitecture optimizationGuided journey from a working codebase grown slow and tangled to one measurably fast, cleanly bounded, and readable. Orchestrates eight skills phase by phase - working-with-legacy-code, clean-architecture, software-design-philosophy, refactoring-patterns, system-design, ddia-systems, release-it, pragmatic-programmer - every phase carries its method inline so it runs standalone, asking the user questions at every decision point and recording results in the project docs/ folder (PERFORMANCE.md, ARCHITECTURE.md, ARCHITECTURE-OPTIMIZATION-PLAN.md) so the journey resumes across sessions. Use when the user wants to make an app faster, untangle drifted boundaries, fix slow endpoints and queries, or says ''it works but it is slow and getting worse''. For an untested prototype, improve-code-quality; for an aged codebase you fear to touch, remove-technical-debt; for greenfield structure, design-code-architecture; for marketing-site page speed, improve-website. For one framework in isolation, invoke that skill directly.Coding · MITArchitecture & UI/UX AuditIt asks an AI to assume the persona of a Senior Frontend Engineer & Product Reviewer to perform a high-level critique of a Next.js (App Router) project. Instead of writing code, the prompt focuses on evaluating the architecture (folder structure, scalability), UI/UX (hierarchy, consistency), and design system (component reuse) of a developer community platform to identify anti-patterns and suggest high-impact improvements.Coding · CC0-1.0Candle pattern trading chart generatorGenerate a chart showing buy below and sell above candle patterns to indicate optimal trading points.Coding · CC0-1.0