illustrate-cli
Render structured data as CLI-style PNG images. Terminal aesthetics, high DPI, zero effort.
How it works
The skill has a bundled script (scripts/render.mjs) that uses puppeteer to screenshot HTML styled as terminal output. You write the HTML body using the CSS classes below, the script handles the rest.
Workflow
- Gather the data — tables, command output, metrics, whatever the user needs visualized
- Write the HTML body using the CSS classes documented below
- Write a small runner script that imports
render.mjs and calls render() with your HTML
- Run it with node — outputs a PNG to the specified path
- Show the user the result, iterate if needed
Available themes
| Theme |
Style |
tokyo-night |
Blue/purple tones, easy on the eyes (default) |
dracula |
Purple/pink accents, popular dark theme |
catppuccin |
Warm pastels on dark, modern |
gruvbox |
Earthy warm tones, retro feel |
solarized |
Classic solarized dark |
CSS classes
Use these classes in your HTML to style content. They map to theme colors automatically.
Text colors
.c-dim — dimmed/hidden text (separator lines, dashes)
.c-muted — secondary text (types, labels, metadata)
.c-fg — default foreground
.c-header — headers, column names, prompts (blue-ish)
.c-accent — important values, alerts (red/pink)
.c-highlight — highlighted rows or key items (orange)
.c-success — positive values, "pass" indicators (green)
.c-warning — notable values, gold/amber (yellow)
Text styles
.c-bold — bold weight
.c-italic — italic
.c-comment — code comments (muted + italic)
Structural helpers
.cli-header — styled like a terminal prompt line ($ cat file.txt)
.cli-separator — dim separator line between header and content
.prompt — command prompt styling (green text)
pre — preformatted code blocks
- Standard
<table>, <tr>, <td>, <th> — unstyled tables that inherit theme colors
Building a table
The most common use case. Structure it like this:
<div class="cli-header">$ cat results/summary.txt</div>
<div class="cli-separator">────────────────────────────────────</div>
<table>
<!-- Header row -->
<tr>
<td class="c-muted">Column A</td>
<td class="c-muted">Column B</td>
<td class="c-muted">Column C</td>
</tr>
<!-- Separator row (optional, for CLI feel) -->
<tr>
<td class="c-dim">────────</td>
<td class="c-dim">────────</td>
<td class="c-dim">────────</td>
</tr>
<!-- Data rows -->
<tr>
<td class="c-fg">Row value</td>
<td class="c-success">99.1%</td>
<td class="c-warning">highlighted</td>
</tr>
<!-- Use c-highlight on a cell to call attention -->
<tr>
<td class="c-highlight c-bold">Important row</td>
<td class="c-accent">42.0%</td>
<td class="c-dim">–</td>
</tr>
</table>
<div style="margin-top: 14px;" class="c-comment">
// footnote or context line
</div>
Runner script pattern
Create a .mjs file that imports the render script and builds the HTML:
import { render } from '/Users/nikola/.claude/skills/illustrate-cli/scripts/render.mjs';
const html = `
<div class="cli-header">$ your-command --here</div>
<div class="cli-separator">────────────────────────────────────</div>
<table>
<tr>
<td class="c-muted">Name</td>
<td class="c-muted">Score</td>
</tr>
<tr>
<td class="c-dim">──────</td>
<td class="c-dim">──────</td>
</tr>
<tr>
<td class="c-fg">Model A</td>
<td class="c-success">85.2%</td>
</tr>
</table>
`;
await render({
outputPath: '/path/to/output.png',
html,
theme: 'tokyo-night', // optional, default
width: 800, // optional, default
scale: 2, // optional, default (2x DPI)
});
Then run: node /path/to/runner.mjs
Tips
- Keep it dense. CLI output is information-dense — that's the aesthetic.
- Use
.c-dim for dashes and placeholder values (looks like – in terminals).
- Header row + dash separator row is the most CLI-authentic table pattern.
- Add a
// comment footer with context (task count, date, methodology note).
- The
.cli-header line at the top makes it feel like a real terminal. Use something like $ cat file.txt or $ ./benchmark --results.
- For non-table content (command output, logs), use
<pre> blocks with .c-* classes on <span> elements inside.
- Width auto-adjusts to content height. Set
width wide enough for your widest row.
1---2name: illustrate-cli3description: Generate CLI-style PNG images from structured data. Use when the user wants to create terminal-looking tables, command output visualizations, or any data rendered as a CLI screenshot. Triggers on: 'make a table image', 'render as CLI', 'terminal style table', 'screenshot of table', 'CLI visualization', 'illustrate this data', or when user wants to turn tabular data or command output into a shareable image. Also use when creating images for blog posts or articles that show benchmark results, comparison tables, or structured data in terminal style.4---56# illustrate-cli78Render structured data as CLI-style PNG images. Terminal aesthetics, high DPI, zero effort.910## How it works1112The skill has a bundled script (`scripts/render.mjs`) that uses puppeteer to screenshot HTML styled as terminal output. You write the HTML body using the CSS classes below, the script handles the rest.1314## Workflow15161. **Gather the data** — tables, command output, metrics, whatever the user needs visualized172. **Write the HTML body** using the CSS classes documented below183. **Write a small runner script** that imports `render.mjs` and calls `render()` with your HTML194. **Run it** with node — outputs a PNG to the specified path205. **Show the user** the result, iterate if needed2122## Available themes2324| Theme | Style |25|-------|-------|26| `tokyo-night` | Blue/purple tones, easy on the eyes (default) |27| `dracula` | Purple/pink accents, popular dark theme |28| `catppuccin` | Warm pastels on dark, modern |29| `gruvbox` | Earthy warm tones, retro feel |30| `solarized` | Classic solarized dark |3132## CSS classes3334Use these classes in your HTML to style content. They map to theme colors automatically.3536### Text colors37- `.c-dim` — dimmed/hidden text (separator lines, dashes)38- `.c-muted` — secondary text (types, labels, metadata)39- `.c-fg` — default foreground40- `.c-header` — headers, column names, prompts (blue-ish)41- `.c-accent` — important values, alerts (red/pink)42- `.c-highlight` — highlighted rows or key items (orange)43- `.c-success` — positive values, "pass" indicators (green)44- `.c-warning` — notable values, gold/amber (yellow)4546### Text styles47- `.c-bold` — bold weight48- `.c-italic` — italic49- `.c-comment` — code comments (muted + italic)5051### Structural helpers52- `.cli-header` — styled like a terminal prompt line (`$ cat file.txt`)53- `.cli-separator` — dim separator line between header and content54- `.prompt` — command prompt styling (green text)55- `pre` — preformatted code blocks56- Standard `<table>`, `<tr>`, `<td>`, `<th>` — unstyled tables that inherit theme colors5758## Building a table5960The most common use case. Structure it like this:6162```html63<div class="cli-header">$ cat results/summary.txt</div>64<div class="cli-separator">────────────────────────────────────</div>6566<table>67 <!-- Header row -->68 <tr>69 <td class="c-muted">Column A</td>70 <td class="c-muted">Column B</td>71 <td class="c-muted">Column C</td>72 </tr>73 <!-- Separator row (optional, for CLI feel) -->74 <tr>75 <td class="c-dim">────────</td>76 <td class="c-dim">────────</td>77 <td class="c-dim">────────</td>78 </tr>79 <!-- Data rows -->80 <tr>81 <td class="c-fg">Row value</td>82 <td class="c-success">99.1%</td>83 <td class="c-warning">highlighted</td>84 </tr>85 <!-- Use c-highlight on a cell to call attention -->86 <tr>87 <td class="c-highlight c-bold">Important row</td>88 <td class="c-accent">42.0%</td>89 <td class="c-dim">–</td>90 </tr>91</table>9293<div style="margin-top: 14px;" class="c-comment">94 // footnote or context line95</div>96```9798## Runner script pattern99100Create a `.mjs` file that imports the render script and builds the HTML:101102```javascript103import { render } from '/Users/nikola/.claude/skills/illustrate-cli/scripts/render.mjs';104105const html = `106<div class="cli-header">$ your-command --here</div>107<div class="cli-separator">────────────────────────────────────</div>108109<table>110 <tr>111 <td class="c-muted">Name</td>112 <td class="c-muted">Score</td>113 </tr>114 <tr>115 <td class="c-dim">──────</td>116 <td class="c-dim">──────</td>117 </tr>118 <tr>119 <td class="c-fg">Model A</td>120 <td class="c-success">85.2%</td>121 </tr>122</table>123`;124125await render({126 outputPath: '/path/to/output.png',127 html,128 theme: 'tokyo-night', // optional, default129 width: 800, // optional, default130 scale: 2, // optional, default (2x DPI)131});132```133134Then run: `node /path/to/runner.mjs`135136## Tips137138- Keep it dense. CLI output is information-dense — that's the aesthetic.139- Use `.c-dim` for dashes and placeholder values (looks like `–` in terminals).140- Header row + dash separator row is the most CLI-authentic table pattern.141- Add a `// comment` footer with context (task count, date, methodology note).142- The `.cli-header` line at the top makes it feel like a real terminal. Use something like `$ cat file.txt` or `$ ./benchmark --results`.143- For non-table content (command output, logs), use `<pre>` blocks with `.c-*` classes on `<span>` elements inside.144- Width auto-adjusts to content height. Set `width` wide enough for your widest row.