About page-inspector
A skill that uses pinchtab to inspect a web page's layout and styles, capture screenshots, and write a report. It is intended for documenting a page across desktop and specified viewport widths, with authentication handling when needed.
Key features
- 01Navigate to a target page
- 02Handle authentication when credentials are available
- 03Capture desktop and viewport screenshots
- 04Inspect layout and computed styles
- 05Write a Markdown report
Use cases
- 01Document a page's responsive appearance
- 02Review layout containers and positioning
- 03Record typography, colors, and spacing
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ delexw/ claude-code-misc --skill page-inspectorAfter installing, type/page-inspectorin Claude Code to confirm it loaded.
Details
From the project READMEPage Inspector — Capture Current Page Layout & Styles
Uses Skill("pinchtab") for all browser interaction — navigation, screenshots, viewport emulation, and DOM inspection. Describe what you need and let pinchtab handle the details.
Inputs
Raw arguments: $ARGUMENTS
Infer from the arguments:
- TARGET_URL: the URL to inspect
- OUT_DIR: output directory, or
./page-inspector-outputif not provided
Execution
1. Navigate & Authenticate
- Navigate to TARGET_URL and take an interactive snapshot to confirm the page loaded.
- If the page requires authentication:
- Check the system prompt for any guidance on where to find credentials.
- Check environment variables — run
env | grep -iE 'USER|PASS|LOGIN|AUTH|TOKEN|CRED|SECRET|API_KEY' | sed 's/=.*/=***/'to list available credential env vars (mask values in output). - If credentials are found, fill the login form and submit, then re-snapshot.
- If none are found, use the
AskUserQuestiontool to ask where credentials can be found (skip this in autonomous mode). If credentials cannot be obtained, skip the entire skill and note: "Skipped — page requires authentication but no credentials found."
2. Capture Desktop Screenshot
- Take a screenshot and save to
OUT_DIR/screenshots/desktop.png - Ensure
mkdir -p OUT_DIR/screenshotsbefore writing files
3. Capture Key Viewport Screenshots
For each width (1440px, 1024px, 768px, 375px):
- Resize viewport to the target width
- Take a screenshot and save to
OUT_DIR/screenshots/{width}px.png
4. Inspect Layout Structure
Evaluate JavaScript that extracts:
- Key layout containers and their CSS display/position properties
- Flex/grid configurations on major layout elements
- Any fixed/sticky positioned elements
- Overall page structure (header, nav, main content, sidebar, footer)
5. Inspect Computed Styles
Evaluate JavaScript that captures for key UI elements:
- Font families, sizes, weights, line heights
- Colors (text, background, borders)
- Spacing (margins, paddings)
- Box sizing and dimensions
6. Write Output
Create OUT_DIR/mugshot.md with:
# Page Inspector Report: {url}
## Screenshots
- Desktop (current): `screenshots/desktop.png`
- 1440px: `screenshots/1440px.png`
- 1024px: `screenshots/1024px.png`
- 768px: `screenshots/768px.png`
- 375px: `screenshots/375px.png`
## Page Structure
{DOM structure overview — key containers and their roles}
## Layout Properties
{CSS display, grid/flex configs, positioning for key elements}
## Typography & Colors
{Font stacks, sizes, color palette observed}
## Spacing & Dimensions
{Key measurements observed}
## Notes
{Any observations relevant to upcoming changes}
Comments
Markdown supported