Architecture diagram

From athola/claude-night-market · View interactive version

Architecture diagram is an AI agent skill from the GitHub repository athola/claude-night-market. Generates a Mermaid architecture diagram showing high-level component relationships. Use when visualizing how plugins or modules fit together.

How to use this skill

Skill file

Architecture Diagram

Generate a Mermaid flowchart showing high-level component

relationships in a codebase.

When To Use

When NOT To Use

Workflow

Step 1: Explore the Codebase

Dispatch the codebase explorer agent to analyze the scope:

Agent(cartograph:codebase-explorer)
Prompt: Explore [scope] and return a structural model.
Focus on packages, modules, and their relationships
for an architecture diagram.

If no scope is provided, use the project root.

Step 2: Generate Mermaid Syntax

Transform the structural model into a Mermaid flowchart.

Rules for architecture diagrams:

Example output:

flowchart TD
    subgraph sanctum[Sanctum Plugin]
        commit[Commit Messages]
        pr[PR Preparation]
        workspace[Workspace Review]
    end

    subgraph leyline[Leyline Plugin]
        git[Git Platform]
        patterns[Error Patterns]
    end

    commit --> git
    pr --> workspace
    pr --> git
    workspace --> patterns

Step 3: Render via MCP

Call the Mermaid Chart MCP to render:

mcp__claude_ai_Mermaid_Chart__validate_and_render_mermaid_diagram
  prompt: "Architecture diagram of [scope]"
  mermaidCode: [generated syntax]
  diagramType: "flowchart"
  clientName: "claude-code"

If rendering fails, fix the Mermaid syntax based on the

error message and retry (max 2 retries).

Step 4: Present Results

Show the rendered diagram to the user with a brief summary

of what it depicts (2-3 sentences).

Exit Criteria

one subgraph block grouping related modules

called and returns without error (or retry attempted on first

failure and result reported)

alongside the rendered output

still presented as a code block with the error surfaced

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.