Token导航 LogoToken导航

Agent Skill · 研究检索

c4-architecture-c4-architecture(C4 架构 C4 架构)

c4-architecture-c4-architecture 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

c4-architecture-c4-architecture 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 51,876。

总安装 570周安装 24GitHub Stars 692下载 76核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/rmyndharis/antigravity-skills --skill c4-architecture-c4-architecture

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于生成完整的 C4 架构文档,采用自底向上分析方法。适用于 Codex、Claude、Cursor、Gemini CLI,协调四个 C4 代理。支持 Context、Container、Component 和 Code 级别文档。

安装方式:github,命令为 npx skills add https://github.com/rmyndharis/antigravity-skills --skill c4-architecture-c4-architecture。建议确认代码库深度和文档需求,避免遗漏细节。

来源仓库内路径:skills/c4-architecture-c4-architecture

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/rmyndharis/antigravity-skills --skill c4-archi…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

c4-architecture-c4-architecture 怎么安装?

在终端执行 npx skills add https://github.com/rmyndharis/antigravity-skills --skill c4-architecture-c4…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

c4-architecture-c4-architecture 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

c4-architecture-c4-architecture 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

c4-architecture-c4-architecture 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

c4-architecture-c4-architecture 用的人多吗?

公开数据是累计安装 570 次,近一周安装 24 次,下载 76 次,GitHub 692 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

c4-architecture-c4-architecture 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
c4-architecture-c4-architecture

C4 架构 C4 架构 · 本页

570692调用外部服务MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

C4 Architecture Documentation Workflow

Generate comprehensive C4 architecture documentation for an existing repository/codebase using a bottom-up analysis approach.

[Extended thinking: This workflow implements a complete C4 architecture documentation process following the C4 model (Context, Container, Component, Code). It uses a bottom-up approach, starting from the deepest code directories and working upward, ensuring every code element is documented before synthesizing into higher-level abstractions. The workflow coordinates four specialized C4 agents (Code, Component, Container, Context) to create a complete architectural documentation set that serves both technical and non-technical stakeholders.]

Use this skill when

  • Working on c4 architecture documentation workflow tasks or workflows
  • Needing guidance, best practices, or checklists for c4 architecture documentation workflow

Do not use this skill when

  • The task is unrelated to c4 architecture documentation workflow
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

Overview

This workflow creates comprehensive C4 architecture documentation following the official C4 model by:

  1. Code Level: Analyzing every subdirectory bottom-up to create code-level documentation
  2. Component Level: Synthesizing code documentation into logical components within containers
  3. Container Level: Mapping components to deployment containers with API documentation (shows high-level technology choices)
  4. Context Level: Creating high-level system context with personas and user journeys (focuses on people and software systems, not technologies)

Note: According to the C4 model, you don't need to use all 4 levels of diagram - the system context and container diagrams are sufficient for most software development teams. This workflow generates all levels for completeness, but teams can choose which levels to use.

All documentation is written to a new C4-Documentation/ directory in the repository root.

Phase 1: Code-Level Documentation (Bottom-Up Analysis)

1.1 Discover All Subdirectories

  • Use codebase search to identify all subdirectories in the repository
  • Sort directories by depth (deepest first) for bottom-up processing
  • Filter out common non-code directories (node_modules,.git, build, dist, etc.)
  • Create list of directories to process

1.2 Process Each Directory (Bottom-Up)

For each directory, starting from the deepest:

  • Use Task tool with subagent_type="c4-architecture::c4-code"
  • Prompt: | Analyze the code in directory: [directory_path] Create comprehensive C4 Code-level documentation following this structure: Save the output as: C4-Documentation/c4-code-[directory-name].md Use a sanitized directory name (replace / with -, remove special chars) for the filename. Ensure the documentation includes:

1. Overview Section: - Name: [Descriptive name for this code directory] - Description: [Short description of what this code does] - Location: [Link to actual directory path relative to repo root] - Language: [Primary programming language(s) used] - Purpose: [What this code accomplishes] 2. Code Elements Section: - Document all functions/methods with complete signatures: - Function name, parameters (with types), return type - Description of what each function does - Location (file path and line numbers) - Dependencies (what this function depends on) - Document all classes/modules: - Class name, description, location - Methods and their signatures - Dependencies 3. Dependencies Section: - Internal dependencies (other code in this repo) - External dependencies (libraries, frameworks, services) 4. Relationships Section: - Optional Mermaid diagram if relationships are complex - Complete function signatures with all parameters and types - Links to actual source code locations - All dependencies (internal and external) - Clear, descriptive names and descriptions

  • Expected output: c4-code-.md file in C4-Documentation/
  • Context: All files in the directory and its subdirectories

Repeat for every subdirectory until all directories have corresponding c4-code-*.md files.

