React Grab
Apps & Automationreact-grabReact Grab is an Agent Skill for apps & automation published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Browser automation with Playwright and real cookies. Use 'grab browser execute "<code>"' to run Playwright code.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/testing/react-grab-aidenybai-react-grab/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/react-grab, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
React Grab
Playwright automation with your real browser cookies. Pages persist across executions. Output is always JSON: {ok, result, error, url, title, page}
Note: If MCP is available in your environment, prefer using the browser_snapshot and browser_execute MCP tools instead of this skill for better performance.
Usage
grab browser execute "<code>"
Performance Tips
- Batch multiple actions in a single execute call (3-5x faster)
- Use maxDepth to limit tree depth:
getSnapshot({maxDepth: 5})
# SLOW: 3 separate round-trips
execute "await page.goto('https://example.com')"
execute "await getRef('e1').click()"
execute "return await getSnapshot()"
# FAST: 1 round-trip
execute "await page.goto('...'); await getRef('e1').click(); return await getSnapshot();"
Helpers
page- Playwright Page objectgetSnapshot(opts?)- Get ARIA tree with refs (e1, e2...). Options:maxDepthgetRef(id)- Get element by ref ID (chainable). E.g.await getRef('e1').click()getRef(id).source()- Get React component source:{ filePath, lineNumber, componentName }fill(id, text)- Clear and fill inputdrag({from, to, dataTransfer?})- Drag with custom MIME typesdispatch({target, event, dataTransfer?, detail?})- Dispatch custom eventswaitFor(target, opts?)- Wait for selector/ref/state. E.g.waitFor('e1'),waitFor('networkidle')
Common Patterns
execute "await getRef('e1').click()"
execute "await fill('e1', 'hello')"
execute "await waitFor('e1')"
execute "await waitFor('networkidle')"
execute "return await getRef('e1').getAttribute('data-id')"
execute "return await getRef('e1').source()"
execute "return await getSnapshot()"
execute "return await getRef('e1').screenshot()"
execute "return await page.screenshot()"
Multi-Page Sessions
execute "await page.goto('https://github.com')" --page github
execute "return await getSnapshot()" --page github
Docs
Playwright API: https://playwright.dev/docs/api/class-page