react-grab
БесплатноЗапускает вложенные скриптыНе проверенCapture exact React element context from a live browser UI and hand it to an AI coding agent as component name, source file path, line number, and HTML. Use…
от akillness★ 63 звезды на GitHubОб этом скилле
react-grab — Browser element context for AI agents
Keyword:
react-grab·grab·element contextPoint 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-grabin 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-grabsetup 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 →
browser-harness - 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:
- Clipboard install/use — user wants to hover, press Cmd/Ctrl+C, and paste context into an AI agent.
- MCP workflow — user wants the agent to call a tool like
get_element_contextafter browser selection. - Plugin/API workflow — user wants custom actions, lifecycle hooks, formatting, or primitives like
freeze(). - 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 [email protected] initis the default install path (pin to the verified release).- Upstream
package.jsoncurrently 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 [email protected] init
Then explain the runtime flow:
- Start the dev server.
- Open the app in the browser.
- Hover the target element.
- Press Cmd+C (Mac) or Ctrl+C (Windows/Linux).
- 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 [email protected] add mcp
Explain the real flow clearly:
- User selects or hovers the element in the browser overlay.
- The MCP server exposes the latest selection.
- The AI agent calls
get_element_context. - 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.mdfor full API surfacereferences/agent-workflows.mdfor 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.mdfor symptom-first triage. - For removal, use upstream CLI removal commands:
npx -y [email protected] 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 →
browser-harnessorplaywriter - UI review / visual annotation →
agentation - performance / profiling / hydration / bundle / RSC issues →
react-best-practices - reusable component-system design →
design-systemordesign-system
Step 5: Prefer reference docs over bloating the front door
After classifying the mode, load only the matching support doc:
references/install-and-routing.mdreferences/agent-workflows.mdreferences/troubleshooting.mdreferences/api.md
Keep the main answer short unless the user ex
Установить react-grab в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteEditGlobGrepWebFetchВложенные файлы
FAQ
Что делает скилл react-grab?
Capture exact React element context from a live browser UI and hand it to an AI coding agent as component name, source file path, line number, and HTML. Use when the user wants `react-grab`, element-context copy, component-source lookup from the browser, clipboard-to-agent React debugging, or MCP-backed element selection for React apps. Not for generic browser automation or login/session reuse (`browser-harness`, `playwriter`), broad UI annotation/review (`agentation`), React performance audits (`react-best-practices`), or general design-system work (`design-system`). Triggers on: react-grab, grab element context, copy component to AI, browser component picker, React component inspector, clipboard component source, get element context from browser, grab UI element.
Как установить скилл react-grab?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл react-grab запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic