visual-explainer README

The project's README from github.com/nicobailon/visual-explainer. As one markdown file: README.md.

visual-explainer

visual-explainer

An agent skill that turns complex terminal output into styled HTML pages you actually want to read.

License: MIT

Ask your agent to explain a system architecture, review a diff, or compare requirements against a plan. Instead of ASCII art and box-drawing tables, it generates a self-contained HTML page and opens it in your browser.

> draw a diagram of our authentication flow
> /diff-review
> /plan-review ~/docs/refactor-plan.md

https://github.com/user-attachments/assets/55ebc81b-8732-40f6-a4b1-7c3781aa96ec

Why

Every coding agent defaults to ASCII art when you ask for a diagram. Box-drawing characters, monospace alignment hacks, text arrows. It works for trivial cases, but anything beyond a 3-box flowchart turns into an unreadable mess.

Tables are worse. Ask the agent to compare 15 requirements against a plan and you get a wall of pipes and dashes that wraps and breaks in the terminal. The data is there but it's painful to read.

This skill fixes that. Real typography, dark/light themes, interactive Mermaid diagrams with zoom and pan. Normal skill use has no build step and no dependency beyond a browser; optional MCP and PPTX utilities use small Node dependencies.

Install

Harness Support Install path / behavior
Claude Code Marketplace plugin Preserved marketplace shape with source at plugins/visual-explainer/
Pi Package metadata plus installer package.json advertises the skill, prompts, and native visual_explainer tool with prepare and render actions; install-pi.sh installs copied skill/prompt resources for legacy manual installs
MCP hosts Local stdio MCP server visual-explainer-mcp exposes render tools, prompt templates, and read-only skill resources without starting an HTTP server
PPTX export Best-effort static utility visual-explainer-pptx converts simple HTML slide decks to .pptx; HTML remains the source of truth
Antigravity CLI Native Agent Skills path Copy plugins/visual-explainer/ to ~/.gemini/antigravity-cli/skills/visual-explainer for global use or .agents/skills/visual-explainer for one workspace
Codex CLI Native skill path plus optional prompts Copy to ~/.codex/skills/visual-explainer; optional prompts go in ~/.codex/prompts/ if your Codex build supports them
OpenCode/opencode Observed skill/command paths Copy to ~/.config/opencode/skill/visual-explainer; optional commands go in ~/.config/opencode/command/
Cursor Native Agent Skills path Copy plugins/visual-explainer/ to ~/.cursor/skills/visual-explainer globally or .cursor/skills/visual-explainer per workspace; optional legacy rule in configs/cursor/
OpenClaw Lightweight AGENTS/rules guidance Use the supplied AGENTS guidance with the canonical skill directory
VS Code Copilot / Copilot CLI Custom instructions or rules guidance Add the supplied AGENTS guidance to your supported workspace instruction or rules setup

Claude Code (marketplace):

/plugin marketplace add nicobailon/visual-explainer
/plugin install visual-explainer@visual-explainer-marketplace

Note: Claude Code plugins namespace commands as /visual-explainer:command-name.

Pi:

pi install git:github.com/nicobailon/visual-explainer

Or from a local checkout:

git clone --depth 1 https://github.com/nicobailon/visual-explainer.git
pi install ./visual-explainer

The package manifest advertises the canonical skill, command templates, and Pi tool:

"pi": {
  "extensions": ["./plugins/visual-explainer/extension.ts"],
  "skills": ["./plugins/visual-explainer"],
  "prompts": ["./plugins/visual-explainer/commands"],
  "image": "./banner.png"
}

The Pi extension registers one native visual_explainer tool. Use action: "prepare" to plan a visual explanation after generating or reviewing a substantial plan, architecture, diff, or implementation, and action: "render" to write complete HTML pages to ~/.agent/diagrams/. The opt-in action: "render_quick" validates a compact JSON spec and renders it with the bundled local renderer. Render actions can open with viewer: "browser" by default, viewer: "glimpse" when glimpseui is installed, or viewer: "auto" to try Glimpse and fall back to the browser. /generate-web-diagram remains the bundled prompt template command.

