Senior architect

From seaworld008/Commonly-used-high-value-skills · View interactive version

Senior architect is an AI agent skill from the GitHub repository seaworld008/Commonly-used-high-value-skills. Design or review system architecture, technical tradeoffs, dependencies, and scalability; produce diagrams and decision records grounded in requirements.

How to use this skill

Skill file

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:

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

Reports manifest direct/development dependencies and heuristic internal-module

cycles/coupling. It does not resolve the full transitive tree, query registry

versions or verify CVEs. Use the project's existing dependency/audit tooling for

those results and record its evidence separately.

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

Input: Project directory path

Output: Analysis report (JSON or human-readable)

Analyzes:

Supported package managers:

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

Illustrative report fields (values are not measured results):

Dependency Analysis Report
==========================
Direct dependencies: 32
Dev dependencies: 15
Internal modules: 8
Coupling score: 72/100 (high - consider refactoring)

Issues found:
- CIRCULAR: auth → user → permissions → auth

Recommendations:
1. Extract shared interface to break circular dependency
2. Verify any version/CVE concerns separately with project dependency tooling

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:

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

Step 3: Check consistency requirements

Step 4: Document decision

Create an ADR (Architecture Decision Record) with:

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

Step 3: Consider data boundaries

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:

Choose Microservices when:

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
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.