Index of every page on this site: llms.txt
All skills
mcollina avatar

/snipgrapher

@c75d70d
by Matteo Collinamcollina/skills2k stars
146
Run it yourself

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 this Skill: https://skilld.dev/gh/mcollina/skills/snipgrapher

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

rulesrendering-workflows.md

≈446 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Single-file rendering

Basic SVG output:

snipgrapher render ./example.ts -o snippet.svg

Generate PNG or WebP:

snipgrapher render ./example.ts --format png -o snippet.png
snipgrapher render ./example.ts --format webp -o snippet.webp

Styling overrides:

snipgrapher render ./example.ts --background-style gradient --window-controls --shadow
snipgrapher render ./example.ts --watermark "snipgrapher" --language typescript

Profile-based rendering:

snipgrapher render ./example.ts --profile social -o snippet-social.svg

Stdin and piping

From stdin:

cat ./example.ts | snipgrapher render --stdin -o snippet.svg

Or rely on auto-stdin detection:

cat ./example.ts | snipgrapher render -o snippet.svg

When --output is omitted and stdout is redirected, image bytes are written to stdout.

Batch rendering

Render many files with glob patterns:

snipgrapher batch "./snippets/**/*.ts" --out-dir rendered --concurrency 6
snipgrapher batch "./snippets/**/*.ts" --json --manifest rendered/manifest.json

Watch mode

Regenerate on file change:

snipgrapher watch ./example.ts -o snippet.svg --profile social

Assistant behavior guidelines

When asked to generate snippet images:

  1. Ensure configuration exists (create/update snipgrapher.config.* first).
  2. Use explicit output paths and file extensions.
  3. Prefer named profiles for repeatability.
  4. Return the exact command(s) run and the output file paths created.
  5. If snipgrapher is unavailable, fall back to npm (npx --yes snipgrapher ...).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo4 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    Configures and uses the snipgrapher CLI to generate syntax-highlighted code images from source files. The skill uses standard npm execution patterns and shell commands to manage configurations and rendering workflows.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer8mo

    2/4 files flagged

Signed by skilld at c75d70d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Activeupdated 9 months ago
metadata
{
  "tags": "snipgrapher, snippets, images, svg, png, webp, cli"
}

README badge

README badge for mcollina/skills/snipgrapher