architecture-blueprint-generator
它能做什么
这个生成器可以为软件项目生成一份详细的架构文档。它会分析代码,了解项目的结构、使用的技术以及采用的设计模式。
适用场景
- ✓开始一个新项目,需要确定其结构时。
- ✓接手一个已有项目,想了解它的架构时。
- ✓需要为团队记录项目结构时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/architecture-blueprint-generator/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为这个 Node.js 项目生成一份架构蓝图,重点关注微服务,并附上 C4 图。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会检查你项目中的文件,识别所用的技术和架构模式,然后生成一份包含文字说明和可视化图表的文档。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Comprehensive Project Architecture Blueprint Generator
Configuration Variables
${PROJECT_TYPE="Auto-detect|.NET|Java|React|Angular|Python|Node.js|Flutter|Other"} <!-- Primary technology --> ${ARCHITECTURE_PATTERN="Auto-detect|Clean Architecture|Microservices|Layered|MVVM|MVC|Hexagonal|Event-Driven|Serverless|Monolithic|Other"} <!-- Primary architectural pattern --> ${DIAGRAM_TYPE="C4|UML|Flow|Component|None"} <!-- Architecture diagram type --> ${DETAIL_LEVEL="High-level|Detailed|Comprehensive|Implementation-Ready"} <!-- Level of detail to include --> ${INCLUDES_CODE_EXAMPLES=true|false} <!-- Include sample code to illustrate patterns --> ${INCLUDES_IMPLEMENTATION_PATTERNS=true|false} <!-- Include detailed implementation patterns --> ${INCLUDES_DECISION_RECORDS=true|false} <!-- Include architectural decision records --> ${FOCUS_ON_EXTENSIBILITY=true|false} <!-- Emphasize extension points and patterns -->
Generated Prompt
"Create a comprehensive 'Project_Architecture_Blueprint.md' document that thoroughly analyzes the architectural patterns in the codebase to serve as a definitive reference for maintaining architectural consistency. Use the following approach:
1. Architecture Detection and Analysis
${PROJECT_TYPE == "Auto-detect" ? "Analyze the project structure to identify all technology stacks and frameworks in use by examining:
- Project and configuration files
- Package dependencies and import statements
- Framework-specific patterns and conventions
- Build and deployment configurations" : "Focus on ${PROJECT_TYPE} specific patterns and practices"}
${ARCHITECTURE_PATTERN == "Auto-detect" ? "Determine the architectural pattern(s) by analyzing:
- Folder organization and namespacing
- Dependency flow and component boundaries
- Interface segregation and abstraction patterns
- Communication mechanisms between components" : "Document how the ${ARCHITECTURE_PATTERN} architecture is implemented"}
2. Architectural Overview
- Provide a clear, concise explanation of the overall architectural approach
- Document the guiding principles evident in the architectural choices
- Identify architectural boundaries and how they're enforced
- Note any hybrid architectural patterns or adaptations of standard patterns
3. Architecture Visualization
${DIAGRAM_TYPE != "None" ? `Create ${DIAGRAM_TYPE} diagrams at multiple levels of abstraction:
- High-level architectural overview showing major subsystems
- Component interaction diagrams showing relationships and dependencies
- Data flow diagrams showing how information moves through the system
- Ensure diagrams accurately reflect the actual implementation, not theoretical patterns` : "Describe the component relationships based on actual code dependencies, providing clear textual explanations of:
- Subsystem organization and boundaries
- Dependency directions and component interactions
- Data flow and process sequences"}
4. Core Architectural Components
For each architectural component discovered in the codebase:
Purpose and Responsibility:
- Primary function within the architecture
- Business domains or technical concerns addressed
- Boundaries and scope limitations
Internal Structure:
- Organization of classes/modules within the component
- Key abstractions and their implementations
- Design patterns utilized
Interaction Patterns:
- How the component communicates with others
- Interfaces exposed and consumed
- Dependency injection patterns
- Event publishing/subscription mechanisms
Evolution Patterns:
- How the component can be extended
- Variation points and plugin mechanisms
- Configuration and customization approaches
5. Architectural Layers and Dependencies
- Map the layer structure as implemented in the codebase
- Document the dependency rules between layers
- Identify abstraction mechanisms that enable layer separation
- Note any circular dependencies or layer violations
- Document dependency injection patterns used to maintain separation
6. Data Architecture
- Document domain model structure and organization
- Map entity relationships and aggregation patterns
- Identify data access patterns (repositories, data mappers, etc.)
- Document data transformation and mapping approaches
- Note caching strategies and implementations
- Document data validation patterns
7. Cross-Cutting Concerns Implementation
Document implementation patterns for cross-cutting concerns:
…
常见问题
什么是“架构蓝图”(architecture blueprint)?
它是一份描述软件如何构建的文档,包括各个组成部分、它们之间的连接方式,以及设计过程中的重要决策。
AI 能自动识别所用的技术吗?
可以。如果你没有指定,AI 会通过分析代码结构,自己尝试识别所用的技术和架构模式。
可以生成哪些类型的图表?
你可以要求生成 C4、UML、Flow 或 Component 等图表,也可以选择不要图表,只获取文字说明。
详情
作者的原始描述
Comprehensive project architecture blueprint generator that analyzes codebases to create detailed architectural documentation. Automatically detects technology stacks and architectural patterns, generates visual diagrams, documents implementation patterns, and provides extensible blueprints for maintaining architectural consistency and guiding new development.
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7055
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。