From deep-researcher
Convert a deep-research report into a styled, self-contained HTML page with Mermaid diagrams, styled tables, and interactive features.
How this skill is triggered — by the user, by Claude, or both
Slash command
/deep-researcher:deep-research-visualizeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Invoked with `/deep-research-visualize` followed by a report directory path and optional theme.
references/html-template.mdscripts/make-offline.tsscripts/reportPipelineEmitter.tsscripts/tests/fixtures/minimal-report/groupings.jsonscripts/tests/fixtures/minimal-report/page-0.mdscripts/tests/fixtures/minimal-report/page-1.mdscripts/tests/fixtures/minimal-report/page-2.mdscripts/tests/reportPipelineEmitter.test.tsthemes/_base.cssthemes/blueprint.cssthemes/editorial.cssthemes/manifest.jsonthemes/midnight.cssthemes/paper.cssvendor/[email protected]vendor/fonts/blueprint-inline.cssvendor/fonts/crimson-pro-400-normal.woff2vendor/fonts/dm-sans-400-normal.woff2vendor/fonts/editorial-inline.cssvendor/fonts/fira-code-400-normal.woff2Invoked with /deep-research-visualize followed by a report directory path and optional theme.
/deep-research-visualize [report-directory] [--theme editorial|blueprint|paper|midnight]
[report-directory] -- Path to a research output directory containing a /deep-research report. Defaults to the most recent directory under ${CLAUDE_PLUGIN_DATA}/research/ if omitted.--theme -- Visual theme. Default: editorial.
Themes are defined in ${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/themes/manifest.json.
editorial -- business/strategy (warm white + charcoal + serif)blueprint -- technical/engineering (steel blue + sans-serif)paper -- academic/formal (black + white + crimson)midnight -- dark mode (slate + teal)Transform a Markdown research report into a boardroom-ready HTML file. The default output uses CDN links for fast loading and small file size (~70 KB). An optional offline version can be generated that is fully self-contained with zero external dependencies (~3.5 MB).
This is a post-processing skill -- it does not perform research. It takes the output of /deep-research and produces a visual artifact.
Subagent output protocol: every subagent spawn in this skill follows the output protocol defined in the research skill. The orchestrator prepends the Spawn Preamble to each spawn prompt with:
<WRITE-PATH> = ${CLAUDE_PLUGIN_DATA}/scratch/deep-researcher-<ISO-timestamp>-<random-12>.mddeep-researcher:deep-researcher with appropriate roleDetermine the source report directory:
report-directory is provided, validate it exists.${CLAUDE_PLUGIN_DATA}/research/.Determine the topic slug from the report directory name.
Three-way pipeline detection -- after resolving the topic directory, inspect its contents:
groupings.json exists in the topic directory -> proceed directly to Step 3 (read groupings.json) and Step 4 (emitter invocation).groupings.json -> first run the report pipeline steps to produce groupings.json and page-N.md files, then proceed to Step 3 and Step 4.groupings.json exist, but report.md exists -> skip to the legacy Coder subagent (Step 4 legacy branch) and apply make-offline.ts (Step 5).${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/themes/manifest.json to discover available themes.editorial (the default).css file path and fonts.googleFontsUrl.| Theme | Use Case | Palette |
|---|---|---|
editorial | Business/strategy (default) | Charcoal on warm white, serif |
blueprint | Technical/engineering | Steel blue on light gray, sans-serif |
paper | Academic/formal | Black on white with crimson accent |
midnight | Dark mode / low-light | Slate with teal accents |
Emitter path (groupings.json present): The orchestrator reads the groupings.json directly -- it is small JSON and no subagent is needed. Extract from it:
theme_hint valuesThis is the complete input brief for the emitter in Step 4.
Legacy path (report.md only): The orchestrator reads the report's structure (headings, tables, Mermaid blocks) to build a brief for the Coder subagent. Do not read the full body -- pass the path to the Coder and let it read.
Invoke the report pipeline emitter:
npx tsx ${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/scripts/reportPipelineEmitter.ts \
--groupings <RESOLVED_TOPIC_DIR>/groupings.json \
--theme editorial \
--plugin-dir ${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/
Replace <RESOLVED_TOPIC_DIR> with the resolved topic directory path and editorial with the requested theme ID.
The emitter writes both report.html and report-offline.html atomically to the topic directory. No separate offline step is needed -- proceed directly to Step 6 (Visual Verification).
Spawn coder subagent (agent: deep-researcher:deep-researcher, role: coder) with:
<RESOLVED_TOPIC_DIR>/report.htmleditorial)${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/themes/manifest.json${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/themes/_base.css${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/themes/<theme>.css${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/references/html-template.mdCoder instructions:
manifest.json to find the selected theme's metadata, font URL, Mermaid themeVariables, and Chart.js chartColors._base.css and <theme>.css. Concatenate them into a single <style> block in the HTML <head>.html-template.md) for transformation rules and the "Known Pitfalls" section.report.md.```mermaid code blocks for HTML tags (<br>, <video>, <b>, etc.) and special characters (&, <, >) inside node labelsA["Label"] not A[Label]& as & inside Mermaid content<code> / <pre><code>, escape bare < as < and > as > inside the code content. Do NOT double-escape -- if the source already contains < or > (HTML entities), leave them as-is.<script> block at the bottom:
mermaid.initialize({
theme: 'base',
themeVariables: { /* copy from manifest.json theme.mermaid.themeVariables */ }
});
<table> in <div class="table-wrap">...</div><span class="badge badge-high|medium|low"> for confidence labelsThis step applies only when Step 4b (legacy Coder subagent) was used. On the emitter path (Step 4a), both report.html and report-offline.html are already written atomically by the emitter -- skip this step entirely.
npx tsx ${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/scripts/make-offline.ts \
<RESOLVED_TOPIC_DIR>/report.html \
--theme <theme-id> \
--vendor-dir ${CLAUDE_PLUGIN_ROOT}/skills/deep-research-visualize/vendor/
This creates report-offline.html in the same directory by inlining:
vendor/[email protected]vendor/[email protected]vendor/fonts/<theme>-inline.cssThe offline file is fully self-contained (zero network requests) but large (~3.5 MB).
Before presenting to the user, the orchestrator MUST verify the HTML renders correctly. Do not skip this step -- Mermaid syntax errors, table truncation, and CSS issues are easy to introduce and hard to spot from source alone.
If Playwright MCP is available:
python3 -m http.server <port> in the report directory).http://localhost:<port>/report.html in a headless browser.Orchestrator pre-validation (do before spawning Coder on legacy path): The orchestrator should scan the source for all Mermaid blocks and do a quick syntax sanity check. If any of these patterns are found, fix them:
<br>, <video>, <b>, etc. -> replace with plain text{text: with colon} -> {"text with colon"}& characters -> &A[Label with spaces] -> A["Label with spaces"]After verification passes, print the full absolute paths:
Report ready:
report.html (local server):
file://<ABSOLUTE_OUTPUT_DIR>/report.html
report-offline.html (self-contained, open directly):
file://<ABSOLUTE_OUTPUT_DIR>/report-offline.html
Then open the offline file in the system browser:
open <ABSOLUTE_OUTPUT_DIR>/report-offline.htmlxdg-open <ABSOLUTE_OUTPUT_DIR>/report-offline.html| Markdown Element | HTML Output |
|---|---|
# Title | <h1> with page header styling and bottom border |
## Section | <h2> with section divider border |
### Subsection | <h3> in theme primary color |
#### Point | <h4> |
[^N^] citations | <span class="citation"> superscript |
| Tables | <table> with styled headers, hover rows, responsive scroll |
| Mermaid code blocks | <div class="mermaid"> (rendered by Mermaid.js) |
| Bullet lists | <ul> with styled bullets |
| Numbered lists | <ol> |
Callout blocks (> **Note**) | <div class="callout"> |
| Conflict zone sections | <div class="conflict-zone"> with warning label |
| Source lists | <details> collapsible sections |
When the report contains tables with >=3 rows of numeric data:
<canvas> element.chart-source attribution linemaintainAspectRatio: trueThe emitter (Step 4a) always writes two files:
report.html -- development/server artifact. CSS and vendor JS are copied as co-located files and referenced via relative <link> / <script> tags. Requires an HTTP server from the output directory.report-offline.html -- fully self-contained single file. All CSS (base + theme + embedded font-faces) and Mermaid JS are inlined. Opens directly from file:// with no network or server required.Both files must include <meta charset="UTF-8"> and <meta name="viewport">.
/deep-research.report.html (requires co-located assets + HTTP server) and report-offline.html (fully self-contained, opens from file://).report-offline.html is the shareable artifact.groupings.json is present, always use the emitter (Step 4a). Do not fall back to the Coder subagent (Step 4b) when the emitter path is available.make-offline.ts is legacy-only. Do not invoke make-offline.ts on the emitter path -- the emitter already writes both report.html and report-offline.html.npx claudepluginhub sdkks/deep-researcher-visualized --plugin deep-researcherCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.