/lstack:diagram-generatorfrom lstack
Routes diagram requests to draw.io XML (precise, editable, C4, swimlanes) or Excalidraw JSON (hand-drawn, sketch, wireframes). Single entry for flowcharts, architecture, ER, sequence, mind maps.
Ships in lstack. 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.
Read when SKILL.md points to them.
Single entry point for "make me a diagram". This umbrella picks one engine and hands the request to
it. Both engines cover the same diagram types (flowchart, architecture, C4, ER, sequence, mind map)
through the same four phases (Understand → Propose → Generate → Validate); they differ only in
output format and aesthetic. The umbrella writes no file itself. Its body stays short to protect
the agent's context window; report templates live in references/.
| Engine | When the user wants... | Output |
|---|---|---|
drawio-generator | Precise, professional diagrams to edit later in draw.io / diagrams.net / Confluence; official C4 styling; swimlanes; multi-page | kebab-case .drawio file (XML) |
excalidraw-generator | A hand-drawn, sketchy, whiteboard feel; wireframes; quick collaborative sketches | kebab-case .excalidraw file (JSON) |
Apply the routing rules in order and stop at the first rule that matches:
.drawio → drawio-generator,
.excalidraw → excalidraw-generator.excalidraw-generator.drawio-generator, and wireframes, brainstorms, and mind maps to excalidraw-generator.
Anything else that is delegated goes to drawio-generator.Silence is not delegation. Ask content questions (entities, relationships, direction) only inside the engine's Phase 1, never in the umbrella.
This skill invokes the two engines declared in frontmatter metadata.dependencies, but each run needs only
the one that routing selects. Run this once, after routing and before the engine starts:
if command -v asm >/dev/null && asm deps --help >/dev/null 2>&1; then
asm deps discover diagram-generator --json || echo "discover failed; acquire still runs" >&2
echo "dg_mode=lease"
else
echo "asm deps unavailable: npm install -g agent-skill-manager@latest" >&2
echo "dg_mode=installed"
fi
printf 'dg_session=%s\n' "diagram-generator-$(date +%s)-$$" # record it; reuse it verbatim
dg_mode=lease, run asm deps acquire <engine> --session <dg_session> --json for the
routed engine only. Record the returned skillMdPath.dg_mode=installed, run
test -f "$HOME/.claude/skills/<engine>/SKILL.md" || test -f "$HOME/.agents/skills/<engine>/SKILL.md"
and record the path that exists.Missing skill: <engine> — install: asm install github:luongnv89/skills:skills/diagram-generator/<engine> -p claude --yes,
then stop with the missing-engine Final Report. Never substitute the other engine. Never
imitate the engine inline.finally. If any acquire ran, run asm deps release --session <dg_session> --json
once at every terminal outcome, stops included, after the closing Final Report.Do not acquire the engine that routing did not select.
The umbrella runs no git command and writes no file. The routed engine runs its own Repo Sync Before Edits (scoped to the output file's repository, with its conflict and network-failure rules) before it writes. Do not run a second sync here, and do not skip the engine's sync.
Routing to <engine>: <the rule that matched, in the user's words>.SKILL.md path and follow that engine's workflow with the user's request
unchanged. The engine owns its questions, file naming, Repo Sync, validation, and fix cycles.
It also asks for confirmation before it overwrites an existing file; never skip or pre-answer
that confirmation.Both engines end every run, stops included, with a four-line Final Report (Result: COMPLETE |
PARTIAL | BLOCKED, Evidence:, Uncertainty:, Decision:). When an engine ran, its Final Report
is this skill's closing output. Relay it verbatim: do not restate it, re-grade it, or change its
status. If the release step fails, add one line after the closing report, whichever skill wrote it:
Router note: asm deps release failed for session <dg_session>; run asm deps release --session <dg_session> --json.
When the umbrella stops before any engine runs (out of scope, unanswered routing question, missing
engine), it writes its own four-line report with status BLOCKED. Templates and fill rules:
references/final-report.md. Expected output when the routed engine is missing:
Result: BLOCKED. No diagram written: drawio-generator is not installed.
Evidence: Routed to drawio-generator (rule 3, "in draw.io"). Preflight dg_mode=lease; asm deps acquire drawio-generator failed.
Uncertainty: No engine ran, so no file was generated or validated.
Decision: Install drawio-generator with the printed command, then re-run. Excalidraw output is available only if you ask for it.
Input: "Draw a sketchy onboarding wireframe for mobile."
Route: Routing to excalidraw-generator: rule 5, "sketchy wireframe".
Closing: excalidraw-generator's Final Report, relayed unchanged, e.g.
Result: COMPLETE. Wrote mobile-onboarding-wireframe.excalidraw (...)
Verify these for every run:
Routing to line names the matching rule.Result: BLOCKED and has Evidence:,
Uncertainty: and Decision: lines.references/final-report.md (result
findable, facts and assumptions separated, claims traceable, next decision clear). Without a
human reviewer's answer, human understanding is unconfirmed.drawio-generator when no order was
given. After its Final Report, run the other engine on the same content without asking again,
because the user already asked for both: acquire it under the same dg_session. If the first
engine ended BLOCKED, ask before running the second. Relay each engine's Final Report in turn.Optional and propose-only. After the run's result is delivered, run this check:
Routing to line or how the closing report was relayed.asm deps command failed and a workaround worked.references/ (the directory holding this SKILL.md). Bump the patch number of metadata.version. If the skill is an installed copy or tracked in git, say so. Commit nothing unless the user asks.Off — the user opted out.drawio-generator/agents/xml-fixer.md (opens in a new tab)drawio-generator/agents/xml-generator.md (opens in a new tab)drawio-generator/agents/xml-validator.md (opens in a new tab)drawio-generator/references/drawio-format.md (opens in a new tab)drawio-generator/references/final-report.md (opens in a new tab)drawio-generator/references/step-reports.md (opens in a new tab)drawio-generator/references/validation-checks.md (opens in a new tab)drawio-generator/references/xml-authoring.md (opens in a new tab)excalidraw-generator/agents/json-fixer.md (opens in a new tab)excalidraw-generator/agents/json-generator.md (opens in a new tab)excalidraw-generator/agents/json-validator.md (opens in a new tab)excalidraw-generator/references/diagram-types.md (opens in a new tab)excalidraw-generator/references/excalidraw-format.md (opens in a new tab)excalidraw-generator/references/final-report.md (opens in a new tab)excalidraw-generator/references/step-reports.md (opens in a new tab)excalidraw-generator/references/style-and-iteration.md (opens in a new tab)excalidraw-generator/references/validation-checks.md (opens in a new tab)references/final-report.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
20 skills in this plugin
/agent-configCreate, update, or audit AGENTS.md (default) or CLAUDE.md agent instructions: set up, prune, add a rule, or merge CLAUDE.md or .cursorrules into one file Claude Code, Codex, and Cursor all read. Don't use for READMEs, skills, or subagents./auto-pushGenerate a commit message, stage all changes, and push to remote after scanning for secrets, large files, and protected-branch risks. Skip for opening PRs, code review, or cutting releases/tags./cleanup-projectPrepare a git repo before new work: review uncommitted changes, fix .gitignore, delete merged branches, end on clean main, or inspect one branch before deciding. Don't use for dead code, commit-and-push, releases, LICENSE files, or git how-tos./cli-builderBuild production-quality CLIs with language detection and a five-step approval-gated workflow. Use when wrapping an existing module or app. Don't use for GUI/TUI apps, web APIs, or one-off shell scripts./code-analysis-setupPlan, then install on approval, free static analysis (lint, SAST, secrets, deps) across repos, merged into existing hooks and CI. Use when adding code analysis. Don't use for one-repo security stacks (security-setup) or CI/CD (devops-pipeline)./code-reviewReview or improve code in four modes: bug/security review (default), performance, clean-code audit, slop cleanup (mode:review|perf|clean|cleanup). Don't use for features, tests (test-coverage) or a full comment audit (comment-audit).npx claudepluginhub luongnv89/skills --plugin lstackOther plugins' skills for the same job