Auto-generated tile from GitHub (10 skills)
92
94%
Does it follow best practices?
Impact
92%
1.16xAverage score across 44 eval scenarios
Advisory
Suggest reviewing before use
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.
Produce a ci-render.sh shell script that automates the batch rendering workflow described above. The script should:
.ts files found in a snippets/ directoryrendered/ directoryAlso produce a brief ci-render-readme.md documenting what environment variables the script respects and how to invoke the two modes.
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
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
scenario-42
scenario-43
scenario-44
skills
documentation
fastify
init
linting-neostandard-eslint9
node
nodejs-core
rules
oauth
octocat
snipgrapher