Full Page Screenshot skill for Claude

Use when asked for a full-page or long screenshot of a web page. Captures SPA scroll containers, lazy images and very tall pages through Chrome DevTools Protocol with no extra dependencies.

Full Page Screenshot SKILL.md

The full skill file from alirezarezvani/claude-skills (MIT).

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

How to install Full Page Screenshot

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit alirezarezvani/claude-skills/engineering/skills/full-page-screenshot#main ~/.claude/skills/full-page-screenshot

Codex

npx degit alirezarezvani/claude-skills/engineering/skills/full-page-screenshot#main ~/.codex/skills/full-page-screenshot

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Full Page Screenshot skill do?

Use when asked for a full-page or long screenshot of a web page. Captures SPA scroll containers, lazy images and very tall pages through Chrome DevTools Protocol with no extra dependencies.

+How do I install Full Page Screenshot in Claude Code?

Copy the skill folder into ~/.claude/skills/full-page-screenshot, for example with "npx degit alirezarezvani/claude-skills/engineering/skills/full-page-screenshot#main ~/.claude/skills/full-page-screenshot". Claude Code loads it automatically and uses it when a task matches.

+Does Full Page Screenshot work with ChatGPT or Codex?

Yes. Full Page Screenshot uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/full-page-screenshot. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Full Page Screenshot free?

Full Page Screenshot is published on GitHub by alirezarezvani under the MIT license, which allows free use.

Related software development skills

  1. Code Review

    Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's…

    mattpocock/skills★ 327k
  2. Using Agent Skills

    Discovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of…

    addyosmani/agent-skills★ 119k
  3. Build

    Fully automate a coding task with make-plan, do, and babysit.

    thedotmack/claude-mem★ 118k
  4. Git Worktree Manager

    Use when running several branches or agents in parallel on one repo.

    alirezarezvani/claude-skills★ 30k
  5. Hivemind

    Use when delegating grunt work to free opencode workers instead of spending Claude tokens: one worker or a scout, coder and tester swarm in…

    alirezarezvani/claude-skills★ 30k
  6. Hub Run

    Use for /hub-run, or to run a whole AgentHub competition end to end: init, baseline, spawn, eval and merge.

    alirezarezvani/claude-skills★ 30k
  7. Hub Status

    Use for /hub-status, or to check AgentHub agent progress, branches and DAG state.

    alirezarezvani/claude-skills★ 30k
  8. Interview Mapper

    Use when coding or making sense of one interview transcript (customer, JTBD, expert, usability, exit).

    alirezarezvani/claude-skills★ 30k
  9. Karpathy Coder

    Check a diff for overbuilt code: hidden assumptions, needless abstraction, non-surgical changes, unverified goals (Karpathy's four…

    alirezarezvani/claude-skills★ 30k

See all software development skills →

More skills from alirezarezvani

  1. Gc Review

    Use for /c-level-agents:gc-review, or to challenge a term sheet, customer MSA, IP assignment or regulatory exposure before signing.

    alirezarezvani/claude-skills★ 30k
  2. Gcp Cloud Architect

    Design, deploy and cut the cost of Google Cloud setups: Cloud Run, GKE, Functions, Cloud SQL, BigQuery, moving to GCP.

    alirezarezvani/claude-skills★ 30k
  3. Gdpr Audit Prep

    Use for /compliance-os:gdpr-audit-prep, or before a GDPR review, post-breach audit or DPA investigation.

    alirezarezvani/claude-skills★ 30k

All skills by alirezarezvani →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.