Web Screenshot and JavaScript Execution

VerifiedCaution

Takes a screenshot of a web page or executes JavaScript against it using the websnap command. Useful for checking layout, verifying styling, inspecting rendered content, or querying page properties such as dimensions and scroll height. Supports configurable viewport size, full-page capture, and running custom JavaScript expressions.

Sby Skills Guide Bot
DevelopmentBeginner
6/2/2026
Claude Code
#screenshot#web-page#javascript#rendering#layout

Recommended for

Automated summary

Takes a screenshot of a web page or runs JavaScript against it, useful for checking layout or inspecting rendered content.

Strengths

  • Supports screenshots at custom viewport sizes and scroll offsets
  • Can execute arbitrary JavaScript on the target page
  • Full page capture with -f option
  • Clear output: PNG path for screenshots, direct JS result for -r

Limitations

  • Each call spawns a fresh browser with no persistent state (no cookies, localStorage)
  • Requires a Read tool to display the screenshot
  • No support for complex interactions (clicks, forms)
When to use it

Use websnap when you need to visually verify page rendering or extract page properties via JavaScript.

When not to use it

Avoid websnap if you need to interact with the page (navigation, forms) or require persistent session state.

Security analysis

Caution
Quality score85/100

The skill runs a shell command with arguments provided by the user or the agent. While it does not explicitly perform destructive actions, the use of Bash and passing unfiltered arguments to an external tool presents a risk of command injection or unintended behavior if the websnap command fails to sanitize inputs. The -r option allows execution of arbitrary JavaScript, which could be abused if the agent or user provides malicious scripts, though this is inherent to the tool's functionality.

Findings
  • •Uses Bash to execute a command with user-supplied arguments, which may be vulnerable to command injection if the websnap tool does not properly sanitize inputs.
How this analysis is made

Examples

Screenshot of a local page
/websnap http://localhost:1313/guide/
Custom viewport size
/websnap http://localhost:1313/ -w 1920 -h 1080
Run JavaScript to get page title
/websnap http://example.com -r 'document.title'

name: websnap description: Take a screenshot of a web page or run JavaScript against it. Use when checking page layout, verifying styling changes, inspecting rendered content, or querying page properties like dimensions. argument-hint: <url> [-w width] [-h height] [-y scroll] [-f] [-r js] allowed-tools: Bash, Read disable-model-invocation: true

Take a screenshot of the specified URL using websnap and display the result.

Steps

  1. Run: websnap $ARGUMENTS
  2. For screenshots: the command outputs the path to the saved PNG (in /tmp/), then use the Read tool to display the image
  3. For -r (run JS): the command outputs the JavaScript result directly (no screenshot)

Options

  • -w, --width <px> — Viewport width (default: 1280)
  • -h, --height <px> — Viewport height (default: 1080)
  • -x, --xoffset <px> — Horizontal scroll offset
  • -y, --yoffset <px> — Vertical scroll offset
  • -f, --full — Capture full page height (ignores -h)
  • -r, --run <js> — Run JavaScript and output result (no screenshot)

Examples

/websnap http://localhost:1313/guide/
/websnap http://localhost:1313/ -w 1920 -h 1080
/websnap http://localhost:1313/guide/ -y 500
/websnap http://localhost:1313/ -f
/websnap http://example.com -r 'document.title'
/websnap http://example.com -r 'document.documentElement.scrollHeight'

If no URL is provided, ask the user what page they want to screenshot.

Notes

Each call to websnap spawns a fresh browser instance. State does not persist between calls (no cookies, localStorage, or session data).

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/web-screenshot-and-javascript-execution-mm8o51kq/download' --output '.skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq/SKILL.md.part' && mv '.skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq/SKILL.md.part' '.skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash, Read

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq/SKILL.md' && test -s '.skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/websnap' && cp -R '.skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq' '.claude/skills/websnap'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq'

openskills read 'web-screenshot-and-javascript-execution-mm8o51kq'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/web-screenshot-and-javascript-execution-mm8o51kq/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills