Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计异常

screengrabsscreengrabs 搜索

Agent Skill

screengrabs 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

222

周安装

9

GitHub Stars

10

下载量

70
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:screengrabs(screengrabs 搜索)
来源仓库:https://github.com/inkeep/team-skills
仓库路径:skills/screengrabs
安装命令:
npx skills add https://github.com/inkeep/team-skills --skill screengrabs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/inkeep/team-skills --skill screengrabs

简介

screengrabs 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。
  • 具体用法请参考原始 README 和项目文档。

SKILL.md

Screengrabs

Capture, redact, annotate, and embed screenshots in GitHub PRs for UI changes.

When to use

  • Creating/updating PRs that touch frontend components, pages, or styles
  • User asks for screenshots, before/after comparisons, or PR body enrichment
  • Skip for backend-only, test-only, or non-visual changes

Prerequisites

These scripts require the following npm packages. Install them as dev dependencies in your project:

PackagePurposeInstall
playwrightBrowser automation for screenshot capturenpm add -D playwright
sharpImage annotation (labels, borders, stitching)npm add -D sharp
tsxTypeScript runner for scriptsnpm add -D tsx

After installing Playwright, download browser binaries: npx playwright install chromium

Create workflow tasks (first action)

Before starting any work, create a task for each step using TaskCreate with addBlockedBy to enforce ordering. Derive descriptions and completion criteria from each step's own workflow text.

  1. Screengrabs: Identify affected pages
  2. Screengrabs: Explore target pages (/browser)
  3. Screengrabs: Capture with pre-scripts
  4. Screengrabs: Verify captures and validate sensitive data
  5. Screengrabs: Annotate, upload, and embed in PR

Mark each task in_progress when starting and completed when its step's exit criteria are met. On re-entry, check TaskList first and resume from the first non-completed task.


Workflow

Most screenshots require understanding the target page before capture — what state it's in, what popups appear, what content needs to be visible. The default workflow is explore → capture → verify → iterate.

  1. Identify affected pages from the PR diff
  2. Explore target pages — visit each page with the browser to understand layout, state, and interaction needs before writing any capture logic
  3. Plan & write pre-scripts — based on what you observed, write pre-scripts for interaction needed before capture
  4. Capture screenshots — run scripts/capture.ts with --pre-script
  5. Verify captures — look at each captured image to confirm it shows what was expected
  6. Iterate if needed — if a capture is wrong (spinner, overlay, wrong state, missing content), adjust and re-capture
  7. Validate no sensitive data — run scripts/validate-sensitive.ts
  8. Annotate — run scripts/annotate.ts (labels, borders, side-by-side)
  9. Upload & embed — update PR body with images

Simple captures (no interaction needed): For static pages where goto + wait is sufficient, skip step 3 and omit --pre-script. Steps 2 (explore) and 5 (verify) still apply — always understand what you're capturing and confirm you got it right.


Step 1: Identify Affected Pages

Analyze the PR diff to determine which UI routes are impacted. Map changed component/page files to their corresponding URLs. If the diff only touches backend code, tests, or non-visual files, skip screenshot capture.


Step 2: Explore Target Pages

Before writing any pre-scripts or capture commands, visit each target page to understand what you're capturing. For quick page exploration, use agent-browser (agent-browser open <url>, agent-browser screenshot) — it's faster for simple navigation and screenshots. Load /browser skill (Playwright scripts) only when you need pre-script capture, batch routes, or masking in Steps 3-4.

What to observe

For each page, note:

  • Current layout and content — what's visible above the fold, key sections, data states
  • Popups and overlays — cookie banners, modals, onboarding tours, notification prompts
  • Loading behavior — spinners, skeleton screens, lazy-loaded content, how long until stable
  • Auth requirements — login walls, permission gates, session-dependent content
  • Dynamic state — tabs, accordions, expandable sections, content that requires interaction to reveal
  • What the PR changed — which specific elements or areas the screenshot needs to highlight

Decide what to capture

Based on exploration, decide:

  • Which view states each page needs (e.g., default tab vs. specific tab, collapsed vs. expanded)
  • Whether multiple captures per route are needed (e.g., before/after a user action)
  • What viewport and scroll position will frame the relevant change
  • What interaction is needed before each capture (popups to dismiss, elements to click, sections to scroll to)

Do not proceed to pre-script writing until you understand each page's behavior. Exploration often reveals interaction needs that aren't obvious from the diff alone (popups that appear on first visit, content behind tabs, lazy loading delays).


Step 3: Plan & Write Pre-Scripts

Load /browser skill for writing pre-scripts. A pre-script is a JS file that receives the Playwright page object and runs interaction before masking + screenshot. Use your findings from Step 2 to write targeted pre-scripts.

Pre-script contract

The file must export an async function that receives {page, url, route}:

// /tmp/pw-pre-dashboard.js
module.exports = async function({ page, url, route }) {
  // Dismiss cookie banner
  await page.click('button:has-text("Accept")').catch(() => {});

  // Click the "Analytics" tab
  await page.click('[data-tab="analytics"]');
  await page.waitForTimeout(500);
};

Common pre-script patterns

Dismiss popups / modals:

module.exports = async function({ page }) {
  // Cookie banner
  await page.click('button:has-text("Accept all")').catch(() => {});
  // Marketing popup
  await page.click('[data-testid="close-modal"]').catch(() => {});
};

Navigate through a login flow:

module.exports = async function({ page }) {
  await page.fill('input[name="email"]', 'test@example.com');
  await page.fill('input[name="password"]', 'password123');
  await page.click('button[type="submit"]');
  await page.waitForURL('**/dashboard');
};

Scroll to a specific section:

module.exports = async function({ page }) {
  await page.locator('#pricing-section').scrollIntoViewIfNeeded();
  await page.waitForTimeout(300);
};

Expand collapsed content:

module.exports = async function({ page }) {
  await page.click('button:has-text("Show more")');
  await page.waitForSelector('.expanded-content', { state: 'visible' });
};

One pre-script per route — if routes need different interaction, write separate scripts and run capture once per route. If all routes share the same interaction (e.g., dismiss the same cookie banner), one script covers all.


Step 4: Capture Screenshots

Environment setup

EnvironmentBase URLNotes
Local devhttp://localhost:3000 (or your dev server port)Start your dev server first
Preview deploymentYour preview URL (e.g., Vercel, Netlify, etc.)Available after PR push
Playwright serverConnect via --connect ws://localhost:3001See "Reusable server" below

Capture command

# With pre-script (default for most captures)
npx tsx scripts/capture.ts \
  --base-url http://localhost:3000 \
  --routes "/dashboard,/settings" \
  --pre-script /tmp/pw-pre-dashboard.js \
  --output-dir tmp/screengrabs

# Simple capture (no interaction needed)
npx tsx scripts/capture.ts \
  --base-url http://localhost:3000 \
  --routes "/landing,/about" \
  --output-dir tmp/screengrabs

# Preview deployment with pre-script
npx tsx scripts/capture.ts \
  --base-url https://your-preview-url.example.com \
  --routes "/dashboard" \
  --pre-script /tmp/pw-pre-dismiss-popups.js \
  --output-dir tmp/screengrabs

All capture options

OptionDefaultDescription
--base-url <url>*required*Target URL (local dev or preview)
--routes <paths>*required*Comma-separated route paths
--pre-script <path>JS file to run on page before capture (for interaction)
--output-dir <dir>tmp/screengrabsWhere to save PNGs and DOM text
--viewport <WxH>1280x800Browser viewport size
--connect <ws-url>Connect to existing Playwright server
--mask-selectors <s>Additional CSS selectors to blur
--wait <ms>2000Wait after page load before capture
--full-pagefalseCapture full scrollable page
--auth-cookie <value>Session cookie for authenticated pages

Reusable Playwright server

Start a server once, reuse across multiple captures:

# Terminal 1: start server
npx tsx scripts/capture.ts --serve --port 3001

# Terminal 2+: connect and capture
npx tsx scripts/capture.ts \
  --connect ws://localhost:3001 --base-url http://localhost:3000 \
  --routes "/..." --pre-script /tmp/pw-pre-script.js --output-dir tmp/screengrabs

Step 5: Verify Captures

Do not skip this step. After capturing, look at each screenshot to confirm it captured what you intended.

Verification checklist

For each captured image, read the PNG file and check:

  • Correct page/route — the screenshot shows the intended page, not a redirect, error page, or login wall
  • Expected content visible — the elements or sections that the PR changed are visible in the frame
  • Stable state — no spinners, skeleton loaders, or partially-rendered content
  • No unexpected overlays — cookie banners, modals, notification toasts, or tooltips aren't blocking the content
  • Proper framing — the viewport and scroll position highlight the relevant change (not cut off, not too zoomed out)
  • Redaction intact — sensitive data masking was applied correctly (passwords blurred, tokens replaced)

How to verify

Use the Read tool to view each captured PNG — it renders images visually. Compare what you see against what you observed during exploration (Step 2).

# Read the captured image to verify
Read tool → tmp/screengrabs/<route-name>.png

If all captures pass verification, proceed to Step 7 (validate sensitive data). If any capture is wrong, go to Step 6.


Step 6: Iterate (if verification fails)

When a capture doesn't match expectations, diagnose and re-capture. Do not upload incorrect screenshots.

Common issues and fixes

ProblemLikely causeFix
Spinner or skeleton visibleInsufficient wait timeIncrease --wait (e.g., --wait 5000) or add waitForSelector in pre-script
Cookie banner or modal blocking contentPre-script didn't dismiss itAdd dismiss logic to pre-script (.catch(() => {}) for optional popups)
Wrong tab or section visiblePre-script didn't navigate to correct stateUpdate pre-script to click the right tab/accordion/section
Login wall or auth errorMissing auth cookie or expired sessionUse --auth-cookie or add login flow to pre-script
Content cut off or wrong scroll positionDefault viewport insufficientAdjust --viewport, add scrollIntoViewIfNeeded() in pre-script, or use --full-page
Partially loaded images or assetsNetwork still loadingAdd waitForLoadState('networkidle') in pre-script after interaction

Iteration process

  1. Identify which captures failed verification and why
  2. Adjust the pre-script, capture parameters, or both
  3. Re-run scripts/capture.ts for the affected routes only
  4. Re-verify (Step 5) — read the new images and confirm they're correct
  5. Repeat if needed — maximum 3 iterations per route before stopping to reassess the approach

When to stop iterating

  • After 3 failed attempts for the same route, reconsider whether the page is in a capturable state (is the dev server running correctly? is the feature complete?)
  • If the issue is environmental (server not running, deployment not ready), fix the environment rather than adjusting capture parameters

Step 7: Validate Sensitive Data

Always run before uploading to GitHub.

npx tsx scripts/validate-sensitive.ts \
  --dir ./screengrabs

The script checks .dom-text.txt files (saved by capture) for:

  • API keys (sk-, sk-ant-, AKIA, sk_live_)
  • Tokens (Bearer, JWT, GitHub PATs)
  • PEM private keys
  • Connection strings with credentials

Exit code 1 = sensitive data found. Re-capture with additional --mask-selectors or fix the source before proceeding.

Pre-capture masking (automatic)

The capture script automatically masks these before taking screenshots:

Selector / PatternWhat it catches
input[type="password"]Password fields
Text matching sk-, Bearer, eyJ, ghp_, PEM headersIn-page tokens/keys

Add more with --mask-selectors "selector1,selector2".


Step 8: Annotate Images

# Add "Before" label with red border
npx tsx scripts/annotate.ts \
  --input before.png --label "Before" --border "#ef4444" --output before-labeled.png

# Add "After" label with green border
npx tsx scripts/annotate.ts \
  --input after.png --label "After" --border "#22c55e" --output after-labeled.png

# Side-by-side comparison
npx tsx scripts/annotate.ts \
  --stitch before.png after.png --labels "Before,After" --output comparison.png

Step 9: Upload & Embed in PR

Images in PR markdown need permanent URLs.

Primary: Bunny Edge Storage via /media-upload skill (programmatic, permanent CDN URLs):

Load the /media-upload skill, then use uploadToBunnyStorage():

const result = await uploadToBunnyStorage(
  './tmp/screengrabs/dashboard-labeled.png',
  `pr-${prNumber}/dashboard-before.png`
);
// result.url → "https://{cdn-hostname}/pr-123/dashboard-before.png" (permanent)

Requires BUNNY_STORAGE_API_KEY, BUNNY_STORAGE_ZONE_NAME, BUNNY_STORAGE_HOSTNAME env vars. Setup: ./secrets/setup.sh --skill media-upload.

Fallback: GitHub drag-and-drop — drag images into the PR description editor on GitHub. GitHub generates permanent CDN URLs automatically.

Update PR body

gh pr edit {pr-number} --body "$(cat pr-body.md)"

PR body templates

Use the templates in references/pr-templates.md for consistent formatting. Include:

  1. Visual Changes section with before/after screenshots
  2. Test URLs section with links to preview deployment pages
  3. Summary of what changed and why

Additional Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36%
按下载量换算25

Claude

32.34%
按下载量换算23

Cursor

18.73%
按下载量换算13

Gemini CLI

9.77%
按下载量换算7

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills