surf
БесплатноБез исполняемых скриптовНе проверенDrive the user's logged-in Chrome from the shell. Use for browser automation (open, read, click, fill, upload, screenshot), reading a site's feed or API, or…
от nicobailon★ 706 звёзд на GitHubОб этом скилле
Surf
surf controls the user's real, logged-in Chrome. Before the first use of a command not shown in full, run surf <cmd> --help (flags, allowed values, examples). surf --find <term> searches commands; surf --help-topic <topic> explains refs, selectors, frames and more.
Rules
Own a session. Once per agent shell, before any browser command:
export SURF_SESSION="$(basename "$PWD" | sed 's/[^A-Za-z0-9._-]/-/g; s/^[^A-Za-z0-9]*//')-<agent-id>" # letters, digits . _ - only
surf session.ensure "$SURF_SESSION" about:blank # creates, reuses or reopens
It is one tab in its own background window, and its commands run in order. Sessions share the Chrome profile (cookies, logins, downloads). On tab_gone or session_epoch_stale, run the command the error prints after Recovery:.
Read → act on refs → read the diff. page.read gives refs (e5); act on refs, not CSS. Each action prints what changed; when the report ends +N more changes..., run the smaller command it suggests instead of a full read.
Errors from the browser print [code] on stderr and exit 1; --json adds {error:{code,message}} on stdout. Usage and connection errors are plain stderr.
Fail fast on walls. wait.ready returns when the page is ready and fails with page_login|page_challenge|page_not_found|page_error|page_timeout; --accept login returns that state instead.
API before scroll. When go prints saved: <site> <op> --<input>, …, get the data with surf use <site> <op> --<input> <v>, not clicks. A read you'll repeat: surf hook <url> --goal "<what>" saves a tested op from the site's own request; surf use repairs it when the site changes (--no-repair fails instead). A form: hook --do (below). Once: use x thread, or network.wait then network.replay --set. collect scrolls when there is no API and needs a visible tab (session.ensure <name> <url> --window --focused).
Values, not pages. A few values (a total, a date, a count): semantic.extract returns them typed, without a full page read.
Pipe multi-step work. surf do runs steps with waits between them; run it with --dry-run first.
Rich editors (ChatGPT, Notion, other contenteditable fields): target the field, type <text> --ref e5 or --into <css>, instead of typing at the cursor.
AI sites (chatgpt gemini perplexity grok kimi aistudio, oracle ask) use the user's login, no API key, and take the whole browser while they run; a waiting message means queued. Reasoning models take 60 s or more.
Semantic commands are optional model calls.
semantic.*sends page text, without field values, to TypeSafe (jev-1.13.0, the default) or Cloudflare Workers AI (clef,clef-flash, andclairicforsemantic.extract).- Clicks and fills need
--allow-write;--allow-reflimits which elements it can touch. - Each write has to clear a confidence threshold.
--thresholdchanges it for one run and never grants write permission.
Everyday commands
<x> required, [--f <v>] optional, a|b allowed values, =v default, … repeatable. Global flags: --session <n> --tab-id <id> --json --no-diff.
session.ensure <name> <url> [--window|--tab] [--focused]
navigate <url> # alias go
page.read [--ref e5] [--all] [--no-text] [--depth <n>] [--compact] [--summary] # alias read
page.text [--ref e5] # --ref e5: that element's text or a field's whole value, newlines kept; secret fields refused
click <ref> | --selector <css> [--index <n>] | --x <n> --y <n> [--button left|right|double|triple]
type <text> [--ref e5|--into <css>] [--submit] [--clear] [--escapes] [--method cdp|js] # --escapes turns \n \t into newline, tab
key <key> [--repeat <n>] # Enter, Escape, cmd+a
select <ref|css> <value>… [--by value|label|index]
check <ref> | uncheck <ref> # sets the state; already set = nothing clicked
locate.role <role> [--name <text>] [--action click|fill|hover|text] [--value <v>]
wait.ready [--selector <css>] [--text <t>] [--url-prefix <u>] [--accept login,challenge,…] [--timeout <ms>=20000]
screenshot [--output <f>] [--full-page] [--annotate] [--no-save] # auto-saves to /tmp
js <code> [--file <f>] # `return` a value
scroll up|down|left|right [<px>] | scroll.top | scroll.bottom
frame.switch --selector <css>|--name <n>|--index <i> | frame.main
tab.list | tab.new <url> | tab.switch <id> | tab.close <id> | tab.reload [--hard]
cookie.get <name>
emulate.viewport --width <px> --height <px> [--mobile]
console [--limit <n>] [--stream [--level error]]
chatgpt|gemini|perplexity|grok <prompt> [--with-page] [--model <m>] # --file <f>: chatgpt, gemini
doctor [--browser all] # can't connect
Examples of the tricky shapes
surf do 'go "https://example.com" | read | click e5 | screenshot' # refs from before a navigation stop working; read assigns new ones
surf form.fill --data '[{"ref":"e1","value":"John"},{"re
Установить surf в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл surf?
Drive the user's logged-in Chrome from the shell. Use for browser automation (open, read, click, fill, upload, screenshot), reading a site's feed or API, or asking ChatGPT, Gemini, Perplexity or Grok through the browser.
Как установить скилл surf?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл surf запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic