--- name: doc-visual description: > Turn a markdown document (README, spec, ADR, design doc, research note) into a visual report with diagrams matched to each section. Use when asked to visualize, illustrate, or add diagrams to a document, or to turn markdown into a report. Takes one md file. argument-hint: "[md-file-path] [--format html|md] [--lang code] [--local (force a local file instead of publishing)]" allowed-tools: Read, Bash(node *), Bash(open *), Bash(rm -rf /tmp/doc-visual-*), Artifact, Skill(artifact-design), AskUserQuestion --- # doc-visual Read a markdown document and write a visual report with diagrams that match each section's meaning. Output is HTML (default) or markdown. You write the output directly — no templates, no intermediate JSON, no agent chains. ## Why this matters A pipeline of agents that each see only the previous stage's output compresses the content into summaries of summaries. You see the original document in full — that's the core advantage. If you find yourself writing "this section discusses X" instead of explaining X, that's compression, and it's the failure this skill exists to prevent. ## Input Argument = single markdown file path. Directories, URLs, stdin not supported. 1. Validate file exists + markdown extension (`.md`, `.markdown`, `.txt`) 2. Missing/no permission → abort immediately 3. Read the full file content ### Format detection | Flag | Values | Default | |---|---|---| | `--format` | `html` / `md` | `html` | | `--lang` | ISO code | auto-detected from document | | `--local` | switch | off — capable HTML **publishes to an Artifact by default** | | `--artifact` | switch | retained no-op alias (already the default on capable HTML) | The report language must match the source document's language. **Channel, flags, and config** follow `${CLAUDE_PLUGIN_ROOT}/references/design-system/channel-decision.md` — read it before writing. In short: capable HTML publishes to a claude.ai Artifact; `--local` (or "keep it local", "don't publish") forces the local file; `md` stays local unless this turn asks to publish it. Stored config: `node ${CLAUDE_PLUGIN_ROOT}/scripts/config.js get --data-dir "${CLAUDE_PLUGIN_DATA}"`. ## Writing the report You write the output yourself. No template files, no assembly scripts, no intermediate formats. ### Output paths All under `${CLAUDE_PLUGIN_DATA}/reports/`: | Channel | Path | |---|---| | HTML, Artifact (default) | `{doc-basename}-doc-visual.artifact.html` | | HTML, local (`--local` / non-capable fallback) | `{doc-basename}-doc-visual.html` | | md | `{doc-basename}-doc-visual.md` — also inserted into the response body | | md, published on request | `{doc-basename}-doc-visual.artifact.md` | The HTML is one file you write yourself; on the local channel it embeds diagrams as `
` blocks. The md report uses ` ```mermaid ` fences, footer links to the source path, and no CSS or `