diagram

$npx mdskill add Kastalien-Research/thoughtbox/diagram

Generates Mermaid architecture diagrams for a codebase subsystem.

  • Explores source files to map entry points, data flows, and component relationships.
  • Uses Read, Glob, Grep, Bash, Write, and Task tools for code analysis.
  • Launches an architecture-diagrammer agent to trace data flows and produce diagrams.
  • Outputs a Mermaid diagram file to docs/<target>-architecture.md.

SKILL.md

.github/skills/diagramView on GitHub ↗
---
name: diagram
description: Generate architecture diagrams for a codebase subsystem or module. Explores source files and produces Mermaid diagrams in docs/.
argument-hint: '[subsystem or module path, e.g. "observatory", "hub", "persistence"]'
user-invocable: true
allowed-tools: Read, Glob, Grep, Bash, Write, Task
---

Generate architecture diagrams for: $ARGUMENTS

## Workflow

1. Launch the `architecture-diagrammer` agent with the target subsystem
2. The agent will:
   - Explore all files in the target module
   - Map entry points, data flows, and component relationships
   - Produce `docs/<target>-architecture.md` with Mermaid diagrams
3. Report which diagrams were produced

## Execution

Use the Task tool to launch the `architecture-diagrammer` agent:

```
Task({
  subagent_type: "architecture-diagrammer",
  prompt: "Generate architecture diagrams for the '$ARGUMENTS' subsystem. Explore the codebase, trace data flows, and produce docs/$ARGUMENTS-architecture.md with Mermaid diagrams covering: system context, sequence diagrams for key flows, component architecture, and startup lifecycle.",
  description: "Diagram $ARGUMENTS architecture"
})
```

## Output

After the agent completes, summarize:
- File produced: `docs/<target>-architecture.md`
- Number and types of diagrams generated
- Key architectural insights discovered

More from Kastalien-Research/thoughtbox

SkillDescription
assumptionsManage the assumption registry — track, verify, and query assumptions about external dependencies and system behavior. Prevents costly rediscovery of known failures.
capture-learningCapture significant learnings from the current work session. Structures insights for future sessions and updates agent memory.
claude-opus-4-6-prompting>
claude-promptWrite or improve prompts for Claude using Anthropic's official best practices. Creates system prompts, agent prompts, tool descriptions, and MCP resource templates. Pass an existing prompt to improve it, or describe what you need to create one from scratch.
coolify-composeConvert Docker Compose files to Coolify templates. Use when creating Coolify services, converting docker-compose.yml for Coolify deployment, working with SERVICE_URL/SERVICE_PASSWORD magic variables, or troubleshooting Coolify compose errors.
crafting-effective-readmesUse when writing or improving README files. Not all READMEs are the same — provides templates and guidance matched to your audience and project type.
diataxisStructure, classify, and write documentation using the Diátaxis framework. Use when writing docs, README files, guides, tutorials, how-to guides, API references, or organizing documentation architecture. Also use when asked to improve documentation, restructure docs, decide what type of doc to write, or classify existing content. Covers tutorials, how-to guides, reference, and explanation.
escalateFormat a structured escalation to the human decision-maker (Chief Agentic). Use when hitting an escalation threshold.
frontend-design-principlesCreate polished, intentional frontend interfaces. Use this skill when building any UI — dashboards, admin panels, landing pages, marketing sites, or web applications. Routes to specialized guidance based on context.
hddDEPRECATED — use workflow Stage 2 (spec + frontmatter claims). Historical HDD docs are in docs/decisions/archive/.