If you previously used the old curl/manual installer, remove those copied files before using pi install; otherwise Pi will report skill and prompt conflicts because the user-level copies shadow the package resources:

rm -rf ~/.pi/agent/skills/visual-explainer
rm -f ~/.pi/agent/prompts/{diff-review,fact-check,generate-slides,generate-visual-plan,generate-web-diagram,plan-review,project-recap}.md
rm -f ~/.pi/agent/prompts/s[h]are*.md

The legacy installer still works if you prefer copied skill and prompt files over package management, but it does not install the native Pi tool:

curl -fsSL https://raw.githubusercontent.com/nicobailon/visual-explainer/main/install-pi.sh | bash

MCP:

Use visual-explainer-mcp from a package install, or run npm install --no-package-lock before pointing your host at plugins/visual-explainer/mcp/server.mjs from a checkout. Some hosts need an absolute path to the binary. The MCP server is local stdio only. It does not call an LLM, start an HTTP listener, handle credentials, or write outside its configured output directory (default ~/.agent/diagrams/). Set VISUAL_EXPLAINER_OUTPUT_DIR to move that jail to another directory on the same machine; unset keeps the default path byte-identical. A configured jail must resolve to itself, so symlinked jail paths are rejected. Render targets reject existing symlinks and are written through a temporary file rename. Point the jail at a directory only your user can write; avoid world-writable or group-writable shared folders so another local user cannot replace render targets between validation and write.

Example package configuration:

{
  "mcpServers": {
    "visual-explainer": {
      "command": "visual-explainer-mcp"
    }
  }
}

Example checkout configuration:

{
  "mcpServers": {
    "visual-explainer": {
      "command": "node",
      "args": ["/absolute/path/to/visual-explainer/plugins/visual-explainer/mcp/server.mjs"]
    }
  }
}

The server exposes three tools: visual_explainer_prepare, visual_explainer_render_html, and visual_explainer_render_quick. Render tools default to open: false; set open: true only when you want the server to request a browser or Glimpse window. It also exposes the bundled command templates as MCP prompts and the canonical SKILL.md, command markdown, quick README, and quick schema as read-only resources.

Antigravity CLI:

Antigravity CLI is the supported Google successor path for consumer Gemini CLI workflows. It loads Agent Skills from .agents/skills/ at the workspace level or ~/.gemini/antigravity-cli/skills/ globally.

Global install:

git clone --depth 1 https://github.com/nicobailon/visual-explainer.git /tmp/visual-explainer

mkdir -p ~/.gemini/antigravity-cli/skills
cp -R /tmp/visual-explainer/plugins/visual-explainer ~/.gemini/antigravity-cli/skills/visual-explainer

rm -rf /tmp/visual-explainer

PowerShell (global):

