generate-release-screenshots
Installation
SKILL.md
Skill Instructions
Purpose
Provide clear, actionable guidance for generating actual PNG screenshot files for release notes and documentation, preventing common mistakes like creating markdown links to source files or referencing non-existent images.
Hard Rules
Must
- Install Playwright before generating screenshots: Build the ScreenshotGenerator project (
dotnet build src/tools/Oocx.TfPlan2Md.ScreenshotGenerator/), then install the browser viapwsh src/tools/Oocx.TfPlan2Md.ScreenshotGenerator/bin/Debug/net10.0/playwright.ps1 install chromium --with-deps. Do NOT usenpx playwright install— the npm version differs from the .NET package version. - Generate actual PNG files, NOT markdown links to source files or empty image references.
- Use
scripts/generate-release-screenshots.shfor release note screenshots (includes retry logic and error reporting). - Use
scripts/generate-screenshot.shfor individual screenshots with full control (light/dark themes, DPI, crops). - Verify generated PNG files exist at expected paths before adding markdown references.
- Verify screenshots show the intended content (not blank pages or errors) — visually inspect each screenshot.
- Use focused, small screenshots for release notes: max 580×400 pixels.
- Use only
*-crop*.pngfiles in release notes, or generate single screenshots using the release wrapper. - Use absolute
raw.githubusercontent.comURLs in release notes — relative paths like./image.pngdo NOT work in GitHub Release pages. Use format:https://raw.githubusercontent.com/oocx/tfplan2md/v{VERSION}/docs/{path}/image.pngwhere{VERSION}is the release tag. - Choose selectors that capture the visual change: Match the selector to what the feature/fix actually changes (see Selector Guide below).
- Generate the report with
--details openso resource details blocks are expanded in screenshots — unless you specifically want to capture a collapsed resource.