Token导航 LogoToken导航

Agent Skill · 开发

localhost-screenshots(本地主机截图)

localhost-screenshots 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

localhost-screenshots 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在开发类的 21,746 个 Skill 里排第 16,391。

总安装 509周安装 21GitHub Stars 公开资料未说明下载 166核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/t4sh/skills4sh --skill localhost-screenshots

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

localhost-screenshots 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合整理项目状态和变更事项。适用于围绕仓库状态、代码变更或协作事项进行信息梳理的场景。通过安装命令添加到宿主环境后,可结合原始 README 核验具体用法。

安装前需确认权限范围、维护状态,避免触发联网或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/localhost-screenshots

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/t4sh/skills4sh --skill localhost-screenshots;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

localhost-screenshots 怎么安装?

在终端执行 npx skills add https://github.com/t4sh/skills4sh --skill localhost-screenshots。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

localhost-screenshots 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

localhost-screenshots 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

localhost-screenshots 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

localhost-screenshots 用的人多吗?

公开数据是累计安装 509 次,近一周安装 21 次,下载 166 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

localhost-screenshots 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
localhost-screenshots

本地主机截图 · 本页

509—接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Localhost Screenshots

Installation

npx skills add t4sh/skills4sh --skill localhost-screenshots

This skill captures screenshots of locally running websites. It supports two primary approaches depending on the task:

  • Chrome MCP — for quick debugging, single screenshots, and interactive verification
  • Playwright — for systematic multi-breakpoint screenshot sets and visual regression

For niche scenarios (CDP attach, persistent sessions, AI snapshots, CI workflows), see the Reference Files section.

Tool Decision Matrix — Read This First

NeedToolWhy
Quick visual check / debugChrome MCPAlready connected to user's real browser, sees localhost
Verify a JS fixChrome MCPExecute JS in live page context
One or two screenshotsChrome MCPInstant, no setup
Interactive debuggingChrome MCPClick, fill, inspect state in real browser
Systematic multi-breakpoint setPlaywrightAutomated viewport resizing across 8 breakpoints
Before/after comparisonPlaywrightStructured comparison HTML output
Visual regression testingPlaywrightRepeatable, scriptable, consistent

Chrome MCP — Quick Screenshots & Debugging

Use a Chrome-connected MCP for one or two screenshots or interactive debugging. It drives the user’s real browser, which can already reach their localhost dev server. No Playwright install required.

