Token导航 LogoToken导航TokenDH.com
前端设计可写文件github未标认证来源可访问clear审计通过

senior-architect高级建筑师

Agent Skill

senior-architect 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,575

周安装

152

GitHub Stars

103

下载量

1,252
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:senior-architect(高级建筑师)
来源仓库:https://github.com/borghei/claude-skills
仓库路径:skills/senior-architect
安装命令:
npx skills add https://github.com/borghei/claude-skills --skill senior-architect
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/borghei/claude-skills --skill senior-architect

简介

senior-architect 生成项目架构图与依赖关系分析报告。

  • 支持数据库选型与微服务拆分建议,辅助技术决策。
  • 提供常见架构模式参考与风险评估模板。
  • 复杂系统改造前应进行充分论证与 PoC 验证。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Senior Architect

Architecture design and analysis tools for making informed technical decisions.

Table of Contents

- Architecture Diagram Generator - Dependency Analyzer - Project Architect

- Database Selection - Architecture Pattern Selection - Monolith vs Microservices


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

CharacteristicPoints to SQLPoints 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 SizeRecommended Starting Point
1-3 developersModular monolith
4-10 developersModular monolith or service-oriented
10+ developersConsider 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

RequirementRecommended Pattern
Rapid MVP developmentModular Monolith
Independent team deploymentMicroservices
Complex domain logicDomain-Driven Design
High read/write ratio differenceCQRS
Audit trail requiredEvent Sourcing
Third-party integrationsHexagonal/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:

FileContainsLoad when user asks about
references/architecture_patterns.md9 architecture patterns with trade-offs, code examples, and when to use"which pattern?", "microservices vs monolith", "event-driven", "CQRS"
references/system_design_workflows.md6 step-by-step workflows for system design tasks"how to design?", "capacity planning", "API design", "migration"
references/tech_decision_guide.mdDecision 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

Troubleshooting

ProblemCauseSolution
Diagram shows zero componentsProject uses non-standard directory structure or all directories are in the ignore list (e.g., node_modules, .venv)Ensure source code lives in named subdirectories at the project root, not solely in ignored folders
Circular dependency detection misses cyclesImport statements use aliases, dynamic imports, or barrel files that obscure the dependency chainRun dependency_analyzer.py --verbose to inspect resolved module graph; refactor barrel re-exports into explicit imports
Coupling score always reads 0Project has only one internal module (flat file structure with no subdirectories)Organize code into multiple top-level directories so the analyzer can map inter-module relationships
Layer assignment shows all directories as "unknown"Directory names do not match built-in layer indicators (e.g., src/ instead of services/, controllers/)Rename directories to conventional names or use the JSON output to manually map layers in your ADR
--format plantuml output renders incorrectlyComponent names contain special characters (brackets, quotes) that PlantUML cannot escapeRename directories to use alphanumeric and hyphen characters only
Dependency parser reports 0 dependenciesPackage manifest file (package.json, requirements.txt, go.mod, Cargo.toml) is missing or malformedVerify the manifest exists in the project root and passes its native validation (npm ls, pip check, go mod verify)
Architecture assessment confidence below 30%Project mixes multiple patterns or has a flat structure without clear layeringPick a target pattern from references/architecture_patterns.md and restructure directories to match its conventions

Success Criteria

  • Coupling score below 30: The dependency analyzer reports a coupling score under 30/100, indicating loosely coupled modules with clear boundaries.
  • Zero circular dependencies: Running dependency_analyzer.py --check circular exits with code 0 and reports no cycles.
  • Zero layer violations: Running project_architect.py --check layers detects no cross-layer dependency violations.
  • Architecture pattern confidence above 70%: The project architect detects a recognized pattern (layered, clean, hexagonal, MVC) with at least 70% confidence.
  • No god classes detected: Every class in the codebase stays below 300 lines, with no god_class issues in the assessment report.
  • Average file size under 250 lines: The code quality metrics show avg_file_lines well below the 500-line threshold, indicating well-decomposed modules.
  • ADR created for every major decision: Each architecture decision is documented using the ADR template from the database selection or pattern selection workflow.

Scope & Limitations

What this skill covers:

  • System-level architecture analysis: pattern detection, layer validation, and component diagramming for existing codebases.
  • Technology-agnostic dependency analysis across npm, pip, Poetry, Go modules, and Cargo.
  • Architecture decision workflows for database selection, pattern selection, and monolith-vs-microservices trade-offs.
  • Diagram generation in Mermaid, PlantUML, and ASCII formats for documentation and team review.

What this skill does NOT cover:

  • Runtime performance profiling or load testing -- use senior-devops for infrastructure capacity planning and senior-qa for performance test harnesses.
  • Security vulnerability scanning of dependencies -- use senior-security or senior-secops for CVE detection and SAST/DAST analysis.
  • Frontend component architecture and design system auditing -- use senior-frontend for React/Vue/Angular component patterns and design-auditor for UI consistency checks.
  • CI/CD pipeline design and deployment orchestration -- use senior-devops for pipeline configuration and release-orchestrator for release workflows.

Integration Points

SkillIntegrationData Flow
senior-backendArchitecture patterns inform backend service boundaries and API contract designArchitect assessment output (detected pattern, layer assignments) feeds into backend module scaffolding
senior-devopsDeployment diagrams and technology detection drive infrastructure-as-code decisionsDeployment diagram type output + detected technologies list consumed by DevOps for Terraform/K8s config
senior-securityDependency analysis surfaces packages that need security reviewDependency list JSON (--output json) passed to security scanning for CVE correlation
senior-fullstackArchitecture pattern selection determines which fullstack scaffold template to usePattern selection workflow result (e.g., modular monolith) maps to project_scaffolder.py --type flag
code-reviewerLayer violation and god-class findings become review checklist itemsproject_architect.py --output json issues array integrated into code review checklists
tech-stack-evaluatorTechnology detection results feed tech stack evaluation for upgrade/migration decisionsDetected technologies list and dependency versions inform stack evaluation decision matrices

Tool Reference

architecture_diagram_generator.py

  • Purpose: Generates architecture diagrams from project directory structure in Mermaid, PlantUML, or ASCII format.
  • Usage: python scripts/architecture_diagram_generator.py <project_path> [flags]
  • Flags:
FlagShortTypeDefaultDescription
project_path--positionalrequiredPath to the project directory to scan
--format-fchoice: mermaid, plantuml, asciimermaidOutput diagram format
--type-tchoice: component, layer, deploymentcomponentDiagram type to generate
--output-ostringstdoutFile path to write the diagram to
--verbose-vflagoffPrint scanning progress (components found, relationships, technologies)
--json--flagoffOutput raw scan results as JSON instead of a diagram
  • Example:
python scripts/architecture_diagram_generator.py ./my-app --format mermaid --type layer -v
Scanning project: /home/user/my-app
Found 6 components
Found 4 relationships
Technologies: node, react, docker
graph TB
    subgraph Presentation Layer
        components["components"]
        pages["pages"]
    end

    subgraph Business Layer
        services["services"]
    end

    subgraph Data Layer
        models["models"]
        repositories["repositories"]
    end
  • Output Formats: Mermaid diagram code (copy into any Mermaid renderer), PlantUML markup (render via PlantUML server), ASCII art (paste into terminal or plain-text docs), or raw JSON scan data (--json).

dependency_analyzer.py

  • Purpose: Analyzes project dependencies for coupling score, circular dependencies, and package health across multiple package managers.
  • Usage: python scripts/dependency_analyzer.py <project_path> [flags]
  • Flags:
FlagShortTypeDefaultDescription
project_path--positionalrequiredPath to the project directory to analyze
--output-ochoice: human, jsonhumanOutput format for the report
--check--choice: all, circular, couplingallRestrict analysis to a specific check; circular exits non-zero if cycles found, coupling exits non-zero if score >70
--verbose-vflagoffPrint progress details (package manager detected, dependency counts, module scan count)
--save-sstringnoneSave JSON report to the specified file path
  • Example:
python scripts/dependency_analyzer.py ./my-app --output json --save report.json
{
  "project_path": "/home/user/my-app",
  "package_manager": "npm",
  "summary": {
    "direct_dependencies": 23,
    "dev_dependencies": 15,
    "internal_modules": 8,
    "coupling_score": 42,
    "circular_dependencies": 1,
    "issues": 1
  },
  "circular_dependencies": [["auth", "user", "permissions", "auth"]],
  "recommendations": [
    "Extract shared interfaces or create a common module to break circular dependencies"
  ]
}
  • Output Formats: Human-readable terminal report (default) with summary, issues, and recommendations; JSON structured report for CI/CD pipeline integration or programmatic consumption.

project_architect.py

  • Purpose: Detects architectural patterns, code organization issues, layer violations, and god classes in a project, then generates improvement recommendations.
  • Usage: python scripts/project_architect.py <project_path> [flags]
  • Flags:
FlagShortTypeDefaultDescription
project_path--positionalrequiredPath to the project directory to assess
--output-ochoice: human, jsonhumanOutput format for the assessment report
--check--choice: all, pattern, layers, codeallRestrict to a specific check; pattern prints detected pattern only, layers exits non-zero on violations, code exits non-zero on warnings
--verbose-vflagoffPrint analysis progress (pattern detection, issue counts, violation counts)
--save-sstringnoneSave JSON report to the specified file path
  • Example:
python scripts/project_architect.py ./my-app --check layers --verbose
Analyzing project: /home/user/my-app
Detected pattern: layered (confidence: 78%)
Found 2 code issues
Found 1 layer violations
Found 1 layer violation(s):
  controllers/PaymentController.ts: presentation layer should not depend on infrastructure layer
  • Output Formats: Human-readable terminal report (default) with pattern detection, layer assignments, code issues, and prioritized recommendations; JSON structured report for automated quality gates and dashboard integration.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.96%
按下载量换算375

OpenCode

24.01%
按下载量换算301

Gemini CLI

16.15%
按下载量换算202

Antigravity

12.18%
按下载量换算152

Cursor

6.82%
按下载量换算85

windsurf

3.4%
按下载量换算43

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills