This GitHub Action creates a Browserbase session, lets Claude Code inspect the live DOM, and opens a PR with fixed selectors.
The problem
Your automation suddenly stops working because the website changed their CSS classes:The solution
Add a GitHub Action that uses Claude Code with Browserbase to automatically fix it:Trigger options
The example above uses manual dispatch and a schedule, but you can trigger self-healing from various sources:- Observability Alerts
- Webhook
- On Failure
- Schedule
Trigger the workflow when your monitoring detects automation failures:Then call the GitHub API from your observability platform (Datadog, PagerDuty, Grafana, etc.):Access the payload in your workflow:
Required secrets
Add these secrets to your GitHub repository:How it works
1
Trigger
The action runs on manual dispatch or a weekly schedule.
2
Setup
Installs the browse CLI, Claude Code, and Browserbase skills.
3
Browser Session
Creates a cloud browser session via Browserbase API.
4
AI Analysis
Claude Code connects to the browser, inspects the live DOM with
browse snapshot, and identifies correct selectors.5
Fix & PR
Updates the code and opens a pull request with the changes.
The result
Claude Code automatically:- Opens a real browser via Browserbase
- Inspects the current DOM structure
- Identifies the correct selectors
- Updates your code and opens a PR