본문으로 건너뛰기
cccskills
무료GitHub에 공개

diagram

Generate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md8.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

You are in AUTONOMOUS MODE. Do NOT ask questions. Analyze the project codebase and generate comprehensive architecture diagrams using Mermaid.

INPUT: $ARGUMENTS

Accepted arguments:

  • No arguments: generate all applicable diagram types.
  • c4: generate C4 Context and Container diagrams only.
  • sequence: generate sequence diagrams for key flows only.
  • er: generate ER diagram from database schema only.
  • deps or dependency: generate module dependency graph only.
  • A specific flow description (e.g., "user login flow"): generate a sequence diagram for that specific flow.

============================================================ PHASE 1: CODEBASE ANALYSIS

Step 1.1 -- Tech Stack and Architecture Detection

Scan config files to determine: project type (web app, API, mobile, CLI, library, monorepo), primary language/framework, database(s), external services (auth, payment, email, storage), message queues, caching layers, and API gateway config.

Step 1.2 -- Service and Module Mapping

For monorepos/microservices: read docker-compose.yml or K8s manifests for service definitions, map inter-service communication, identify external deps per service.

For monoliths: read directory structure to identify modules/domains, trace import statements to map module dependencies, identify layer boundaries.

Step 1.3 -- Database Schema Extraction

Scan for schema definitions in: schema.prisma, .entity.ts (TypeORM/MikroORM), models/.js (Sequelize), models.py (Django), db/schema.rb (Rails), models/.py (SQLAlchemy), schema.ts (Drizzle), migrations/.sql, *.model.ts (Mongoose).

Extract: table/collection names, columns with types, primary/foreign keys, relationships (1:1, 1:N, M:N), indexes, and enums.

Step 1.4 -- Key Flow Identification

Identify the most important flows to diagram:

  • Authentication flow (login, signup, token refresh)
  • Primary business flow (main use case)
  • Data write flow (create/update through layers)
  • API request lifecycle (middleware, validation, handler, response)
  • Background job flow (if applicable)

For each flow, trace: entry point, middleware, service layer, data access, external calls, and response construction.

============================================================ PHASE 2: DIAGRAM GENERATION

Generate Mermaid diagrams. Use C4 syntax for architecture diagrams.

Step 2.1 -- C4 Context Diagram

Show the system in its environment: users/actors, the system boundary, and all external systems it connects to. Use C4Context with Person, System, System_Ext, and Rel elements. Keep it high-level -- no internal details.

Step 2.2 -- C4 Container Diagram

Show major containers within the system boundary: web apps, API servers, databases, caches, workers, message queues. Use C4Container with Container, ContainerDb, ContainerQueue elements. Show relationships with protocols (HTTPS, SQL, AMQP).

Step 2.3 -- Sequence Diagrams

For each key flow, generate a sequenceDiagram showing participants and message flow. Always generate auth flow if auth exists. Generate the primary business flow. Include request/response payloads as notes where helpful.

Step 2.4 -- ER Diagram