Phase 2: Component-Level Synthesis

2.1 Analyze All Code-Level Documentation

  • Collect all c4-code-*.md files created in Phase 1
  • Analyze code structure, dependencies, and relationships
  • Identify logical component boundaries based on:

- Domain boundaries (related business functionality) - Technical boundaries (shared frameworks, libraries) - Organizational boundaries (team ownership, if evident)

2.2 Create Component Documentation

For each identified component:

  • Use Task tool with subagent_type="c4-architecture::c4-component"
  • Prompt: | Synthesize the following C4 Code-level documentation files into a logical component: Code files to analyze: [List of c4-code-*.md file paths] Create comprehensive C4 Component-level documentation following this structure: Save the output as: C4-Documentation/c4-component-[component-name].md Use a sanitized component name for the filename.

1. Overview Section: - Name: [Component name - descriptive and meaningful] - Description: [Short description of component purpose] - Type: [Application, Service, Library, etc.] - Technology: [Primary technologies used] 2. Purpose Section: - Detailed description of what this component does - What problems it solves - Its role in the system 3. Software Features Section: - List all software features provided by this component - Each feature with a brief description 4. Code Elements Section: - List all c4-code-*.md files contained in this component - Link to each file with a brief description 5. Interfaces Section: - Document all component interfaces: - Interface name - Protocol (REST, GraphQL, gRPC, Events, etc.) - Description - Operations (function signatures, endpoints, etc.) 6. Dependencies Section: - Components used (other components this depends on) - External systems (databases, APIs, services) 7. Component Diagram: - Mermaid diagram showing this component and its relationships

  • Expected output: c4-component-.md file for each component
  • Context: All relevant c4-code-*.md files for this component

2.3 Create Master Component Index

  • Use Task tool with subagent_type="c4-architecture::c4-component"
  • Prompt: | Create a master component index that lists all components in the system. Based on all c4-component-*.md files created, generate: Save the output as: C4-Documentation/c4-component.md

1. System Components Section: - List all components with: - Component name - Short description - Link to component documentation 2. Component Relationships Diagram: - Mermaid diagram showing all components and their relationships - Show dependencies between components - Show external system dependencies

  • Expected output: Master c4-component.md file
  • Context: All c4-component-*.md files

Phase 3: Container-Level Synthesis

3.1 Analyze Components and Deployment Definitions

  • Review all c4-component-*.md files
  • Search for deployment/infrastructure definitions:

- Dockerfiles - Kubernetes manifests (deployments, services, etc.) - Docker Compose files - Terraform/CloudFormation configs - Cloud service definitions (AWS Lambda, Azure Functions, etc.) - CI/CD pipeline definitions

3.2 Map Components to Containers

  • Use Task tool with subagent_type="c4-architecture::c4-container"
  • Prompt: | Synthesize components into containers based on deployment definitions. Component documentation: [List of all c4-component-*.md file paths] Deployment definitions found: [List of deployment config files: Dockerfiles, K8s manifests, etc.] Create comprehensive C4 Container-level documentation following this structure: Save the output as: C4-Documentation/c4-container.md

1. Containers Section (for each container): - Name: [Container name] - Description: [Short description of container purpose and deployment] - Type: [Web Application, API, Database, Message Queue, etc.] - Technology: [Primary technologies: Node.js, Python, PostgreSQL, etc.] - Deployment: [Docker, Kubernetes, Cloud Service, etc.] 2. Purpose Section (for each container): - Detailed description of what this container does - How it's deployed - Its role in the system 3. Components Section (for each container): - List all components deployed in this container - Link to component documentation 4. Interfaces Section (for each container): - Document all container APIs and interfaces: - API/Interface name - Protocol (REST, GraphQL, gRPC, Events, etc.) - Description - Link to OpenAPI/Swagger/API Spec file - List of endpoints/operations 5. API Specifications: - For each container API, create an OpenAPI 3.1+ specification - Save as: C4-Documentation/apis/[container-name]-api.yaml - Include: - All endpoints with methods (GET, POST, etc.) - Request/response schemas - Authentication requirements - Error responses 6. Dependencies Section (for each container): - Containers used (other containers this depends on) - External systems (databases, third-party APIs, etc.) - Communication protocols 7. Infrastructure Section (for each container): - Link to deployment config (Dockerfile, K8s manifest, etc.) - Scaling strategy - Resource requirements (CPU, memory, storage) 8. Container Diagram: - Mermaid diagram showing all containers and their relationships - Show communication protocols - Show external system dependencies

  • Expected output: c4-container.md with all containers and API specifications
  • Context: All component documentation and deployment definitions

Phase 4: Context-Level Documentation

