/pipecrew:draw-diagramfrom pipecrew
Generates or refreshes Mermaid architecture diagrams for a workspace. Default mode regenerates the canonical architecture-overview.mmd; --topic flag produces focused diagrams on specific concerns like auth flow or deploy topology.
Ships in pipecrew. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Standalone skill for generating or refreshing architecture diagrams. The canonical workspace diagram (architecture-overview.mmd) is normally produced by /discover Phase B; this skill lets you regenerate it without re-running discovery, or produce focused topic diagrams off the canonical file.
/discover (which would also rewrite platform.md and re-publish workspace agents).Workspace mode (default — uses pre-discovered metadata):
platform.md + config.json (well-grounded, fast, narrative-aware)solution-architect in discovery mode/discoverCode-scan mode (truly standalone — reads code directly):
platform.md needed)architecture-mapper agent/discover to have run# Workspace mode (default — fast, narrative-grounded)
/draw-diagram refresh the canonical diagram for the auto-detected workspace
/draw-diagram --workspace=<slug> target a specific workspace
/draw-diagram --topic=<name> focused topic diagram (workspace mode)
# Code-scan mode (standalone — works without /discover)
/draw-diagram --scan=<dir> scan all repos under <dir>, infer topology from code
/draw-diagram --repos="<a>,<b>,<c>" scan an explicit list of repo paths
/draw-diagram --scan=<dir> --topic=<name> focused topic diagram in code-scan mode
# Diagram style (any source)
/draw-diagram --c4 emit Mermaid C4 syntax (Context + Container) instead of flowchart
/draw-diagram --c4 --c4-level=all add component-level C4 for every container
/draw-diagram --c4 --c4-level=component:<system> add component diagram for a specific system
# Modes (any source)
/draw-diagram --output=<path> write to a custom path (with --topic)
/draw-diagram --audit read-only staleness report (no writes)
Flags:
--workspace=<slug> — workspace slug (matches {workspace_root}/{slug}/). Auto-detected when only one workspace exists. Triggers workspace mode.--scan=<dir> — directory containing one or more repos to auto-detect. The skill walks the dir, identifies repos (presence of .git, package.json, pom.xml, etc.), passes them to the mapper. Triggers code-scan mode.--repos="<a>,<b>,<c>" — explicit comma-separated list of absolute repo paths. Triggers code-scan mode. Use this when --scan would pick up too much.--c4 — emit Mermaid C4 syntax instead of flowchart. Produces c4-context.mmd + c4-container.mmd (additive — does NOT overwrite the flowchart overview). Conventions: {plugin_dir}/rules/c4-diagrams.md.--c4-level=<level> — only meaningful with --c4. Values: default (Context + Container — the default), component (also produce component-level for every container — verbose), all (same as component today), component:<system> (component diagram for one specific container, e.g., --c4-level=component:order-service).--topic=<name> — produces {output-base}/diagrams/{topic}.mmd for a focused concern (auth-flow, event-flow, deploy-topology, etc.). Default output base is workspace-context-dir in workspace mode, or current working directory in code-scan mode. Compatible with --c4 — emits C4-style topic diagram.--output=<path> — overrides default output path. Only meaningful with --topic.--audit — read-only mode. Reads existing diagrams + current state, reports staleness, does not write.--topic)Re-runs the same logic /discover Phase B uses to produce the canonical file. The existing diagram is rewritten (not merged) — the architect produces a fresh view of the current code.
Output path:
{workspace_root}/{slug}/context/diagrams/architecture-overview.mmd — high-level C4-style for new team membersThe conventions live in {plugin_dir}/rules/discovery-diagrams.md. The architect reads that file at the start of the run.
--topic=<name>)Produces a focused single-file diagram. The canonical file is not modified. Default output path is {workspace_root}/{slug}/context/diagrams/{topic}.mmd; override with --output.
Topics the architect knows how to handle out-of-the-box (interpreted from the --topic argument as a hint):
auth-flow — request → guard → service → role checkevent-flow — producer → bus → consumer → DLQdeploy-topology — VPC / region / availability zonesdata-flow-{X} — trace data X through the system--audit)Read-only. The architect reads the existing .mmd files and the current code, reports staleness:
Output is a report saved to {workspace_root}/{slug}/context/diagrams/audit-{date}.md. No diagrams are modified.
When the user invokes /draw-diagram:
Decide the source mode.
--scan= or --repos= is passed → code-scan mode (dispatches architecture-mapper).solution-architect).Resolve inputs.
--workspace= if passed; otherwise check {workspace_root}/ for workspace directories. If exactly one exists, use it; if multiple, ask which. Verify config.json + platform.md exist.--scan): walk the scan directory (one level deep), identify repos (directories containing any of: .git, package.json, pom.xml, pyproject.toml, go.mod). Build the repo list.--repos): parse the comma-separated list; verify each path exists. No discovery needed.Dispatch the right agent.
Workspace mode — solution-architect in discovery mode:
pipecrew:solution-architectplatform.md rewrite), the mode (canonical / topic / audit), the diagram style (flowchart default, or c4 if --c4 was passed), the C4 level if applicable, and instruct the architect to read the right rules file and produce ONLY architecture-overview.mmd in flowchart mode:
{plugin_dir}/rules/discovery-diagrams.md{plugin_dir}/rules/c4-diagrams.mdCode-scan mode — architecture-mapper:
pipecrew:architecture-mapperoutput_mode (canonical / topic / audit), diagram_style (flowchart / c4), c4_level if applicable, and topic name if applicable. The agent reads the right rules file based on diagram_style.Extract the agent's output:
<!-- BEGIN architecture-overview.mmd --> block, strip inner \``mermaid` fences, save:
{workspace_root}/{slug}/context/diagrams/ (create the directory if it doesn't exist)--output directory)<!-- BEGIN c4-context.mmd --> and <!-- BEGIN c4-container.mmd --> blocks (and any <!-- BEGIN c4-component-{system}.mmd --> blocks if --c4-level=component or all), save to the same locations as the flowchart canonical file. Does NOT overwrite the flowchart overview — they coexist.<!-- BEGIN {topic}.mmd --> block, save to the resolved output path. With --c4, the topic block uses C4 syntax internally.{output-base}/diagrams/audit-{date}.md.<!-- BEGIN MAPPER_REPORT -->, save as mapper-report.json adjacent to the diagrams. Print a summary to the user (edges by confidence, unresolved hosts, skipped items).Present a diff summary — what files were written or compared, line counts before/after, and (code-scan mode only) high-level scan stats from the MAPPER_REPORT.
Workspace mode:
Use the pipecrew:solution-architect agent in discovery mode for workspace
{slug}. Diagram-only refresh — do NOT rewrite platform.md. Read
{plugin_dir}/rules/discovery-diagrams.md first. Produce
architecture-overview.mmd inside the documented delimiters.
Code-scan mode:
Use the pipecrew:architecture-mapper agent. Repo paths: /path/to/repo1,
/path/to/repo2, /path/to/repo3. Workspace name: {dir-name}. Output mode:
canonical. Read {plugin_dir}/rules/discovery-diagrams.md first, then
follow your four-tier scan process.
/discover phases — no platform.md refresh, no per-repo agent-context/ updates, no agent re-publishing. Use /discover --resume if those need refreshing too./discover to have run — code-scan mode reads repos directly. Workspace mode does require platform.md.--output path — it never touches workspace metadata. The workspace canonical file only gets rewritten in workspace mode.| Aspect | Workspace mode (default) | Code-scan mode (--scan / --repos) |
|---|---|---|
| Source of truth | platform.md + config.json (narrative + structured) | Code itself (OpenAPI specs, HTTP client calls, event pub/sub, configs) |
| Setup needed | Workspace onboarded via /discover | Just repo paths |
| Token cost | Lower (concentrated in pre-extracted docs) | Higher (per-repo scan, but bounded by HARD RULE R1 — ~38 reads max per repo) |
| Quality | High where platform.md is current; degrades with staleness | Tiered confidence (high/medium/low) per edge — never fabricates targets |
| Best for | Active workspaces where /discover is current | Brand-new projects, archived projects, second-opinion checks against platform.md |
Code-scan mode is honest about uncertainty — unresolved hosts emit (unknown-host) nodes rather than guesses. Workspace mode trusts platform.md. Pick the source that matches what you actually have.
rules/discovery-diagrams.md — Mermaid conventions for the canonical overview diagram (used by both modes)skills/discover/phases/phase-b2-architect-synthesis.md — the original architect-synthesis logic workspace mode re-usesagents/solution-architect.md — workspace-mode agent (discovery mode)agents/architecture-mapper.md — code-scan-mode agenttemplates/blocks/block-schemas.md#mapper_report — schema for the MAPPER_REPORT block emitted in code-scan modeWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
architecture-diagrams, mermaid, workspace-diagrams, c4-model
npx claudepluginhub pipecrew-ai/pipecrew --plugin pipecrew23 skills in this plugin
/assessStandalone cross-repo assessment. Checks a feature branch across all repos for cross-repo integration: wire-shape agreement, requirement enforcement symmetry, event/infra wiring. Use for verifying manually-implemented features or pre-merge validation./brainstormBrainstorm what to build (or how to build it) — one skill, two perspectives. PRODUCT perspective dispatches the product-brainstormer: `greenfield` (no onboarded workspace → a PROJECT_BRIEF, same path as /discover --greenfield) or `feature` (an onboarded workspace exists → a ranked FEATURE_BRIEF for the product-owner). TECHNICAL perspective (`--technical`) dispatches the solution-architect in MODE: brainstorm to diverge into 2–3 technical approaches with pros/cons and a recommendation. Auto-detects perspective and mode from the request; asks when it's unclear which. Standalone — dispatches the agent and presents the result./context-refreshAudit or refresh PipeCrew context docs at three scopes: a single repo (its agent-context/, CLAUDE.md, and DESIGN_SYSTEM.md if frontend), the workspace (platform.md), or everything (workspace + every repo). Audit mode reports staleness only; refresh mode updates docs to match current code./deliverPipeCrew delivers a feature end-to-end across all workspace repos. Orchestrates: requirements → architecture → spec editing → parallel implementation (backend + frontend + mock + infra) → cross-repo assessment. Usage: /deliver <feature description>. Reads workspace config from {workspace_root}/{workspace}/config.json./design-testsAuthor feature-level acceptance test cases for a workspace and maintain them as a durable regression suite under {workspace_root}/{slug}/testcases/. Wraps the pipecrew:test-designer agent's draft → user gate → persist protocol. Default: baseline mode — characterization cases for the workspace's EXISTING features (from platform.md + repo profiles/specs). With --run=<run_id>: cases for the feature a past /deliver run shipped (from its FR/EC + technical design, zero code reads). 'status' renders the suite index. Standalone — does not touch /deliver or /discover./discoverDiscover a new project for the PipeCrew. Inspects repos, interrogates the domain, generates workspace config + platform.md + CLAUDE.md files + domain-specific agents. Run once per project, then use /deliver to ship features.Other plugins' skills for the same job