MCP tool names (map to the host's server)

Identifiers differ by host. Map capabilities to the host server's actual tools:

StepCapabilityClaude Chrome MCP (example)Cursor cursor-ide-browser
TabCreate or select tab…tabs_context_mcp({createIfEmpty: true})browser_tabs (per server docs)
NavigateOpen URL…navigate({url})browser_navigate
ScreenshotCapture viewport…computer({action: "screenshot"})browser_take_screenshot
ResizeViewport / window…resize_window({width, height})Resize tools if available, or devtools
Run JSEvaluate in page…javascript_tool({action: "javascript_exec", text})Follow the server's evaluate / snapshot workflow

Follow the MCP server's lock/snapshot rules (e.g. Cursor: snapshot before structural changes).

Prerequisites

The user's dev server must be running (e.g., npx @11ty/eleventy --serve --port=3000).

Quick screenshot flow (pattern)

  1. Ensure a browser tab (create if empty).
  2. Navigate to http://localhost:<port>/<path>.
  3. Take a viewport screenshot.
  4. Optionally resize, then screenshot again.

Example: Claude Chrome MCP

mcp__Claude_in_Chrome__tabs_context_mcp({ createIfEmpty: true })
mcp__Claude_in_Chrome__navigate({ url: "http://localhost:3000/dashboard/" })
mcp__Claude_in_Chrome__computer({ action: "screenshot" })
mcp__Claude_in_Chrome__resize_window({ width: 375, height: 812 })
mcp__Claude_in_Chrome__computer({ action: "screenshot" })

Example: Cursor IDE browser

Navigate with browser_navigate, then browser_take_screenshot. Use browser_snapshot before interactions; follow cursor-ide-browser server instructions for lock/unlock if required.

Debugging patterns (run JS in page)

Payload examples (wrap in the MCP's JS action):

JSON.stringify(Object.keys(window.MyApp || {}))
JSON.stringify(getComputedStyle(document.querySelector('.target')).background)
JSON.stringify(document.querySelector('.target').getBoundingClientRect())
JSON.stringify({ title: document.title, url: location.href, stylesheets: document.querySelectorAll('link[rel=stylesheet]').length })

Claude Chrome MCP shape:

mcp__Claude_in_Chrome__javascript_tool({
  action: "javascript_exec",
  text: "<escaped one-line string>"
})

When NOT to Use Chrome MCP for Screenshots

  • When all 8 breakpoints need capture systematically — use Playwright
  • When repeatable, scriptable visual regression is required — use Playwright
  • When generating a before/after comparison HTML — use Playwright

Playwright — Systematic Multi-Breakpoint Screenshots

Use Playwright for automated, repeatable screenshot sets across all breakpoints. This is the right tool for visual regression testing and comprehensive responsive documentation.

Golden Rules

  1. Always use Playwright’s bundled Chromium. Never use Puppeteer, Selenium, or system Chrome. Do not check for installed browsers.
  2. Prefer HTTP; file:// only for self-contained static HTML. Serve over HTTP whenever a dev server, build output, or npx serve is available. file:// is acceptable *only* when the page has no fetch/XHR to sibling files, no <script type="module">, no service workers, and no absolute /asset paths — otherwise those will break silently. When in doubt, serve over HTTP.

Setup (run once per session)

node -e “require(‘playwright’)” 2>/dev/null || npm install playwright 2>/dev/null
npx playwright install --with-deps chromium

Do not use @latest — let the project’s lockfile control the version.

Quick workflow

  1. Ensure the site is served over HTTP (user’s dev server, or npx serve _site -l 3000 &).
  2. Verify the server responds before screenshotting (see playwright-patterns.md § “Verifying the Server”).
  3. Capture all 8 standard breakpoints (320–1920px) unless the user asks for specific sizes. Check the project’s CSS/Tailwind config for custom breakpoints first.
  4. Save to _screenshots/ in the project folder.

For the canonical screenshot script, standard breakpoints array, serving patterns, server verification, waiting for dynamic content, element screenshots, persistent sessions, and when the dev server isn’t running — see references/playwright-patterns.md.

Output structure

_screenshots/
  home/
    mobile-sm-320x568.png
    mobile-375x812.png
    ...
    wide-1920x1080.png
  about/
    ...

Before/after visual comparison

Run the canonical script twice (_screenshots/before, _screenshots/after), then generate a comparison HTML. For the comparison script and pixel-diff scoring, see references/visual-regression.md.

Key API notes

  • chromium.launch() — no arguments, uses Playwright’s bundled Chromium
  • waitUntil: ‘networkidle’ — good for static sites. SPAs with analytics/websockets may never go idle — use load + waitForSelector instead
  • fullPage: true — captures entire scrollable page
  • Create a new page per breakpoint — avoids leftover state
  • page.setViewportSize() — set before navigating for accurate responsive rendering

What NOT to Do

See references/troubleshooting.md § "What NOT to Do" for the full list. Key items: no Puppeteer, no JSDOM, no system Chrome binaries, no file:// paths, always capture all breakpoints.


Related Skills

Built-in (Claude Code):

  • dev-browser — browser automation with persistent page state. Useful for interactive captures and manual navigation before screenshotting

On skills.sh:

  • screenshot-local — shot-scraper (Playwright-based) for localhost captures with custom viewports, element targeting, and batch YAML configs. Lighter-weight alternative when a full regression pipeline isn't needed
  • visual-regression-tester — automated visual regression via Playwright, Chromatic, or Percy with multi-viewport and CI/CD. Complements the pixel-diff reference in this skill
  • playwright-responsive-screenshots — MCP-only responsive captures at 3 breakpoints (mobile/tablet/desktop). Lighter scope; localhost-screenshots is a superset: two tracks (Chrome MCP for debug + Playwright for regression), 8 breakpoints with Tailwind/media-query detection, guided Playwright setup, in-page JS debugging, pre-flight checks, persistent sessions, visual-regression pipeline with pixel-diff, and framework-specific troubleshooting

Reference Files

For advanced patterns (CDP attach, persistent sessions, pixel-diff, AI snapshots, CI workflows), read these files from the references/ directory:

FileContents
references/playwright-patterns.mdPre-flight checks, serving patterns, persistent sessions, breakpoint detection, stdin-friendly script templates
references/visual-regression.mdPixel-diff scoring, comparison HTML generation, GitHub Actions CI/CD workflow
references/interaction-templates.mdAuth flows, e-commerce flows, state variations, interactive mode, core interaction primitives
references/ai-snapshots.mdAccessibility tree, DOM snapshots, interactive element maps, incremental DOM diff
references/troubleshooting.mdCommon issues by project type (SSG, Next.js, Tailwind, WordPress)

平台分布

Codex

38.25%
按下载量换算63

Claude

30.89%
按下载量换算51

Cursor

19.76%
按下载量换算33

Gemini CLI

8.96%
按下载量换算15

安全审计

Gen Agent Trust Hub

未通过

Socket

可疑

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills