Borrowing it
Nothing to install: this file belongs to nicobailon/surf-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/nicobailon/surf-cli/main/.claude/skills/surf-codebase/SKILL.mdgit clone --depth 1 https://github.com/nicobailon/surf-cliWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nicobailon/surf-cli/surf-codebase)<a href="https://agentmods.dev/skills/nicobailon/surf-cli/surf-codebase"><img src="https://agentmods.dev/badge/skills/nicobailon/surf-cli/surf-codebase/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/nicobailon/surf-cli/surf-codebase"><img src="https://agentmods.dev/badge/skills/nicobailon/surf-cli/surf-codebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.00960 |
| Opus 5.5 | $0.00017 | $0.00384 |
| Sonnet 5.5 | $0.00008 | $0.00192 |
| Haiku 4.5 | $0.00004 | $0.00096 |
Grade A, and why
surf-codebase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
surf-cli Codebase
Architecture
cli.cjs --socket:/tmp/surf.sock--> host.cjs --native-msg--> service-worker/index.ts --CDP/chrome-APIs--> browser
Add CLI Command
- Add to
TOOLSin native/cli.cjs:158 (args, opts, examples) - Add handler in src/service-worker/index.ts:50
handleMessage()switch - CDP op? → add method src/cdp/controller.ts:60
- DOM interaction? → add handler src/content/accessibility-tree.ts:99
Add CDP Operation
- Add method to
CDPControllerclass src/cdp/controller.ts:60 - Use
this.send(tabId, "Domain.method", params) - Handle events in
handleCDPEvent()if needed
Core Files
src/service-worker/index.ts (~2500L) - Central msg router, CDP ops, screenshot cache, tab registry
- Msg types: EXECUTE_CLICK, EXECUTE_TYPE, READ_PAGE, EXECUTE_SCREENSHOT
- Screenshot cache: generateScreenshotId(), cacheScreenshot(), getScreenshot()
- Tab names: tabNameRegistry Map<name,tabId>
src/cdp/controller.ts (~1000L) - CDP wrapper, CDPController class
- Mouse: click(), rightClick(), doubleClick(), hover(), drag()
- Keyboard: type(), pressKey(), pressKeyChord()
- Screenshots: captureScreenshot(), captureRegion()
- Network/Console: enableNetworkTracking(), getNetworkRequests(), getResponseBody(), subscribeToNetwork(), enableConsoleTracking(), getConsoleMessages()
- Emulation: emulateNetwork(), emulateCPU(), emulateGeolocation()
src/content/accessibility-tree.ts (~1900L) - Content script, generates a11y tree YAML, element interactions
- Handlers: GENERATE_ACCESSIBILITY_TREE, CLICK_ELEMENT, FORM_INPUT, GET_ELEMENT_COORDINATES, WAIT_FOR_ELEMENT, WAIT_FOR_URL
- Element refs: e1, e2... in window.__piRefs for stable references
native/cli.cjs (~2100L) - CLI parser, socket client
- TOOLS: command defs with args/opts
- ALIASES: shortcut→command map
- AUTO_SCREENSHOT_TOOLS: commands that auto-capture
- parseArgs(), sendRequest()
native/host.cjs (~2100L) - Socket server, AI integration
- handleToolRequest(): main dispatcher
- mapToolToMessage(): tool→extension msg converter
- queueAiRequest(): AI request serialization
- AI clients: chatgptClient, geminiClient, perplexityClient
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago Changed 019bd3342efe
- 2mo ago First seen · 106 lines · 42 tokens per session scan A 072b3a3ddded
surf-codebase is a skill published in the GitHub repository nicobailon/surf-cli (684 stars, last pushed 2d ago), licensed MIT. It adds 42 tokens to every session and 960 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
surf-codebase compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| surf-codebasenicobailon/surf-cli | Skill | 684 | 2d ago | MIT | A | 42 | Claude Code |
| canvasleeguooooo/chrome-use | Skill | 231 | yesterday | Apache-2.0 | A | 124 | Claude Code |
| coreleeguooooo/chrome-use | Skill | 231 | yesterday | Apache-2.0 | A | 39 | Claude Code |
| electronleeguooooo/chrome-use | Skill | 231 | yesterday | Apache-2.0 | A | 112 | Claude Code |
| sessionsleeguooooo/chrome-use | Skill | 231 | yesterday | Apache-2.0 | A | 68 | Claude Code |
| slackleeguooooo/chrome-use | Skill | 231 | yesterday | Apache-2.0 | A | 88 | Claude Code |
| networkleeguooooo/chrome-use | Skill | 231 | yesterday | Apache-2.0 | A | 62 | Claude Code |