CtrlK
BlogDocsLog inGet started
Tessl Logo

mcollina/snipgrapher

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.

88

1.38x
Quality

95%

Does it follow best practices?

Impact

79%

1.38x

Average score across 5 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-4/

Onboarding Script for Snippet Generation on a New Developer Machine

Problem/Feature Description

A developer advocate at an open-source project is writing an onboarding guide to help new contributors generate polished code snippet images for blog posts and social media. Crucially, contributors will be working on machines where snipgrapher may or may not be globally installed — some use it regularly and already have it, others are setting it up for the first time. The script needs to work in both cases without requiring contributors to install anything globally.

The guide also needs to be a complete, runnable example: when a contributor follows it, they should end up with an actual image file, and the guide itself should record exactly what commands were run so contributors can troubleshoot if something goes wrong.

Write a shell script onboard.sh that:

  1. Sets up snipgrapher for the project (assuming it may not be globally installed)
  2. Renders the provided code sample to produce a snippet image
  3. Produces a log file run-commands.txt that records the exact commands that were run and the output file path(s) created

Input Files

The following file is provided as input. Extract it before beginning.

=============== FILE: inputs/sample.py =============== from dataclasses import dataclass, field from typing import List, Optional import uuid

@dataclass class Order: id: str = field(default_factory=lambda: str(uuid.uuid4())) items: List[str] = field(default_factory=list) total: float = 0.0 coupon: Optional[str] = None

def add_item(self, name: str, price: float) -> None:
    self.items.append(name)
    self.total += price

def apply_coupon(self, code: str, discount: float) -> None:
    if self.coupon is not None:
        raise ValueError("A coupon has already been applied")
    self.coupon = code
    self.total = max(0.0, self.total - discount)

evals

SKILL.md

tile.json