Configures and uses snipgrapher to generate polished code snippet images, including syntax-highlighted PNGs, SVGs, and WebP exports with custom themes, profiles, and styling options. Use when the user wants to create code screenshots, turn code into shareable images, generate pretty code snippets for docs or social posts, produce syntax-highlighted images from source files, or explicitly mentions snipgrapher. Supports single-file renders, batch jobs, watch mode, and reusable named profiles via the snipgrapher CLI or npx.
Use the snipgrapher skill to render one source file as a PNG using the no-config quick start. Replace the sample input file.ts and output output.png with the paths I provide. Verify that the output exists and has non-zero size before reporting success.
Required inputs
A readable, non-empty source file; file.ts is a sample path to replace.
A desired PNG output path; output.png is a sample path to replace.
An environment where npx is available to run snipgrapher.
Previously published starter task based on a pinned source version; check the source and required inputs before running. Task evidence ↗
SKILL.md
name: snipgrapherdescription: Configures and uses snipgrapher to generate polished code snippet images, including syntax-highlighted PNGs, SVGs, and WebP exports with custom themes, profiles, and styling options. Use when the user wants to create code screenshots, turn code into shareable images, generate pretty code snippets for docs or social posts, produce syntax-highlighted images from source files, or explicitly mentions snipgrapher. Supports single-file renders, batch jobs, watch mode, and reusable named profiles via the snipgrapher CLI or npx.metadata: tags: snipgrapher, snippets, images, svg, png, webp, cli
When to use
Use this skill when you need to:
Generate image snippets from source code
Configure reusable snippet rendering defaults
Batch-render snippet assets for docs, social posts, or changelogs
Use published snipgrapher from npm to generate snippet images
Quick start
Render a single file to a PNG immediately with no config required:
npx snipgrapher render file.ts -o output.png
For ongoing use, initialise a project config first, then render: