How to Connect Claude Code to Gaffa for Browser Automation
Description and use
Integrating Gaffa with Claude Code lets AI write, run, and validate browser automation scripts against a real browser, eliminating manual debugging.
Problem
AI coding agents can write browser automation code but lack feedback from a real browser, causing repeated failures.
Outcome
The integration allows AI agents to write, run, and validate browser automation against a real website in a single loop, reducing manual debugging cycles.
Workflow
- Install Gaffa skills via npx @gaffa-dev/cli install --tools=claude-code --scope=project -y
- Run npx @gaffa-dev/cli doctor to verify installation
- Set GAFFA_API_KEY environment variable
- Use Gaffa CLI or API to send browser actions (e.g., click, type, capture_screenshot) and receive results
- Let the AI agent generate and execute Playwright-like scripts through Gaffa skills
- Iterate based on real browser feedback until success
Evidence
AI coding agents are great at writing browser automation code. They are terrible at knowing whether it works.
Give the agent a real browser behind an API, plus instructions on how to use it, and the loop changes completely: look at the page, write the request, run it, check the output, fix, repeat.
npx @gaffa-dev/cli install --tools=claude-code --scope=project -y
curl -sS -X POST https://api.gaffa.dev/v1/browser/requests ...
- Record date: 2026-10-27T17:11:54.208Z