一键导入
exporting-to-png
Export code, terminal output, diagrams, or UI components to PNG images using headless browser rendering or CLI tools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Export code, terminal output, diagrams, or UI components to PNG images using headless browser rendering or CLI tools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use Cursor's browser aria snapshots to audit a page for accessibility issues — missing labels, broken tab order, contrast, and ARIA misuse.
Add PostHog analytics to a web application, including event tracking, page views, feature flags, and session replay.
Generate OpenAPI/Swagger documentation for an API, including endpoint schemas, request/response types, and interactive docs UI.
Add authentication to a web application using NextAuth.js (Auth.js), including OAuth providers, session management, and protected routes.
Dockerize an application with a production-ready Dockerfile, docker-compose setup, and .dockerignore.
Set up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.
| name | exporting-to-png |
| description | Export code, terminal output, diagrams, or UI components to PNG images using headless browser rendering or CLI tools. |
| user-invocable | true |
Convert code snippets, Markdown content, terminal output, diagrams, or rendered UI components into PNG image files.
The most flexible approach. Render any content as HTML and screenshot it.
# Using Playwright (if available)
npx playwright screenshot --full-page "file:///path/to/content.html" output.png
# Using Puppeteer one-liner
node -e "
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setContent(\`<html>...</html>\`);
await page.screenshot({ path: 'output.png', fullPage: true });
await browser.close();
})();
"
Steps:
For styled code screenshots:
# silicon (Rust CLI, fast)
silicon --language python --output code.png source.py
silicon --from-clipboard --output code.png
# Or generate a Carbon URL for browser capture
# https://carbon.now.sh/?l=python&code=<url-encoded-code>
# Using mermaid-cli
npx @mermaid-js/mermaid-cli mmdc -i diagram.mmd -o diagram.png -b transparent
# Or with Docker
docker run --rm -v "$(pwd)":/data minlag/mermaid-cli mmdc -i /data/diagram.mmd -o /data/diagram.png
# Using sharp (Node.js)
node -e "
const sharp = require('sharp');
sharp('input.svg').png().toFile('output.png');
"
# Using Inkscape CLI
inkscape input.svg --export-type=png --export-filename=output.png
# Using ImageMagick
convert input.svg output.png
# Using termshot (if installed)
termshot -- ls -la
# Manual approach: capture output, wrap in HTML with monospace font, screenshot
which silicon, npx --help, etc.)file output.png && ls -la output.pngdeviceScaleFactor: 2 in Playwright/Puppeteer for retina-quality output--background transparent or omitBackground: true