Webpage A4 Screenshot
Use when the user asks to screenshot a webpage, article, document page, Zhihu article, product page, or web content as images.
Default standard for 史老师:
- Capture only the main/body content area, not unrelated left/right sidebars, navigation, floating buttons, comments, or ads.
- Output clear large images, approximately A4 portrait.
- Prefer width
2480pxoutput using CSS width1240and device scale factor2. - Do not cut text lines or images in the middle when avoidable.
- If an A4-height cut would split a paragraph, heading, list, table, or image, move the cut up/down to the nearest content-block boundary.
- Adjacent screenshots must have zero repeated content: next image starts exactly where previous image ended.
- Variable page heights are acceptable when needed to preserve content integrity.
- Verify zero overlap before sending.
Workflow
- Use the helper script:
node skills/webpage-a4-screenshot/scripts/capture-a4-content.js '<URL>' /tmp/webpage-a4-capture
- Check the summary:
overlapCheckmust betrue.pagesshould be plausible for the article length.- Output files are listed in
files.
-
Send images with
messageas attachments. -
If result is wrong:
- Too much chrome/sidebar: add or adjust content selectors in the script.
- Text/image still split: increase/decrease
targetH,minH, or refineselectorboundaries. - Duplicate content: do not add bottom padding to clips; keep
start = previous cutexactly.
Current helper behavior
The script:
- Opens Chromium headless through CDP.
- Loads and scrolls the page to trigger lazy content.
- Extracts a likely main article/content node.
- Re-renders content into a clean white article page.
- Computes cut points using block bottoms.
- Captures variable-height A4-like PNGs.
- Writes
manifest.jsonwith cut ranges and an overlap check.
Messaging note
For Weixin, send local files using absolute paths. Do not use relative paths.