mit einem Klick
take-doc-screenshots
// Take screenshots of the running pgconsole app for documentation. Use when updating docs with screenshots or adding images to .mdx files.
// Take screenshots of the running pgconsole app for documentation. Use when updating docs with screenshots or adding images to .mdx files.
Use when writing a blog post for the pgconsole website. Covers file location, frontmatter, structure, length, and writing style conventions.
Perform a refactor pass focused on simplicity after recent changes. Use when the user asks for a refactor/cleanup pass, simplification, or dead-code removal and expects build/tests to verify behavior.
| name | take-doc-screenshots |
| description | Take screenshots of the running pgconsole app for documentation. Use when updating docs with screenshots or adding images to .mdx files. |
| disable-model-invocation | false |
| argument-hint | ["page-or-feature"] |
Capture screenshots of the running pgconsole app at http://localhost:5173 for use in documentation.
pnpm dev)shot-scraper must be installed (pipx install shot-scraper && shot-scraper install)cwebp must be installed (brew install webp)Login credentials are in pgconsole.toml under [[users]]. Use the first user entry.
pgconsole.toml to find the email and password from the first [[users]] entrycurl -s -c cookies.txt -X POST http://localhost:5173/api/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"<email>","password":"<password>"}'
pgconsole_token cookie value from cookies.txt{
"cookies": [{
"name": "pgconsole_token",
"value": "<token>",
"domain": "localhost",
"path": "/",
"httpOnly": true,
"secure": false,
"sameSite": "Lax"
}],
"origins": []
}
Write a Playwright script (.mjs file in the scratchpad directory) that:
viewport: { width: 1440, height: 900 } (no deviceScaleFactor — use 1x)context.addCookies()http://localhost:5173The SQL editor uses CodeMirror 6. To type into it:
.cm-content to focuspage.keyboard.type('SQL here', { delay: 5 }) to typepage.keyboard.press('Control+Space') for autocompletepage.keyboard.press('Meta+a') to select all before replacing contentcmView from the DOM — it's not exposedKey buttons to interact with:
button with text SQL — opens a new query tabbutton with text Run — executes the querybutton with text Format — opens format dropdownbutton with text Quick SQL — opens quick SQL dropdownbutton with text Processes — opens processes modal.cm-content for context menuAfter capturing dropdown/modal screenshots, always dismiss with:
await page.keyboard.press('Escape');
await page.waitForTimeout(500);
An open overlay blocks clicks on other elements.
cwebp -q 90 input.png -o output.webpdocs/images/features/<feature-name>/ (matching docs/features/<feature-name>.mdx).webp), quality 90docs/images/ mirroring the docs/ structure<feature>-<description>.webp (e.g., sql-editor-autocomplete.webp)