/mph-kit:mph-figurefrom mph-kit
Renders markdown or HTML as a pixel-accurate PNG image using Playwright, ideal for embedding tables and styled content into Substack posts or documents.
Ships in mph-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turns markdown (or raw HTML) into a pixel-accurate image: it renders the content in a real browser via Playwright and screenshots it. Because a browser does the layout, the output has full CSS fidelity — real fonts, text wrapping, column alignment, the lot. More accurate than SVG-shortcut generators, which only support a subset of CSS.
Built mainly for one job: Substack cannot render markdown tables. The
mph-substack-writer skill mandates "generate an image instead." This skill is how you
generate it.
This skill bundles a script with dependencies. Run once:
cd ~/.claude/skills/mph-figure
npm install
npx playwright install chromium # skip if Playwright's browser is already installed
Write the figure as markdown (a normal markdown table works; column alignment
with :---: is respected) and save it to a file, e.g. figure.md.
Render it:
node ~/.claude/skills/mph-figure/scripts/render.mjs --in figure.md --out figure.png
Inline the result in the post: .
Need full control of the markup? Pass a .html file (or add --html) instead.
--in <file> markdown or HTML input (required)--out <file> output PNG (required)--width <px> figure width, default 720 (a good Substack inline width)--scale <n> sharpness / device scale, default 2 (retina-crisp)--theme <name> visual theme, default bloomberg--html treat the input as raw HTML regardless of extensionbloomberg — a dark, sharp, data-first look: near-black card, amber accents, clean
tables with uppercase headers and tabular numerals. This is the "dark theme, Bloomberg
aesthetic" mph-substack-writer asks for. Add more themes to the THEMES map in
scripts/render.mjs.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub mphinance/alpha-skills --plugin mph-kit28 skills in this plugin
/blog-postA long-form article / blog post — masthead, hero image placeholder,
article body with figures and pull quotes, author byline, related posts.
Use when the brief asks for "blog", "article", "post", "essay", or
"case study".
/cavemanUltra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman.
/critiqueRun a 5-dimension expert design review on any HTML artifact in the
project — Philosophy / Visual hierarchy / Detail / Functionality /
Innovation, each scored 0–10. Outputs a single self-contained HTML
report with a radar chart, evidence-backed scores, and three lists:
Keep / Fix / Quick-wins. Use when the brief asks for a "design
review", "design critique", "5 维度评审", "design audit", or "what's
wrong with my design".
/dashboardAdmin / analytics dashboard in a single HTML file. Fixed left sidebar,
top bar with user/search, main grid of KPI cards and one or two charts.
Use when the brief asks for a "dashboard", "admin", "analytics", or
"control panel" screen.
/design-an-interfaceGenerate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice"./design-briefParse a structured design brief written in I-Lang protocol format into a
concrete design spec. Eliminates ambiguity from vague requests like
"make it professional" by requiring explicit dimensions: palette, typography,
layout, mood, density, and constraints.
Trigger keywords: "design brief", "create a design brief", "ilang brief", "structured brief".
Other plugins' skills for the same job