Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计提醒

react-grabReact grab 前端

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,835

周安装

78

GitHub Stars

11

下载量

643
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/akillness/oh-my-skills --skill react-grab

简介

用于捕获浏览器中 React 组件的上下文信息,辅助前端开发与调试。

  • 适合在 Codex、Claude、Cursor 等环境中提取组件文件路径、HTML 结构和状态信息。
  • 可通过剪贴板、MCP 或插件方式集成,实现精准的元素定位与上下文传递。
  • 安装命令:npx skills add https://github.com/akillness/oh-my-skills --skill react-grab
  • 使用前需确认项目中的 React 版本及文件结构,避免路径错误导致空响应。

SKILL.md

react-grab — Browser element context for AI agents

Keyword: react-grab · grab · element context Point at a live React UI element, capture the exact component/file/HTML context, and feed it straight into Claude Code, Cursor, Copilot, Codex, Gemini, or an MCP workflow.

When to use this skill

  • Install react-grab in a React project so agents can copy exact component context from the browser
  • Choose between clipboard flow, MCP flow, and plugin/API flow for React element capture
  • Fix react-grab setup issues like wrong load point, missing file paths, or empty MCP responses
  • Add or remove an agent integration (claude-code, cursor, codex, gemini, mcp, etc.)
  • Build a custom plugin or use the primitives API for a project-specific workflow

Do not use this skill for:

  • Fresh-session browser automation, auth flows, or disposable browser verification → agent-browser
  • Running-browser reuse with existing cookies/extensions/logins → playwriter
  • Human feedback / annotation packets on rendered UI → agentation
  • React performance diagnosis, rerender churn, hydration, bundle, or RSC/client-boundary work → react-best-practices
  • General UI-system / token / component-library design work → design-system

Instructions

Step 1: Classify the request

Choose one primary mode before giving commands:

  1. Clipboard install/use — user wants to hover, press Cmd/Ctrl+C, and paste context into an AI agent.
  2. MCP workflow — user wants the agent to call a tool like get_element_context after browser selection.
  3. Plugin/API workflow — user wants custom actions, lifecycle hooks, formatting, or primitives like freeze().
  4. Troubleshooting/removal — user wants to fix setup problems or remove the integration cleanly.

Step 2: Confirm prerequisites truthfully

Use the upstream project as source of truth:

  • npx grab@latest init is the default install path.
  • Upstream package.json currently requires Node.js >=22.
  • The browser overlay is a development-only tool; never present it as a production feature.

If the user’s environment is older than Node 22, say so explicitly before giving the install path.

Step 3: Give the shortest correct path

Mode A — Clipboard install/use

Use this as the default path unless the user explicitly asks for MCP or plugins:

# At the project root
npx -y grab@latest init

Then explain the runtime flow:

  1. Start the dev server.
  2. Open the app in the browser.
  3. Hover the target element.
  4. Press Cmd+C (Mac) or Ctrl+C (Windows/Linux).
  5. Paste the captured context into the AI agent.

Clipboard output should include:

  • component name
  • source file path
  • line/column when available
  • HTML snippet

If the user needs framework-specific setup, use references/install-and-routing.md.

Mode B — MCP workflow

When the user wants programmatic access from the agent instead of manual paste:

npx -y grab@latest add mcp

Explain the real flow clearly:

  1. User selects or hovers the element in the browser overlay.
  2. The MCP server exposes the latest selection.
  3. The AI agent calls get_element_context.
  4. The tool returns file path, component, stack, and HTML context.

If the user asks how this differs from clipboard flow:

  • Clipboard is manual paste into chat.
  • MCP is tool-based retrieval after selection.

Use references/agent-workflows.md for agent-specific install and routing guidance.

Mode C — Plugin/API workflow

When the user wants custom behavior, automation, or a deeper integration:

  • Route installation and workflow choice first.
  • Then point to:

- references/api.md for full API surface - references/agent-workflows.md for practical plugin/MCP patterns

Common primitives to mention:

  • getElementContext(element)
  • freeze() / unfreeze()
  • openFile(filePath, lineNumber?)
  • registerPlugin(...)

Do not dump the full API unless the user asked for the deep path.

Mode D — Troubleshooting/removal

If the user wants fixes or teardown:

  • Use references/troubleshooting.md for symptom-first triage.
  • For removal, use upstream CLI removal commands:
npx -y grab@latest remove <agent>

Step 4: Keep the boundary sharp

Keep react-grab focused on React element context capture from the browser.

Route out when the user is actually asking for:

  • general browser automation → agent-browser or playwriter
  • UI review / visual annotation → agentation
  • performance / profiling / hydration / bundle / RSC issues → react-best-practices
  • reusable component-system design → design-system or ui-component-patterns

Step 5: Prefer reference docs over bloating the front door

After classifying the mode, load only the matching support doc:

  • references/install-and-routing.md
  • references/agent-workflows.md
  • references/troubleshooting.md
  • references/api.md

Keep the main answer short unless the user explicitly asks for the long path.

Examples

Example 1: install in a Next.js app and use clipboard flow

User: “Set up react-grab in my Next.js app so I can copy a component into Claude Code.”

Response shape:

  1. Confirm Node 22+ prerequisite.
  2. Use npx -y grab@latest init as the default path.
  3. Explain dev-server → browser hover → Cmd/Ctrl+C → paste into Claude Code.
  4. Only load framework-specific setup if auto-detect is not viable.

Example 2: MCP setup for agent tool access

User: “Install react-grab MCP so the agent can grab the selected button context.”

Response shape:

  1. Confirm Node 22+ prerequisite.
  2. Run npx -y grab@latest add mcp.
  3. Explain that the browser selection happens first, then the agent calls get_element_context.
  4. Route generic browser-control questions to agent-browser / playwriter if needed.

Example 3: custom plugin workflow

User: “Create a react-grab plugin that adds a Jira action to the context menu.”

Response shape:

  1. Keep react-grab as the plugin/API lane.
  2. Use registerPlugin(...) with an action and optional hooks.
  3. Point to references/api.md for the full hook surface.
  4. Keep the example focused on the requested action rather than reproducing the whole API.

Example 4: fix setup drift

User:grab init keeps failing on my machine.”

Response shape:

  1. Check Node version first and call out the Node 22+ requirement.
  2. Confirm they are running from the project root.
  3. Use references/troubleshooting.md for overlay/load/MCP/path failures.
  4. Route unrelated framework build issues to the appropriate frontend skill.

Best practices

  1. State the Node.js >=22 prerequisite truthfully before recommending install commands.
  2. Default to npx -y grab@latest init unless the user explicitly needs manual framework setup.
  3. Keep it dev-only — never imply this belongs in production builds.
  4. Explain clipboard vs MCP clearly so users do not confuse paste-based and tool-based workflows.
  5. Route broad browser or UI-review work out early instead of letting react-grab absorb adjacent skills.
  6. Use support docs for depth instead of pasting long installation or API manuals into the main response.

References

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.51%
按下载量换算222

Claude

31.44%
按下载量换算202

Cursor

19.45%
按下载量换算125

Gemini CLI

8.85%
按下载量换算57

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills