claude-surf
CLAUDE.md24 starsChanged 11 months agoMITView on GitHub
Claude-Surf is a Claude Code plugin that integrates with VibeSurf, exposing browser automation, AI skills, workflows, and external app integrations through a pure markdown skill system. Key Dependency: VibeSurf server must be running on http://127.0.0.1:9335 for this plugin to function. This plugin follows the superpowers architecture pattern: surf - Main entry point, automatically injected via SessionStart hook - Provides navigation to all other skills - Contains VibeSurf API documentation - No manual invocation needed All other 13 skills are loaded…
- Commits and pushes
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
22 rules. About 0 are common, 17 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
No manual invocation needed
- Distinctive: line 63
All other 13 skills are loaded via the Skill tool when needed:
- Distinctive: line 90
Start with "Use when..."
- Very specific: line 172
If running: Injects surf skill content to context
- Distinctive: line 173
If not running: Displays warning with installation instructions
- Very specific: line 202
Fallback pattern: If browser-use fails → use get_browser_state → browser.{action} → repeat loop
- Distinctive: line 221
Use for: Complex tasks, form filling, multi-site research, data extraction
- Very specific: line 225
Fallback when it fails: Use browser skill with get_browser_state → browser.{action} → repeat loop
- Distinctive: line 253
CRITICAL: Read the status from SessionStart hook FIRST (shown at top of surf skill)
- Distinctive: line 276
Test: Ask Claude to search web, navigate browser, etc.
- Very specific: line 294
Update relevant skills/*/SKILL.md - affects Claude's behavior
- Distinctive: line 295
Update README.md - user-facing documentation
- Distinctive: line 296
Keep skill descriptions consistent with actual VibeSurf API
- Distinctive: line 297
Test with Claude Code to verify skill loading
- Distinctive: line 303
When making changes that should be released:
- Distinctive: line 324
⚠️ IMPORTANT: Never commit without updating the version if the changes affect functionality or documentation that users rely on.
- Distinctive: line 345
Before executing unknown actions:
- Very specific: line 346
Search for action: GET /api/tool/search?keyword=...
- Distinctive: line 352
When user makes a browser/automation request:
- Distinctive: line 355
Use Skill tool to load that skill
- Distinctive: line 356
Follow skill's guidance to call VibeSurf API
- Distinctive: line 360
Complementary relationship: - not mutually exclusive:
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Claude-Surf is a Claude Code plugin that integrates with VibeSurf, exposing browser automation, AI skills, workflows, and external app integrations through a pure markdown skill system.
Key Dependency: VibeSurf server must be running on http://127.0.0.1:9335 for this plugin to function.
Architecture
Superpowers-Inspired Design
This plugin follows the superpowers architecture pattern:
- No build system - Pure markdown skills, no compilation
- Hook-based injection - SessionStart injects skill content
- Frontmatter-driven -
descriptionfield defines triggers - Direct API access - Claude calls VibeSurf HTTP API directly
Project Structure
claude-surf/
├── .claude-plugin/
│ ├── plugin.json # Plugin metadata
│ └── marketplace.json # Marketplace configuration
├── hooks/
│ ├── hooks.json # Hook configuration
│ ├── session-start.sh # Health check + skill injection
│ └── run-hook.cmd # Cross-platform wrapper
├── skills/
│ ├── surf/ # Main entry skill (auto-injected)
│ ├── search/ # AI web search
│ ├── fetch/ # Fetch URL content as markdown
│ ├── js_code/ # Structured data extraction
│ ├── crawl/ # Page content extraction
│ ├── summary/ # Page summarization
│ ├── finance/ # Stock data
│ ├── trend/ # Trending news
│ ├── screenshot/ # Screenshots
│ ├── browser/ # Direct browser control (21 actions)
│ ├── browser-use/ # AI multi-step automation
│ ├── website-api/ # Platform APIs (XiaoHongShu/etc)
│ ├── workflows/ # Pre-built workflows
│ └── integrations/ # External apps (Gmail/GitHub/etc)
├── README.md
└── CLAUDE.mdSkill System
Auto-Injected Skill
surf - Main entry point, automatically injected via SessionStart hook
- Provides navigation to all other skills
- Contains VibeSurf API documentation
- No manual invocation needed
On-Demand Skills
All other 13 skills are loaded via the Skill tool when needed:
search- AI web searchfetch- Fetch URL content as structured markdownjs_code- Extract structured data with auto-generated JScrawl- Extract page contentsummary- Summarize webpagesfinance- Stock data from Yahoo Financetrend- Trending newsscreenshot- Page screenshotsbrowser- Direct browser controlbrowser-use- AI multi-step automationwebsite-api- Social platform APIsworkflows- Pre-built automationsintegrations- Gmail/GitHub/Slack/etc
Skill Frontmatter
Each SKILL.md file has YAML frontmatter:
---
name: skill-name
description: Use when [triggering conditions and symptoms]
---Critical: The description field determines when Claude loads the skill. It should:
- Start with "Use when..."
- Describe triggering conditions, NOT workflow
- Include specific symptoms and examples
VibeSurf API
VibeSurf exposes three core HTTP endpoints at http://127.0.0.1:9335:
1. List Available Actions
GET /api/tool/search?keyword={optional_keyword}Returns all available VibeSurf actions.
2. Get Action Parameters
GET /api/tool/{action_name}/paramsReturns JSON schema for the action's parameters.
3. Execute Action
POST /api/tool/execute
Content-Type: application/json
{
"action_name": "action_name_here",
"parameters": {
// action-specific parameters
}
}Standard Workflow
- Discover actions →
GET /api/tool/search - Get parameters →
GET /api/tool/{action_name}/params - Execute →
POST /api/tool/execute
Plugin Configuration
Claude Code Plugin Structure
.claude-plugin/plugin.json - Plugin metadata
{
"name": "surf",
"description": "VibeSurf integration - Control browsers, automate workflows...",
"version": "1.0.0"
}.claude-plugin/marketplace.json - Marketplace configuration
{
"name": "claude-surf",
"plugins": [{
"name": "surf",
"source": "./"
}]
}hooks/hooks.json - SessionStart hook configuration
{
"hooks": {
"SessionStart": [{
"matcher": "startup|resume|clear|compact",
"hooks": [{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start.sh"
}]
}]
}
}Health Check Hook
hooks/session-start.sh - Runs on session start:
- Checks if VibeSurf is running (
curl http://127.0.0.1:9335/health) - If running: Injects
surfskill content to context - If not running: Displays warning with installation instructions
Non-blocking: Hook timeout is 3 seconds, won't prevent session start.
Skill Reference
AI Skills (8)
| Skill | Action | Purpose |
search | skill_search | AI-powered web search (Gemini) |
fetch | skill_fetch | Fetch URL content as structured markdown |
js_code | skill_code | Auto-generate JS to extract lists/tables |
crawl | skill_crawl | Extract page content with LLM |
summary | skill_summary | Summarize webpage |
finance | skill_finance | Stock data from Yahoo Finance |
trend | skill_trend | Trending news from NewsNow |
screenshot | skill_screenshot | Take screenshots |
Browser Skills (2)
| Skill | Actions | Purpose |
browser | 21 actions (browser.*) | Precise step-by-step control (navigate, click, input, etc.) |
browser-use | execute_browser_use_agent | Task-oriented sub-agent automation |
Note: These two skills are complementary, not mutually exclusive. Both can accomplish the same tasks:
browser-use: High-level, describe goal + desired output, agent figures out stepsbrowser: Low-level, explicit control over each action- Fallback pattern: If browser-use fails → use
get_browser_state→browser.{action}→ repeat loop
Integration Skills (3)
| Skill | Actions | Purpose |
website-api | 2 actions | XiaoHongShu, Weibo, Zhihu, Douyin, YouTube |
workflows | 2 actions | Pre-built automation sequences |
integrations | 4 actions | Gmail, GitHub, Slack, 100+ apps |
Important VibeSurf Actions
Browser-Use Agent (Task-Oriented Sub-Agent)
Action: execute_browser_use_agent
Launches autonomous AI agents for task-oriented automation:
- Supports parallel execution (unique tab_id per agent)
- Task-oriented: describe goal + desired output, agent figures out steps
- Use for: Complex tasks, form filling, multi-site research, data extraction
When to use: Complex tasks where describing the goal is easier than specifying steps
Fallback when it fails: Use browser skill with get_browser_state → browser.{action} → repeat loop
Browser Actions (Precise Control)
All browser.* actions for step-by-step manual control:
browser.navigate- Go to URLbrowser.click- Click elementbrowser.input- Type textbrowser.switch- Switch tabsbrowser.extract- LLM data extractionbrowser.screenshot- Take screenshotget_browser_state- Inspect current page state- And 15 more...
Use for: Any browser task where you want explicit control, or as fallback when browser-use fails
Extra Tools (Composio/MCP)
get_all_toolkit_types- List available appssearch_tool- Find tools in toolkitget_tool_info- Get tool schemaexecute_extra_tool- Run app action
Important: VibeSurf Execution Policy
CRITICAL: Claude Code must NEVER run the vibesurf command or attempt to install/start VibeSurf.
Policy
- CRITICAL: Read the status from SessionStart hook FIRST (shown at top of surf skill)
- Format:
<SURF_SKILLS>**VibeSurf Integration** - Status: running/not_running - DO NOT IGNORE THIS STATUS - it's already been checked
- Format:
- NEVER execute:
vibesurf,uv tool install vibesurf, or similar commands - IF Status: not_running: Inform user to start VibeSurf manually, DO NOT run commands
- Manual re-check (only if needed):
curl http://127.0.0.1:9335/health
Why?
- VibeSurf is a long-running service that users manage
- It may require specific configurations or environments
- Auto-starting could interfere with user's workflow
Testing the Plugin
Local Testing Workflow
- User starts VibeSurf:
vibesurf(user does this, not Claude) - Install plugin:
/plugin marketplace add ./ /plugin install surf - Restart Claude Code
- Test: Ask Claude to search web, navigate browser, etc.
Verifying VibeSurf Connection
# Check if VibeSurf is running
curl http://127.0.0.1:9335/health
# List all available actions
curl http://127.0.0.1:9335/api/tool/search
# Get parameters for specific action
curl http://127.0.0.1:9335/api/tool/skill_search/paramsDocumentation Sync
When modifying functionality:
- Update relevant
skills/*/SKILL.md- affects Claude's behavior - Update
README.md- user-facing documentation - Keep skill descriptions consistent with actual VibeSurf API
- Test with Claude Code to verify skill loading
Release Process
CRITICAL: Always update version before committing and pushing
When making changes that should be released:
- Update version in
.claude-plugin/plugin.json:{ "version": "X.Y.Z" } - Version numbering:
- Major (X): Breaking changes, major new features
- Minor (Y): New features, backward compatible
- Patch (Z): Bug fixes, documentation updates
- Then commit and push:
git add . git commit -m "..." git push
⚠️ IMPORTANT: Never commit without updating the version if the changes affect functionality or documentation that users rely on.
Key Design Patterns
Error Handling
VibeSurf returns structured responses:
{
"success": boolean,
"result": any,
"extracted_content": string,
"long_term_memory": string,
"attachments": string[]
}Handle errors by checking success field and result for error messages.
Action Discovery Pattern
Before executing unknown actions:
- Search for action:
GET /api/tool/search?keyword=... - Get parameters:
GET /api/tool/{action}/params - Build request:
POST /api/tool/execute
Skill Decision Making
When user makes a browser/automation request:
- Consult
surfskill (already in context) surfskill points to appropriate specialized skill- Use Skill tool to load that skill
- Follow skill's guidance to call VibeSurf API
Browser vs Browser-Use Pattern
Complementary relationship - not mutually exclusive:
| Approach | Characteristics | Best For |
| browser-use | High-level, task-oriented sub-agent | Complex tasks, describe goal + output |
| browser | Low-level, step-by-step control | Precise control, fallback mechanism |
| Hybrid | Best reliability | Try browser-use first, fallback to browser if needed |
Fallback workflow when browser-use fails:
1. get_browser_state → Inspect page state and available elements
2. browser.{action} → Perform specific action
3. get_browser_state → Verify result and plan next step
4. Repeat until completeSelection principle: Choose based on task complexity and control needs, NOT step count. Both can handle multi-step workflows and form filling.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

