skills/stagehand-browser/SKILL.md
Browser automation using Stagehand and AI. Use when you need to interact with websites, fill forms, login to services, extract data from web pages, or automate web workflows. Provides the browser_automate tool.
npx skillsauth add pratos/clanker-setup stagehand-browserInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides AI-powered browser automation via the browser_automate tool. It uses Stagehand to translate natural language instructions into browser actions.
{
"url": "https://example.com",
"task": "Click the login button and read the page title"
}
{
"url": "https://fantasy.premierleague.com",
"task": "Login with my credentials, then navigate to My Team",
"credentials": { "site": "fpl" }
}
Credentials are loaded from sops-nix:
~/.config/sops-nix/secrets/<site>/ (with email/username and password files)~/.config/sops-nix/secrets/stagehand/<site>/ (alternative location){
"url": "https://example.com/products",
"task": "Find the featured product",
"extract": {
"instruction": "Extract the product name and price",
"schema": {
"name": "string",
"price": "string"
}
}
}
{
"url": "https://example.com",
"task": "Fill out the contact form",
"headless": false
}
Set headless: false to watch the browser perform actions in real-time.
❌ "Login and do stuff" ✅ "Login with username from credentials, click 'My Account' in the top menu, then click 'Order History'"
For multi-step workflows, describe each step:
"1. Login using credentials
2. Navigate to 'Transfers' tab
3. Click 'Make Transfers'
4. Search for player 'Salah'
5. Click 'Add to team'"
Stagehand understands context:
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| url | string | required | URL to navigate to |
| task | string | required | Natural language task description |
| credentials.site | string | optional | Site identifier for credential lookup |
| extract.instruction | string | optional | What data to extract |
| extract.schema | object | optional | Schema for extracted data |
| screenshot | boolean | true | Take a screenshot when done |
| headless | boolean | true | Run browser without UI (set false to watch) |
| timeout | number | 60000 | Timeout in milliseconds |
Other skills can reference this tool. Example for an FPL skill:
## Making Transfers
When the user wants to make transfers, use the `browser_automate` tool:
browser_automate({
url: "https://fantasy.premierleague.com/transfers",
task: "Login, then transfer out [PLAYER_OUT] and bring in [PLAYER_IN]",
credentials: { site: "fpl" },
screenshot: true
})
Set ANTHROPIC_API_KEY or OPENAI_API_KEY in your environment, or add to sops-nix.
Run setup: ~/.pi/agent/extensions/stagehand-browser/scripts/setup-local.sh
Increase timeout: { "timeout": 120000 } (2 minutes)
Try with { "headless": false } to see what's happening. Some sites may require additional handling.
Check that your credentials are at ~/.config/sops-nix/secrets/<site>/ with email (or username) and password files.
development
Conducts comprehensive web research to find accurate, relevant information. Use when you need modern information only discoverable on the web, documentation, best practices, or technical solutions. Uses curl+markdown.new, Exa/Parallel APIs, and camoufox browser — no surf/WebFetch/WebSearch.
development
Enforces using uv to run all Python scripts and ty for type checking. Includes inline script metadata (PEP 723) for one-time scripts with dependencies.
development
Ensures .env files in TypeScript projects override sops-nix shell secrets. Use when setting up env loading, debugging missing/wrong API keys, or configuring dotenv in TS projects.
tools
Share agent session traces via the traces CLI. Use when the user asks to share/publish/upload a trace. Always use private visibility.