New to Claude Skills? Learn how to install them →

alirezarezvani on GitHub

Full Page Screenshot

Free

Capture complete web pages as PNG images effortlessly.

Get this skill

Free · Opens the source repo

What Full Page Screenshot does

The Full Page Screenshot skill enables users to capture comprehensive screenshots of web pages using the Chrome DevTools Protocol. This tool is particularly useful for developers and designers who need to document web pages in their entirety, including content that requires scrolling to view. It operates without any external dependencies other than Node.js 22+ and a Chrome browser with remote debugging enabled, making it a lightweight solution for full-page captures.

This skill offers two primary methods for capturing screenshots. The first option allows users to take a screenshot of an already-open tab, which is ideal for pages that require authentication. Users can list available tabs, identify the target by its title or URL, and execute the capture command. The second option opens a background tab to capture a URL directly, which is useful for quick screenshots but may not work for pages behind login walls. The flexibility in capturing methods caters to different use cases, ensuring that users can document web content efficiently.

Key features include the ability to handle single-page applications (SPAs) effectively by detecting scroll containers and triggering lazy-loaded images. The skill also includes mechanisms for ensuring that the DOM is stable before capturing, which is critical for SPAs that dynamically render content. For very tall pages, the skill can capture in tiles and stitch them together, accommodating pages that exceed typical height limits. This makes it a robust tool for web developers and QA testers who need accurate visual representations of web pages.

Overall, the Full Page Screenshot skill is an essential addition for anyone involved in web development or design, providing a straightforward way to capture entire web pages with minimal setup and maximum reliability.

When to use it

Use this skill when you need to capture full-page screenshots of web pages, especially for documentation or testing purposes.

When not to use it

Avoid using this skill for pages that do not require scrolling or for simple screenshots where a standard capture would suffice.

What you can build with it

Documenting a Web Application

Use this skill to capture full-page screenshots of your web application for documentation or reporting purposes.

Testing Responsive Designs

Capture screenshots at different viewport widths to test and verify responsive design implementations.

Creating Visual Content for Presentations

Generate complete screenshots of web pages to include in design presentations or client reports.

How to install Full Page Screenshot

View source

1. Install with the skills CLI

npx skills add alirezarezvani/claude-skills/full-page-screenshot --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by alirezarezvani

Full Page Screenshot

Capture a full-page screenshot of any web page via Chrome DevTools Protocol. Produces a single PNG that includes all content — even portions that require scrolling. Zero external dependencies beyond Node.js 22+ and Chrome with remote debugging enabled.

Prerequisites

  • Node.js 22+ (uses built-in WebSocket)
  • Chrome/Chromium with remote debugging enabled

Check environment readiness:

node "${SKILL_DIR}/scripts/full-page-screenshot.mjs" --check

If Chrome check fails, instruct user to open chrome://inspect/#remote-debugging and enable "Allow remote debugging for this browser instance".

Workflow

Option A: Screenshot an already-open tab (recommended for authenticated pages)

  1. List available tabs:
node "${SKILL_DIR}/scripts/full-page-screenshot.mjs" --list
  1. Identify the target by title/URL, then capture:
node "${SKILL_DIR}/scripts/full-page-screenshot.mjs" <targetId> /tmp/screenshot.png --width 1200 --dpr 1

Option B: Screenshot a URL (opens a background tab, captures, closes)

node "${SKILL_DIR}/scripts/full-page-screenshot.mjs" --url "https://example.com" /tmp/screenshot.png --width 1200 --dpr 1 --wait 15000

Note: --url mode creates a background tab. Pages requiring authentication (SSO, login walls) should use Option A instead.

Parameters

ParameterDescriptionDefault
outputOutput PNG file path/tmp/screenshot.png
--widthViewport width in CSS pixels (articles: 1200, dashboards: 1440-1920)1200
--dprDevice pixel ratio (2 = Retina, but 4x file size)1
--waitPage load timeout in ms (--url mode only)15000
--cssCustom CSS to inject before capture (e.g., hide elements)

Verify Output

# macOS
sips -g pixelWidth -g pixelHeight /tmp/screenshot.png

# Linux
file /tmp/screenshot.png

Core Capabilities

  1. SPA scroll container expansion — Detects overflow-y: auto/scroll containers, scrolls through them to trigger lazy-loading, then removes overflow constraints (including Tailwind h-[calc(...)]) so all content renders in a single pass.

  2. DOM stability detection — After readyState=complete, monitors DOM element count until it stabilizes. This ensures SPA frameworks finish rendering dynamic content.

  3. Lazy-load triggering — Scrolls the viewport incrementally to fire IntersectionObserver callbacks, then waits for all <img> elements to complete loading.

  4. Tiled capture for very tall pages — Pages exceeding 16,000px are captured in 8,000px tiles and automatically stitched using Python PIL. Falls back to saving tiles separately if PIL is unavailable.

  5. Auto-discovery of Chrome — Reads DevToolsActivePort file to find the debugging port. Falls back to probing ports 9222, 9229, 9333.

  6. CDP Proxy fallback — When a CDP proxy holds the browser WebSocket, the script falls back to proxy API endpoints (/eval, /screenshot, /scroll) for capture.

How It Works

1. Discover Chrome debugging port
2. Connect via WebSocket (CDP)
3. Attach to target / create background tab
4. Set viewport width via Emulation domain
5. Wait: readyState + DOM stability
6. Detect & expand scroll containers
7. Scroll through page (trigger lazy-load)
8. Wait for images to complete
9. Measure final content height
10. Page.captureScreenshot (or tiled capture)
11. Stitch tiles if needed (PIL)
12. Restore viewport, detach, clean up

Anti-Patterns

Do NOTDo instead
Use --dpr 2 on pages > 10,000px tallUse --dpr 1 to avoid Chrome memory issues
Use --url for authenticated/SSO pagesUse --list + targetId on a tab where user is logged in
Set --wait below 5000 for SPAsSPAs need time to fetch data and render; use 10000-15000
Capture without checking --check firstAlways verify Chrome debugging is available
Hardcode viewport widths for all pagesUse 1200 for articles, 1440+ for dashboards/tables
Skip output verificationAlways verify with sips or file command after capture

Troubleshooting

SymptomCauseFix
"Cannot find Chrome debugging port"Remote debugging not enabledOpen chrome://inspect/#remote-debugging, enable it
"WebSocket connection timeout"CDP proxy holding the connectionScript auto-falls back to proxy API
Blank/white screenshotPage not loaded yetIncrease --wait value
Truncated at bottomScroll container not expandedScript handles this automatically; file an issue if it persists
Out of memoryVery tall page + high DPRReduce --dpr to 1 and/or reduce --width
"PIL not available for stitching"Python Pillow not installedInstall with pip3 install Pillow or accept separate tile files

Cross-References

Frequently asked questions about Full Page Screenshot

Similar skills