Figure View
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, then copy.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install alirezarezvani-figure-viewWhat this does: Use when an agent produces or hands over a diagram, chart, screenshot or other image file: render HTML, SVG, PNG, JPG, GIF or WebP figures to a PNG the agent can look at before claiming the figure is right, deliver figures as file:// links with browser zoom controls instead of inline previews that cannot be enlarged, and show them enlarged in the terminal with zoom, pan and fit. Standard-library scripts plus a local Chrome, Chromium or Edge; the viewer works in Kitty-graphics terminals (kitty, Ghostty, WezTerm, Konsole, herdr). Not for designing the figure itself.
Manual setup by platform
Claude Code
~/.claude/skills/alirezarezvani-figure-view/SKILL.md
Instructions
Figure View
A figure is only finished when someone has looked at it. Agents write diagrams as HTML or SVG and never see
them render; people get a thumbnail in chat they cannot enlarge. This skill closes both gaps with two
standard-library scripts:
scripts/render_figure.pyturns any figure into a PNG, so the agent can open the picture and check it.scripts/view_figure.pyshows a figure enlarged in the terminal, with zoom, pan and fit.
Do not use it to design the figure (use a diagram skill), for remote files the browser cannot read, or as a
general image editor.
Before starting
Check the machine instead of asking:
python3 scripts/render_figure.py --sample --json # the script runs; no browser needed for this
python3 scripts/render_figure.py fig.html --json # a clear error names the fix if no Chrome is found
HTML, SVG, JPG, GIF and WebP need a local Chrome, Chromium or Edge (found automatically, or set with
--browser / FIGURE_VIEW_BROWSER). A PNG within the 4-megapixel cap needs nothing.
Modes
- Look (default for agents): render the figure and inspect the PNG before saying it is done.
- Deliver: hand the figure to the person so they can enlarge it.
- View: show it enlarged in the person's terminal.
- Wire in: connect the viewer to a harness's link clicks or panes.
Workflow: look at your own figure
- Write the figure to a stable absolute path, for example
/tmp/billing-architecture.html. python3 scripts/render_figure.py /tmp/billing-architecture.html --jsonprints{png, width, height}.
Renders are cached until the file changes.- Open the PNG with the harness's image reading and check it: labels clipped, arrows crossing nodes,
text too small, the legend cut off. Fix the source and render again. Never describe a figure you have
not looked at. - Limit: for an HTML page, only its largest inline
<svg>is rendered, with the page's Google Fonts
and paper colour. Other page<style>rules and:rootcustom properties are not carried over, so
an SVG styled by page CSS renders unstyled. Inline the styles into the SVG before you check it.
Workflow: deliver a figure
- For HTML diagrams, paste assets/enlarge-controls.html into the page
(style block in<head>, controls before the.diagram-container) and replaceSLUGwith the
diagram's slug. The CSS-only Normal / Fit screen / 2x / 3x buttons work in any browser and add no script. - In the reply, put the figure's
file://URL on its own line. Most terminals open it on a modified click. - Offer the terminal view when the person works in a Kitty-graphics terminal (next workflow).
Workflow: view in the terminal
python3 scripts/view_figure.py /tmp/billing-architecture.html # in a terminal pane or split
The viewer checks for Kitty graphics first. Without them it prints the rendered PNG's path and exits 1,
so the person can open it in an image viewer. Run it in a split pane beside the session where the harness
allows, so the conversation stays visible.
To keep one viewer and switch figures, start it with --follow and hand figures to it:
python3 scripts/view_figure.py --follow # the long-running viewer pane
python3 scripts/view_figure.py --send /tmp/next-figure.png --json
# {"sent": true, "viewer_running": true, "viewer_command": [".../python3", ".../view_figure.py", "--follow"]}
When viewer_running is false, start viewer_command in a new pane. That pair is the whole integration
contract for a harness; see the README for a Herdr example.
Example
The diagram shows the four billing services and the two queues between them.
file:///tmp/billing-architecture.html
Open it to zoom in, or view it here: python3 scripts/view_figure.py /tmp/billing-architecture.html
Viewer controls
| Input | Action |
|---|---|
[ - ] [ + ], + -, wheel at the pointer | Zoom between fit (100%) and 800% |
[ Fit ], 0, double-click | Back to fit (double-click toggles fit and 200% at the pointer) |
Drag, arrows, h j k l | Pan; the figure always covers the frame |
[ Open in browser ], o | The original file in the default browser |
r | Render again |
[ Close ], q, Esc | Close the viewer |
Troubleshoot
| Symptom | Cause and fix |
|---|---|
No Chrome, Chromium or Edge found | Install one, or pass --browser / set FIGURE_VIEW_BROWSER to its executable |
| Viewer prints a PNG path and exits 1 | The terminal has no Kitty graphics; open the PNG, or use kitty, Ghostty, WezTerm or Konsole |
| Pane shows "could not draw the image" | The terminal refused the image size; set FIGURE_VIEW_MAX_PIXELS lower (default 4000000) |
| Web fonts missing in the PNG | The render had no network; the figure falls back to system fonts |
Rendering limits, the security model and terminal quirks: references/design.md.
Anti-patterns
- Claiming a figure looks right without rendering it. Look at the PNG first.
- Delivering only an inline image. Chat previews cannot be enlarged; always give the
file://URL. - Rendering untrusted pages with scripts on. Keep the script-blocking wrapper; never pass pages to a
browser that runs their code. - Starting a new viewer for every figure. Use
--followand--sendso one pane switches figures. - Editing the cached PNG. Fix the source; the cache follows it.
Proactive Triggers
- An agent writes a diagram, chart or screenshot to a file and is about to describe it.
- The person squints at, or asks to enlarge, an inline preview.
- A diagram skill produces HTML that will be viewed both in a browser and in the terminal.
- Several figures are delivered in one session (one
--followviewer, not one per figure). - A figure's labels or layout were changed and need a visual re-check.
Output Artifacts
| Artifact | Where |
|---|---|
| Rendered PNG | render_figure.py --json prints its path (cache in ~/.cache/figure-view/renders/) |
| Figure with browser zoom controls | the HTML path given in the reply |
file:// link on its own line | the reply |
| Enlarged terminal view | a pane running view_figure.py |
| Viewer state and log | ~/.cache/figure-view/ |
Related Skills
diagramming-processesand other diagram skills: use them to design the figure; use figure-view to check
and deliver it. Not a replacement for either.chart-designer: use it for chart configs; render the chart's HTML here to check it.readme-polish: use it for figures inside a README on GitHub; figure-view covers local viewing only.demo-video: use it for motion; figure-view shows still images (an animated GIF shows its first frame).
Security
Reviews (0)
Related skills
Browse all →More from Multi-Domain Skills
View source →More Build skills
Browse category →Frequently asked questions about figure-view
What does the figure-view skill do?
Use when an agent produces or hands over a diagram, chart, screenshot or other image file: render HTML, SVG, PNG, JPG, GIF or WebP figures to a PNG the agent can look at before claiming the figure is right, deliver figures as file:// links with browser zoom controls instead of inline previews that cannot be enlarged, and show them enlarged in the terminal with zoom, pan and fit. Standard-library scripts plus a local Chrome, Chromium or Edge; the viewer works in Kitty-graphics terminals (kitty, Ghostty, WezTerm, Konsole, herdr). Not for designing the figure itself. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the figure-view skill?
Run `npx @skills-hub-ai/cli install alirezarezvani-figure-view` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/alirezarezvani-figure-view/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does figure-view work with?
figure-view runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the figure-view skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use figure-view after installing it?
In Claude Code, type `/alirezarezvani-figure-view` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the figure-view skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/alirezarezvani-figure-view)<a href="https://skills-hub.ai/skills/alirezarezvani-figure-view"><img src="https://skills-hub.ai/api/badges/skill/alirezarezvani-figure-view" alt="Install on Skills Hub"></a>More options in the badge docs.