$ErrorActionPreference = 'Stop'
$tmp = Join-Path $env:TEMP ("visual-explainer-" + [guid]::NewGuid().ToString())
$dest = Join-Path $env:USERPROFILE ".gemini\antigravity-cli\skills\visual-explainer"
$parent = Split-Path -Parent $dest
$run = $null
$staging = $null
$backup = $null
$moved = $false
$attempted = $false
$installed = $false
New-Item -ItemType Directory -Force -Path $tmp | Out-Null
try {
  $repo = Join-Path $tmp 'repo'
  git clone --depth 1 https://github.com/nicobailon/visual-explainer.git $repo
  if ($LASTEXITCODE -ne 0) { throw "git clone failed with exit code $LASTEXITCODE" }
  New-Item -ItemType Directory -Force -Path $parent | Out-Null
  $run = Join-Path $parent (".visual-explainer-install-" + [guid]::NewGuid().ToString())
  $staging = Join-Path $run 'staging'
  $backup = Join-Path $run 'backup'
  New-Item -ItemType Directory -Force -Path $run | Out-Null
  Copy-Item -LiteralPath (Join-Path $repo 'plugins\visual-explainer') -Destination $staging -Recurse -Force
  if (-not (Test-Path -LiteralPath (Join-Path $staging 'SKILL.md') -PathType Leaf)) { throw 'staged skill is incomplete' }
  if (Test-Path -LiteralPath $dest) { Move-Item -LiteralPath $dest -Destination $backup; $moved = $true }
  $attempted = $true
  Move-Item -LiteralPath $staging -Destination $dest
  $installed = $true
} finally {
  if (-not $installed -and $attempted) {
    if (Test-Path -LiteralPath $dest) { Move-Item -LiteralPath $dest -Destination (Join-Path $run 'failed') -ErrorAction SilentlyContinue }
    if ($moved -and (Test-Path -LiteralPath $backup) -and -not (Test-Path -LiteralPath $dest)) { Move-Item -LiteralPath $backup -Destination $dest -ErrorAction SilentlyContinue }
  }
  if ($run -and ((-not (Test-Path -LiteralPath $backup)) -or $installed)) { Remove-Item -LiteralPath $run -Recurse -Force -ErrorAction SilentlyContinue }
  Remove-Item -LiteralPath $tmp -Recurse -Force -ErrorAction SilentlyContinue
}

Workspace install:

git clone --depth 1 https://github.com/nicobailon/visual-explainer.git /tmp/visual-explainer

mkdir -p .agents/skills
cp -R /tmp/visual-explainer/plugins/visual-explainer .agents/skills/visual-explainer

rm -rf /tmp/visual-explainer

PowerShell (workspace):

$ErrorActionPreference = 'Stop'
$tmp = Join-Path $env:TEMP ("visual-explainer-" + [guid]::NewGuid().ToString())
$dest = ".agents\skills\visual-explainer"
$parent = Split-Path -Parent $dest
$run = $null
$staging = $null
$backup = $null
$moved = $false
$attempted = $false
$installed = $false
New-Item -ItemType Directory -Force -Path $tmp | Out-Null
try {
  $repo = Join-Path $tmp 'repo'
  git clone --depth 1 https://github.com/nicobailon/visual-explainer.git $repo
  if ($LASTEXITCODE -ne 0) { throw "git clone failed with exit code $LASTEXITCODE" }
  New-Item -ItemType Directory -Force -Path $parent | Out-Null
  $run = Join-Path $parent (".visual-explainer-install-" + [guid]::NewGuid().ToString())
  $staging = Join-Path $run 'staging'
  $backup = Join-Path $run 'backup'
  New-Item -ItemType Directory -Force -Path $run | Out-Null
  Copy-Item -LiteralPath (Join-Path $repo 'plugins\visual-explainer') -Destination $staging -Recurse -Force
  if (-not (Test-Path -LiteralPath (Join-Path $staging 'SKILL.md') -PathType Leaf)) { throw 'staged skill is incomplete' }
  if (Test-Path -LiteralPath $dest) { Move-Item -LiteralPath $dest -Destination $backup; $moved = $true }
  $attempted = $true
  Move-Item -LiteralPath $staging -Destination $dest
  $installed = $true
} finally {
  if (-not $installed -and $attempted) {
    if (Test-Path -LiteralPath $dest) { Move-Item -LiteralPath $dest -Destination (Join-Path $run 'failed') -ErrorAction SilentlyContinue }
    if ($moved -and (Test-Path -LiteralPath $backup) -and -not (Test-Path -LiteralPath $dest)) { Move-Item -LiteralPath $backup -Destination $dest -ErrorAction SilentlyContinue }
  }
  if ($run -and ((-not (Test-Path -LiteralPath $backup)) -or $installed)) { Remove-Item -LiteralPath $run -Recurse -Force -ErrorAction SilentlyContinue }
  Remove-Item -LiteralPath $tmp -Recurse -Force -ErrorAction SilentlyContinue
}

Launch agy in the project and use /skills to confirm visual-explainer is discovered. Ask Antigravity to use the visual-explainer skill for diagrams, visual reviews, slide decks, and complex tables. Antigravity SDK projects can reuse the same SKILL.md content as an Agent Skill resource, but this repo does not ship a separate SDK wrapper. The bundled prompt templates remain reference markdown under plugins/visual-explainer/commands/; no separate Antigravity plugin adapter is included.

Codex CLI:

git clone --depth 1 https://github.com/nicobailon/visual-explainer.git /tmp/visual-explainer

mkdir -p ~/.codex/skills ~/.codex/prompts
cp -R /tmp/visual-explainer/plugins/visual-explainer ~/.codex/skills/visual-explainer

# Optional, only if your Codex build supports prompt templates:
cp /tmp/visual-explainer/plugins/visual-explainer/commands/*.md ~/.codex/prompts/

rm -rf /tmp/visual-explainer

PowerShell:

$ErrorActionPreference = 'Stop'
$tmp = Join-Path $env:TEMP ("visual-explainer-" + [guid]::NewGuid().ToString())
$dest = Join-Path $env:USERPROFILE ".codex\skills\visual-explainer"
$parent = Split-Path -Parent $dest
$promptDir = Join-Path $env:USERPROFILE ".codex\prompts"
$run = $null
$staging = $null
$backup = $null
$moved = $false
$attempted = $false
$installed = $false
New-Item -ItemType Directory -Force -Path $tmp | Out-Null
try {
  $repo = Join-Path $tmp 'repo'
  git clone --depth 1 https://github.com/nicobailon/visual-explainer.git $repo
  if ($LASTEXITCODE -ne 0) { throw "git clone failed with exit code $LASTEXITCODE" }
  New-Item -ItemType Directory -Force -Path $parent, $promptDir | Out-Null
  $run = Join-Path $parent (".visual-explainer-install-" + [guid]::NewGuid().ToString())
  $staging = Join-Path $run 'staging'
  $backup = Join-Path $run 'backup'
  New-Item -ItemType Directory -Force -Path $run | Out-Null
  Copy-Item -LiteralPath (Join-Path $repo 'plugins\visual-explainer') -Destination $staging -Recurse -Force
  if (-not (Test-Path -LiteralPath (Join-Path $staging 'SKILL.md') -PathType Leaf)) { throw 'staged skill is incomplete' }
  # Optional, only if your Codex build supports prompt templates:
  Copy-Item -Path (Join-Path $staging 'commands\*.md') -Destination $promptDir -Force
  if (Test-Path -LiteralPath $dest) { Move-Item -LiteralPath $dest -Destination $backup; $moved = $true }
  $attempted = $true
  Move-Item -LiteralPath $staging -Destination $dest
  $installed = $true
} finally {
  if (-not $installed -and $attempted) {
    if (Test-Path -LiteralPath $dest) { Move-Item -LiteralPath $dest -Destination (Join-Path $run 'failed') -ErrorAction SilentlyContinue }
    if ($moved -and (Test-Path -LiteralPath $backup) -and -not (Test-Path -LiteralPath $dest)) { Move-Item -LiteralPath $backup -Destination $dest -ErrorAction SilentlyContinue }
  }
  if ($run -and ((-not (Test-Path -LiteralPath $backup)) -or $installed)) { Remove-Item -LiteralPath $run -Recurse -Force -ErrorAction SilentlyContinue }
  Remove-Item -LiteralPath $tmp -Recurse -Force -ErrorAction SilentlyContinue
}

Invoke with $visual-explainer or ask Codex to use the visual-explainer skill. If prompts are installed and supported, use /prompts:diff-review, /prompts:plan-review, etc.

OpenCode/opencode:

git clone --depth 1 https://github.com/nicobailon/visual-explainer.git /tmp/visual-explainer

mkdir -p ~/.config/opencode/skill ~/.config/opencode/command
cp -R /tmp/visual-explainer/plugins/visual-explainer ~/.config/opencode/skill/visual-explainer

# Optional command templates:
cp /tmp/visual-explainer/plugins/visual-explainer/commands/*.md ~/.config/opencode/command/

rm -rf /tmp/visual-explainer

PowerShell:

$ErrorActionPreference = 'Stop'
$tmp = Join-Path $env:TEMP ("visual-explainer-" + [guid]::NewGuid().ToString())
$dest = Join-Path $env:USERPROFILE ".config\opencode\skill\visual-explainer"
$parent = Split-Path -Parent $dest
$promptDir = Join-Path $env:USERPROFILE ".config\opencode\command"
$run = $null
$staging = $null
$backup = $null
$moved = $false
$attempted = $false
$installed = $false
New-Item -ItemType Directory -Force -Path $tmp | Out-Null
try {
  $repo = Join-Path $tmp 'repo'
  git clone --depth 1 https://github.com/nicobailon/visual-explainer.git $repo
  if ($LASTEXITCODE -ne 0) { throw "git clone failed with exit code $LASTEXITCODE" }
  New-Item -ItemType Directory -Force -Path $parent, $promptDir | Out-Null
  $run = Join-Path $parent (".visual-explainer-install-" + [guid]::NewGuid().ToString())
  $staging = Join-Path $run 'staging'
  $backup = Join-Path $run 'backup'
  New-Item -ItemType Directory -Force -Path $run | Out-Null
  Copy-Item -LiteralPath (Join-Path $repo 'plugins\visual-explainer') -Destination $staging -Recurse -Force
  if (-not (Test-Path -LiteralPath (Join-Path $staging 'SKILL.md') -PathType Leaf)) { throw 'staged skill is incomplete' }
  # Optional command templates:
  Copy-Item -Path (Join-Path $staging 'commands\*.md') -Destination $promptDir -Force
  if (Test-Path -LiteralPath $dest) { Move-Item -LiteralPath $dest -Destination $backup; $moved = $true }
  $attempted = $true
  Move-Item -LiteralPath $staging -Destination $dest
  $installed = $true
} finally {
  if (-not $installed -and $attempted) {
    if (Test-Path -LiteralPath $dest) { Move-Item -LiteralPath $dest -Destination (Join-Path $run 'failed') -ErrorAction SilentlyContinue }
    if ($moved -and (Test-Path -LiteralPath $backup) -and -not (Test-Path -LiteralPath $dest)) { Move-Item -LiteralPath $backup -Destination $dest -ErrorAction SilentlyContinue }
  }
  if ($run -and ((-not (Test-Path -LiteralPath $backup)) -or $installed)) { Remove-Item -LiteralPath $run -Recurse -Force -ErrorAction SilentlyContinue }
  Remove-Item -LiteralPath $tmp -Recurse -Force -ErrorAction SilentlyContinue
}

Activate it by asking OpenCode to use the visual-explainer skill. Command-template behavior depends on the installed OpenCode/opencode build.

Cursor:

Cursor loads Agent Skills from ~/.cursor/skills/ globally and .cursor/skills/ at the workspace level. Copy the canonical skill directory there and Cursor discovers it from the name: field in SKILL.md.

Global install:

set -euo pipefail
tmp="$(mktemp -d "${TMPDIR:-/tmp}/visual-explainer.XXXXXX")"
dest="$HOME/.cursor/skills/visual-explainer"
parent="$(dirname "$dest")"
run=''
stage=''
backup=''
moved=0
installed=0
cleanup() {
  status=$?
  if [ "$status" -ne 0 ] && [ "$moved" -eq 1 ] && [ "$installed" -eq 0 ]; then
    if [ -e "$dest" ]; then mv -- "$dest" "$run/failed" || true; fi
    if [ -e "$backup" ]; then mv -- "$backup" "$dest" || true; fi
  fi
  if [ -n "$run" ] && { [ "$installed" -eq 1 ] || [ ! -e "$backup" ]; }; then
    rm -rf -- "$run" || true
  fi
  rm -rf -- "$tmp" || true
}
trap cleanup EXIT
if git clone --depth 1 https://github.com/nicobailon/visual-explainer.git "$tmp/repo"; then :; else
  status=$?
  echo "git clone failed with exit code $status" >&2
  exit "$status"
fi
mkdir -p "$parent"
run="$(mktemp -d "$parent/.visual-explainer-install.XXXXXX")"
stage="$run/staging"
backup="$run/backup"
cp -R "$tmp/repo/plugins/visual-explainer" "$stage"
test -f "$stage/SKILL.md"
if [ -e "$dest" ]; then mv -- "$dest" "$backup"; moved=1; fi
mv -- "$stage" "$dest"
installed=1

Workspace install:

set -euo pipefail
tmp="$(mktemp -d "${TMPDIR:-/tmp}/visual-explainer.XXXXXX")"
dest=".cursor/skills/visual-explainer"
parent="$(dirname "$dest")"
run=''
stage=''
backup=''
moved=0
installed=0
cleanup() {
  status=$?
  if [ "$status" -ne 0 ] && [ "$moved" -eq 1 ] && [ "$installed" -eq 0 ]; then
    if [ -e "$dest" ]; then mv -- "$dest" "$run/failed" || true; fi
    if [ -e "$backup" ]; then mv -- "$backup" "$dest" || true; fi
  fi
  if [ -n "$run" ] && { [ "$installed" -eq 1 ] || [ ! -e "$backup" ]; }; then
    rm -rf -- "$run" || true
  fi
  rm -rf -- "$tmp" || true
}
trap cleanup EXIT
if git clone --depth 1 https://github.com/nicobailon/visual-explainer.git "$tmp/repo"; then :; else
  status=$?
  echo "git clone failed with exit code $status" >&2
  exit "$status"
fi
mkdir -p "$parent"
run="$(mktemp -d "$parent/.visual-explainer-install.XXXXXX")"
stage="$run/staging"
backup="$run/backup"
cp -R "$tmp/repo/plugins/visual-explainer" "$stage"
test -f "$stage/SKILL.md"
if [ -e "$dest" ]; then mv -- "$dest" "$backup"; moved=1; fi
mv -- "$stage" "$dest"
installed=1

Ask Cursor to use the visual-explainer skill for diagrams, visual reviews, slide decks, and complex tables.

Optional legacy rule: add configs/cursor/visual-explainer.mdc to your Cursor rules if you prefer rules-based guidance over relying on skill discovery alone.

OpenClaw:

Use configs/openclaw/AGENTS.md as lightweight project guidance and copy or reference plugins/visual-explainer/ as the canonical skill source. No native OpenClaw plugin adapter is included.

VS Code Copilot / Copilot CLI:

Use configs/copilot/AGENTS.md as custom instructions or rules guidance. For VS Code, copy it into a supported workspace custom-instructions file, such as .github/copilot-instructions.md. For Copilot CLI, add it through the workspace instruction or rules setup supported by your installed version. Both read the canonical skill from plugins/visual-explainer/; this repository does not provide native Agent Skills support, a Copilot package, or a tested Copilot plugin adapter.

Commands

Command What it does
/generate-web-diagram Generate an HTML diagram for any topic
/generate-visual-plan Generate a visual implementation plan for a feature or extension
/generate-slides Generate a magazine-quality slide deck
/diff-review Visual diff review with architecture comparison and code review
/plan-review Compare a plan against the codebase with risk assessment
/project-recap Mental model snapshot for context-switching back to a project
/fact-check Verify accuracy of a document against actual code

The agent also kicks in automatically when it's about to dump a complex table in the terminal (4+ rows or 3+ columns) — it renders HTML instead.

Quick Mode

Add --quick to /generate-web-diagram, /diff-review, /plan-review, or /project-recap to ask the agent for a compact JSON spec. The bundled renderer validates the spec, escapes its content, and creates a complete self-contained HTML page. Pi uses the existing visual_explainer tool with action: "render_quick". Other harnesses can run plugins/visual-explainer/quick/render.mjs locally.

Quick mode is opt-in. Commands without --quick keep the full custom HTML workflow. The agent also falls back to full mode when the content does not fit the quick schema or when validation or rendering fails.

/generate-web-diagram --quick authentication request flow
/diff-review --quick main..HEAD

Slide Deck Mode

Any command that produces a scrollable page supports --slides to generate a slide deck instead:

/diff-review --slides
/project-recap --slides 2w

For a portable presentation file, add --pptx to /generate-slides or run the exporter after generating an HTML deck:

visual-explainer-pptx ~/.agent/diagrams/my-deck.html ~/.agent/diagrams/my-deck.pptx

PPTX export is best-effort and static. It extracts titles, text, bullets, simple tables, code blocks, and Mermaid source placeholders from <section class="slide"> elements. It does not preserve animations, reader navigation, responsive layout, custom fonts, live Mermaid/Chart.js/SVG/canvas rendering, or JavaScript behavior. Use the HTML deck for final fidelity.

https://github.com/user-attachments/assets/342d3558-5fcf-4fb2-bc03-f0dd5b9e35dc

Themes

Ask for switchable themes, or name a palette, and the page gets a picker — colored dots for the palette and Aa chips for the font pair, both swapping live and re-rendering every Mermaid diagram:

"explain this pipeline, use Gruvbox"
"diagram the auth flow, let me switch themes"

Eleven palettes ship with it: Dracula, Nord, One Dark, Catppuccin Mocha, Tokyo Night, Gruvbox Dark, Synthwave '84 (dark) and Solarized Light, GitHub Light, Catppuccin Latte, Gruvbox Light. The font chips offer the pairs the skill already recommends. Mermaid colors and label fonts are derived from the active selection, so diagrams always match the page around them. Set theme: or font: in visual-explainer.config.md to choose what loads first. Claude Code users can keep personal overrides in .claude/visual-explainer.local.md; shared project defaults should use the harness-neutral file.

The picker is opt-in. Pages that don't ask for one still get a single palette and font pair chosen to fit the content.

How It Works

.claude-plugin/
├── plugin.json           ← marketplace identity
└── marketplace.json      ← plugin catalog
plugins/
└── visual-explainer/
    ├── .claude-plugin/
    │   └── plugin.json   ← plugin manifest
    ├── SKILL.md           ← workflow + design principles
    ├── extension.ts       ← Pi native tool
    ├── commands/          ← slash commands
    ├── quick/             ← JSON schema + deterministic local renderer
    ├── mcp/               ← local stdio MCP server
    ├── pptx/              ← best-effort static PPTX exporter
    ├── references/        ← agent reads before generating
    │   ├── css-patterns.md   (layouts, animations, theming)
    │   ├── libraries.md      (Mermaid, Chart.js, fonts)
    │   ├── responsive-nav.md (sticky TOC for multi-section pages)
    │   ├── slide-patterns.md (slide engine, transitions, presets)
    │   └── themes.md          (11 palettes + runtime theme/font picker)
    └── templates/         ← reference templates with different palettes
        ├── architecture.html
        ├── mermaid-flowchart.html
        ├── data-table.html
        └── slide-deck.html

Output: ~/.agent/diagrams/filename.html → opens in browser. When you explicitly request AI-readable output or a source brief, the agent can also write ~/.agent/diagrams/filename.md as a concise companion. It asks before replacing an existing companion. HTML remains the final visual output; the Markdown companion is not its source. In Pi package installs, agents can offer visual_explainer with action: "prepare" after generating or reviewing a substantial plan, architecture, diff, or implementation when a visual explanation would help, then call it with action: "render" as the final write/open step. MCP hosts use the separate visual-explainer-mcp stdio server and default render tools to open: false.

The skill routes to the right approach automatically: Mermaid for flowcharts and diagrams, CSS Grid for architecture overviews, HTML tables for data, Chart.js for dashboards.

Limitations

Credits

Borrows ideas from Anthropic's frontend-design skill and interface-design.

License

MIT

visual-explainer (nicobailon/visual-explainer)

Searching Database…

这是什么?一个供 AI 编程 agent 使用的技能,能把复杂的终端输出——图表、diff 审查、方案评估、数据表格、项目总结——变成排版精美的独立 HTML 页面,而不是 ASCII 字符画和用线条拼出来的表格。
那这是我要运行的应用,还是我的编程 agent 加载的东西?不是应用——它是一个技能:给你的编程 agent 阅读的说明、提示词和模板。它还附带一个可选的本地 MCP 服务器和 Pi harness 的原生工具。
我怎么把它装进我的编程 agent?Claude Code 可以把它作为 marketplace 插件安装;Codex CLI、Cursor 和 Antigravity 用户把技能文件夹复制到 agent 的 skills 目录(例如 ~/.cursor/skills/visual-explainer);MCP 宿主则运行附带的本地 stdio 服务器。
我需要先装 Node 或其他东西吗?不需要——正常使用这个技能没有构建步骤,除了浏览器之外没有任何依赖。只有可选的 MCP 服务器和 PPTX 导出器才会引入少量 Node 依赖。
自动打开页面或导出 PowerPoint 有什么坑吗?自动打开取决于你用的 harness、浏览器访问权限和沙盒规则;Mermaid 图表在系统主题变化后需要刷新一次;而且输出质量会因你使用的模型而不同。
我用的是 Windows、Mac 还是 Linux 有关系吗?你的编程 agent 能跑的地方它就能跑——README 里同时写了 Windows PowerShell 和 Unix 的安装路径——而且输出是普通 HTML,任何浏览器都能打开。
MCP 服务器会把我的代码或凭据发到别处吗?不会。它只用本地 stdio:不调用 LLM,不开 HTTP 监听,不处理凭据,写入被限制在它的输出目录内(默认 ~/.agent/diagrams/),并且会拒绝符号链接路径。
我可以让我的 agent 用它做什么?内置七个命令:/generate-web-diagram、/generate-visual-plan、/generate-slides、/diff-review、/plan-review、/project-recap 和 /fact-check。另外,当 agent 准备打印大表格(4 行以上或 3 列以上)时会自动触发,改用 HTML 渲染。
它是怎么挑选合适的可视化形式的?它会自动路由:流程图和示意图用 Mermaid,架构总览用 CSS Grid,数据用 HTML 表格,仪表盘用 Chart.js。还有一个可选的 --quick 模式,通过一个附带的本地渲染器来渲染紧凑的 JSON 规格,而不是走完整的自定义 HTML 流程。
幻灯片能导出成 PowerPoint 吗?可以——在 /generate-slides 后面加 --pptx,或者对已有的 HTML 幻灯片运行导出器。转换是静态的、尽力而为(标题、文本、列表、简单表格、代码块),想要完整还原效果,还是以 HTML 幻灯片为准。
我能改生成页面的外观吗?可以——让它打开主题选择器,或直接指定配色。它自带十一套配色(Dracula、Nord、Tokyo Night、Gruvbox、Solarized Light、GitHub Light 等等),还有推荐的字体搭配,Mermaid 图表也会重新渲染以匹配当前选择。
Creator
nicobailon
Size
3.6 MB
Stars
10.5K
Age
8mo
Commits · 90 Days