CtrlK
BlogDocsLog inGet started
Tessl Logo

simon/skills

Auto-generated tile from GitHub (10 skills)

92

1.16x
Quality

94%

Does it follow best practices?

Impact

92%

1.16x

Average score across 44 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-25/

Automating Changelog Snippet Images in CI

Problem/Feature Description

A platform team maintains a TypeScript monorepo and publishes a public changelog for every release. The changelog includes syntax-highlighted code snippet images showing the before-and-after of API changes. At the moment a developer manually runs render commands before each release — a process that is error-prone, inconsistent across machines, and blocks the release whenever that person is unavailable.

The team wants to automate this as a step in their existing CI pipeline (GitHub Actions). They have a folder of .ts snippet files that grows with each release and needs to be rendered in bulk. The CI environment doesn't have a global snipgrapher install, but it can install packages. The nightly builds should use a consistent house style enforced at the environment level, while a separate "preview" job should be able to produce a different visual style on demand without changing the shared config.

The team also needs the CI job to fail loudly if any rendered files end up empty or corrupt, rather than silently publishing broken images.

Output Specification

Produce a ci-render.sh shell script that automates the batch rendering workflow described above. The script should:

  • Accept an optional argument or environment variable that switches it between "nightly" mode (house style) and "preview" mode (alternate style)
  • Render all .ts files found in a snippets/ directory
  • Place rendered outputs in a rendered/ directory
  • Verify that the rendered outputs were produced successfully
  • Print the commands executed and the paths of the output files

Also produce a brief ci-render-readme.md documenting what environment variables the script respects and how to invoke the two modes.

Input Files

The following files are provided as inputs. Extract them before beginning.

=============== FILE: snippets/auth.ts =============== export async function authenticate(token: string): Promise<User> { const response = await fetch('/api/auth', { method: 'POST', headers: { Authorization: Bearer ${token} }, }); return response.json(); }

=============== FILE: snippets/logger.ts =============== import pino from 'pino';

export const logger = pino({ level: process.env.LOG_LEVEL ?? 'info', transport: { target: 'pino-pretty' }, });

evals

README.md

tile.json