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.

rulessetup-and-configuration.md

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

Goal

Set up snipgrapher so snippet rendering is deterministic and easy to repeat.

1) Pick an executable strategy

Use one of these:

  1. Binary available in PATH: snipgrapher
  2. npm package without global install:
npx --yes snipgrapher doctor

2) Initialize configuration

Create a baseline config in the current project:

snipgrapher init

Supported config filenames (first match wins):

  • snipgrapher.config.json
  • snipgrapher.config.yaml
  • snipgrapher.config.yml
  • snipgrapher.config.toml

3) Define reusable defaults and profiles

Use a config structure like:

{
  "theme": "nord",
  "fontFamily": "Fira Code",
  "fontSize": 14,
  "padding": 32,
  "lineNumbers": true,
  "windowControls": true,
  "shadow": true,
  "backgroundStyle": "gradient",
  "format": "svg",
  "defaultProfile": "default",
  "profiles": {
    "default": {},
    "social": {
      "padding": 48,
      "fontSize": 16,
      "watermark": "@your-handle"
    }
  }
}

4) Validate environment and config

Run:

snipgrapher doctor
snipgrapher themes list

Fix validation errors before rendering.

5) Understand precedence for overrides

Rendering values resolve as:

CLI flags > environment variables > config file > defaults

Useful env vars include:

  • SNIPGRAPHER_PROFILE
  • SNIPGRAPHER_THEME
  • SNIPGRAPHER_FORMAT
  • SNIPGRAPHER_FONT_SIZE
  • SNIPGRAPHER_PADDING
  • SNIPGRAPHER_LINE_NUMBERS

Use env vars for CI-wide defaults, and CLI flags for one-off overrides.

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