4.1 Analyze System Documentation

  • Review container and component documentation
  • Search for system documentation:

- README files - Architecture documentation - Requirements documents - Design documents - Test files (to understand system behavior) - API documentation - User documentation

4.2 Create Context Documentation

  • Use Task tool with subagent_type="c4-architecture::c4-context"
  • Prompt: | Create comprehensive C4 Context-level documentation for the system. Container documentation: C4-Documentation/c4-container.md Component documentation: C4-Documentation/c4-component.md System documentation: [List of README, architecture docs, requirements, etc.] Test files: [List of test files that show system behavior] Create comprehensive C4 Context-level documentation following this structure: Save the output as: C4-Documentation/c4-context.md Ensure the documentation is:

1. System Overview Section: - Short Description: [One-sentence description of what the system does] - Long Description: [Detailed description of system purpose, capabilities, problems solved] 2. Personas Section: - For each persona (human users and programmatic "users"): - Persona name - Type (Human User / Programmatic User / External System) - Description (who they are, what they need) - Goals (what they want to achieve) - Key features used 3. System Features Section: - For each high-level feature: - Feature name - Description (what this feature does) - Users (which personas use this feature) - Link to user journey map 4. User Journeys Section: - For each key feature and persona: - Journey name: [Feature Name] - [Persona Name] Journey - Step-by-step journey: 1. 2. ... - Include all system touchpoints - For programmatic users (external systems, APIs): - Integration journey with step-by-step process 5. External Systems and Dependencies Section: - For each external system: - System name - Type (Database, API, Service, Message Queue, etc.) - Description (what it provides) - Integration type (API, Events, File Transfer, etc.) - Purpose (why the system depends on this) 6. System Context Diagram: - Mermaid C4Context diagram showing: - The system (as a box in the center) - All personas (users) around it - All external systems around it - Relationships and data flows - Use C4Context notation for proper C4 diagram 7. Related Documentation Section: - Links to container documentation - Links to component documentation - Understandable by non-technical stakeholders - Focuses on system purpose, users, and external relationships - Includes comprehensive user journey maps - Identifies all external systems and dependencies

  • Expected output: c4-context.md with complete system context
  • Context: All container, component, and system documentation

Configuration Options

  • target_directory: Root directory to analyze (default: current repository root)
  • exclude_patterns: Patterns to exclude (default: node_modules,.git, build, dist, etc.)
  • output_directory: Where to write C4 documentation (default: C4-Documentation/)
  • include_tests: Whether to analyze test files for context (default: true)
  • api_format: Format for API specs (default: openapi)

Success Criteria

  • ✅ Every subdirectory has a corresponding c4-code-*.md file
  • ✅ All code-level documentation includes complete function signatures
  • ✅ Components are logically grouped with clear boundaries
  • ✅ All components have interface documentation
  • ✅ Master component index created with relationship diagram
  • ✅ Containers map to actual deployment units
  • ✅ All container APIs documented with OpenAPI/Swagger specs
  • ✅ Container diagram shows deployment architecture
  • ✅ System context includes all personas (human and programmatic)
  • ✅ User journeys documented for all key features
  • ✅ All external systems and dependencies identified
  • ✅ Context diagram shows system, users, and external systems
  • ✅ Documentation is organized in C4-Documentation/ directory

Output Structure

C4-Documentation/
├── c4-code-*.md              # Code-level docs (one per directory)
├── c4-component-*.md          # Component-level docs (one per component)
├── c4-component.md            # Master component index
├── c4-container.md            # Container-level docs
├── c4-context.md              # Context-level docs
└── apis/                      # API specifications
    ├── [container]-api.yaml   # OpenAPI specs for each container
    └── ...

Coordination Notes

  • Bottom-up processing: Process directories from deepest to shallowest
  • Incremental synthesis: Each level builds on the previous level's documentation
  • Complete coverage: Every directory must have code-level documentation before synthesis
  • Link consistency: All documentation files link to each other appropriately
  • API documentation: Container APIs must have OpenAPI/Swagger specifications
  • Stakeholder-friendly: Context documentation should be understandable by non-technical stakeholders
  • Mermaid diagrams: Use proper C4 Mermaid notation for all diagrams

Example Usage

/c4-architecture:c4-architecture

This will:

  1. Walk through all subdirectories bottom-up
  2. Create c4-code-*.md for each directory
  3. Synthesize into components
  4. Map to containers with API docs
  5. Create system context with personas and journeys

All documentation written to: C4-Documentation/

平台分布

Codex

30.83%
按下载量换算23

windsurf

26.35%
按下载量换算20

trae

17.55%
按下载量换算13

Claude Code

12.66%
按下载量换算10

Antigravity

7.83%
按下载量换算6

qoder

3.11%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

继续浏览同类 Skills