본문으로 건너뛰기
Skillpedia
문서화48k · #4097

c4-architecture-c4-architecture

하는 일

이 도구는 코드 구조의 자세한 지도를 만들어 프로그램의 여러 부분이 어떻게 연결되는지 보여 줍니다. 가장 작은 세부 사항부터 시작해 아래에서 위로 분석하며 전체 그림을 완성합니다.

사용하는 경우

  • ✓새 소프트웨어 프로젝트를 시작하며 구조를 문서화하고 싶을 때.
  • ✓기존 소프트웨어 시스템이 어떻게 구성되어 있는지 이해해야 할 때.
  • ✓코드 구조를 다른 사람에게 설명하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/c4-architecture-c4-architecture/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/c4-architecture-c4-architecture/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 코드 저장소의 C4 아키텍처 문서를 생성해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 코드의 각 부분을 살펴 함수와 클래스를 문서화합니다. 그다음 이 부분들을 논리적 컴포넌트로 묶고, 다시 컨테이너(애플리케이션이나 데이터베이스 같은 것)로 묶은 뒤, 마지막으로 전체 시스템의 맥락을 정리합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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.

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:

    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

    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:

    • 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-<directory-name>.md file in C4-Documentation/

  • Context: All files in the directory and its subdirectories

…

자주 묻는 질문

C4 모델이란 무엇인가요?

소프트웨어 아키텍처를 네 가지 상세 수준(컨텍스트, 컨테이너, 컴포넌트, 코드)으로 설명하는 방법입니다. 소프트웨어 구조를 시각화하고 전달하는 데 도움을 줍니다.

‘상향식(bottom-up)’ 분석은 왜 하나요?

가장 세부적인 부분(코드)에서 시작해 위로 올라가며 분석하는 방식입니다. 이렇게 하면 빠지는 것 없이 탄탄한 기반 위에 문서가 만들어집니다.

생성된 문서는 어디에 저장되나요?

저장소 최상위 폴더에 있는 새 폴더 `C4-Documentation/`에 저장됩니다.

상세 정보

작성자의 원본 설명

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

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4097
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