Generate from extracted schema using erDiagram syntax. Include all tables with columns (name, type, PK/FK/UK markers) and relationships with cardinality notation (||--o{, }o--o{, etc.).

Step 2.5 -- Module Dependency Graph

Generate a graph TD showing how internal modules depend on each other. Place entry points (routes/controllers) at top, data stores at bottom, external systems on sides. Flag circular dependencies as warnings. Use style directives to color-code layers.

============================================================ PHASE 3: OUTPUT AND ORGANIZATION

Create docs/diagrams/ directory if it does not exist.

Write individual files:

  • docs/diagrams/c4-context.md -- C4 Context diagram
  • docs/diagrams/c4-container.md -- C4 Container diagram
  • docs/diagrams/sequence-auth.md -- Auth sequence (if applicable)
  • docs/diagrams/sequence-[flow].md -- Business flow sequence
  • docs/diagrams/er-diagram.md -- ER diagram (if database exists)
  • docs/diagrams/dependency-graph.md -- Module dependency graph

Each file: heading, brief explanation, Mermaid code block, notes on simplifications. Skip diagram types with no data (no ER if no database).

Generate docs/diagrams/README.md index linking all diagrams with descriptions.

============================================================ SELF-HEALING VALIDATION (max 2 iterations)

After producing documentation, validate completeness:

  1. Verify all required sections are present and non-empty.
  2. Verify internal cross-references and links resolve correctly.
  3. Verify no placeholder text remains ("{TODO}", "[TBD]", "...", "etc.").
  4. Verify code examples are syntactically valid.

IF VALIDATION FAILS:

  • Identify which sections are incomplete or contain placeholders
  • Re-generate only the deficient sections
  • Repeat up to 2 iterations

============================================================ OUTPUT

Diagrams Generated

System Profile

  • Type: [monolith / microservices / monorepo]
  • Services: [count]
  • Database Tables: [count]
  • External Systems: [count]

Diagrams Created

DiagramFileEntities
C4 Contextdocs/diagrams/c4-context.mdN systems
C4 Containerdocs/diagrams/c4-container.mdN containers
Sequence: Authdocs/diagrams/sequence-auth.mdN participants
ER Diagramdocs/diagrams/er-diagram.mdN tables
Dependenciesdocs/diagrams/dependency-graph.mdN modules

Observations

  • [Circular dependencies detected]
  • [Isolated modules with no connections]
  • [Missing relationships that could not be determined]

============================================================ SELF-EVOLUTION TELEMETRY

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

  • Look for the project path in ~/.claude/projects/
  • If found, append to skill-telemetry.md in that memory directory

Entry format:

### /diagram — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.

============================================================ DO NOT

  • Do NOT fabricate components, services, or tables. Only diagram what exists.
  • Do NOT include internal implementation details in C4 Context diagrams.
  • Do NOT generate diagrams for types with no data (no ER if no database).
  • Do NOT use PlantUML -- use Mermaid exclusively for GitHub compatibility.
  • Do NOT include sensitive info (credentials, internal URLs, IPs) in diagrams.
  • Do NOT overwrite existing diagram files without reading them first.

NEXT STEPS:

After generating diagrams:

  • "Run /document to check overall documentation health."
  • "Run /adr to create ADRs explaining architectural decisions shown in diagrams."
  • "Run /onboarding to include these diagrams in the developer onboarding guide."

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use this skill whenever the user wants to create or improve a presentation for an academic context — conference papers, seminar talks, thesis defenses, grant briefings, lab meetings, invited lectures, or any presentation where the audience will evaluate reasoning and evidence. Triggers include: 'conference talk', 'seminar slides', 'thesis defense', 'research presentation', 'academic deck', 'academic presentation'. Also triggers when the user asks to 'make slides' in combination with academic content (e.g., 'make slides for my paper on X', 'create a presentation for my dissertation defense', 'build a deck for my grant proposal'). This skill governs CONTENT and STRUCTURE decisions. For the technical work of creating or editing the .pptx file itself, also read the pptx SKILL.md.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

skillmds/skillmd2492026년 10월 14일 업데이트

adp

무료

Redpanda's Agentic Data Plane: governance infrastructure for building, running, and governing AI agents and MCP servers, plus a proxying AI Gateway for LLM providers, operated via `rpk ai` and the ADP API. Use when creating or managing AI agents (managed or self-managed) via `rpk ai agent` or `AgentRegistryService`; configuring MCP servers (remote or managed catalog, code mode, auth); setting up LLM providers or querying models via `rpk ai llm`/`rpk ai model` or the AI Gateway proxy; or configuring budgets, guardrails, or Cedar access-control policies through the governance APIs. Also covers reading agent transcripts and spending insights, and wiring OAuth clients or providers to the aigw Authorization Server. For the separate rpk cloud mcp control-plane MCP server, see `/redpanda:rpk-cloud`.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

skillmds/skillmd2492026년 10월 14일 업데이트

ads

무료

Operate professional paid advertising across Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, Apple, Amazon, Reddit, Pinterest, Snapchat, and X. Use for account intake, source-grounded audits, strategy, budget and measurement planning, creative production, experiments, reporting, monitoring, and explicitly approved campaign changes. Also trigger on PPC, paid social, retail media, attribution, tracking, landing pages, cross-platform conversion totals, negative keywords or search terms, beta-feature scoring, stale platform claims, API-token or credential setup, campaign deletion, and safe Claude Ads installation or uninstall.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

skillmds/skillmd2492026년 10월 14일 업데이트

ads-apple

무료

Audit Apple Ads measurement, AdServices and AdAttributionKit, campaign and keyword structure, Search Match, App Store placements, custom product pages, bidding, budgets, MMP reconciliation, and policy. Use for Apple Ads, Apple Search Ads, App Store ads, Search Match, custom product pages, AdServices, or Apple app-install campaigns.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

skillmds/skillmd2492026년 10월 14일 업데이트

Research competitor paid-ad presence, messaging, creative, formats, landing pages, keyword and auction signals, transparent ad libraries, and strategic gaps across supported platforms. Use for competitor ads, ad libraries, ad spy, competitive PPC analysis, competitor creative, Google Ads Transparency, Meta Ad Library, or paid-media competitor research.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

skillmds/skillmd2492026년 10월 14일 업데이트

ads-dna

무료

Extract a public-safe brand and offer profile for paid advertising from an authorized website and operator input. Triggers on: brand DNA, brand profile, brand identity, brand style, brand colors, brand voice, visual identity, style guide, website brand analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

skillmds/skillmd2492026년 10월 14일 업데이트

skillmds의 스킬 모두 보기

이 스킬의 문제 신고