repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | { |
| #2 | "skillId": "openclaw-claude-code-skill-main", |
| #3 | "name": "claude-code-skill", |
| #4 | "description": "Control Claude Code via MCP protocol. Trigger with \"plan\" to write a precise execution plan then feed it to Claude Code. Also supports direct commands, persistent sessions, agent teams, and advanced tool control.", |
| #5 | "category": "pump-protocol", |
| #6 | "path": "openclaw-claude-code-skill-main/SKILL.md", |
| #7 | "url": "https://x402.wtf/api/skills/openclaw-claude-code-skill-main", |
| #8 | "tags": [ |
| #9 | "openclaw", |
| #10 | "solana", |
| #11 | "claude", |
| #12 | "code", |
| #13 | "skill", |
| #14 | "main" |
| #15 | ], |
| #16 | "requiredEnv": [], |
| #17 | "homepage": null, |
| #18 | "attestation": { |
| #19 | "status": "pending", |
| #20 | "isFormallyVerified": false, |
| #21 | "attestationPda": null, |
| #22 | "verificationTimestamp": null |
| #23 | }, |
| #24 | "markdown": "---\nname: claude-code-skill\ndescription: Control Claude Code via MCP protocol. Trigger with \"plan\" to write a precise execution plan then feed it to Claude Code. Also supports direct commands, persistent sessions, agent teams, and advanced tool control.\nhomepage: https://github.com/enderfga/claude-code-skill\nmetadata: {\n \"solanaos\": {\n \"emoji\": \"🤖\",\n \"requires\": {\n \"bins\": [\"node\"],\n \"env\": []\n },\n \"install\": [\n {\n \"id\": \"local\",\n \"kind\": \"local\",\n \"path\": \"~/clawd/claude-code-skill\",\n \"label\": \"Use local installation\"\n }\n ]\n }\n}\n---\n\n# Claude Code Skill\n\nControl Claude Code via MCP (Model Context Protocol). This skill unleashes the full power of Claude Code for solanaos agents, including persistent sessions, agent teams, and advanced tool control.\n\n\n---\n\n## ⚡ Quick Start\n\n```bash\n# Start a persistent Claude session for your project\nclaude-code-skill session-start myproject -d ~/project \\\n --permission-mode acceptEdits \\\n --allowed-tools \"Bash,Read,Edit,Write,Glob,Grep\"\n\n# Send a plan (Claude will execute precisely)\nclaude-code-skill session-send myproject --stream '<精确的执行计划>'\n\n# Send with high effort (ultrathink) for complex reasoning\nclaude-code-skill session-send myproject --stream --ultrathink 'Refactor the auth module'\n\n# Enter plan mode — Claude creates a plan first, then executes\nclaude-code-skill session-send myproject --stream --plan 'Implement rate limiting'\n\n# Check progress\nclaude-code-skill session-status myproject\n\n# Compact session when context gets large\nclaude-code-skill session-compact myproject\n\n# Switch model mid-session\nclaude-code-skill session-model myproject opus\n```\n\n## 🎯 When to Use This Skill\n\n### Use Persistent Sessions When:\n- ✅ Multi-step tasks requiring multiple tool calls\n- ✅ Iterative development (write code → test → fix → repeat)\n- ✅ Long conversations needing full context\n- ✅ Agent needs to work autonomously\n- ✅ You want streaming real-time feedback\n\n### Use Direct MCP Tools When:\n- ✅ Single command execution\n- ✅ Quick file read/write\n- ✅ One-off searches\n- ✅ No context needed between operations\n\n## 📚 Command Reference\n\n### Basic MCP Operations\n\n```bash\n# Connect to Claude Code MCP\nclaude-code-skill connect\nclaude-code-skill status\nclaude-code-skill tools\n\n# Direct tool calls (no persistent session)\nclaude-code-skill bash \"npm test\"\nclaude-code-skill read /path/to/file.ts\nclaude-code-skill glob \"**/*.ts\" -p ~/project\nclaude-code-skill grep \"TODO\" -p ~/project -c\nclaude-code-skill call Write -a '{\"file_path\":\"/tmp/test.txt\",\"content\":\"Hello\"}'\n\n# Disconnect\nclaude-code-skill disconnect\n```\n\n### Persistent Sessions (Agent Loop)\n\n#### Starting Sessions\n\n```bash\n# Basic start\nclaude-code-skill session-start myproject -d ~/project\n\n# With custom API endpoint (for Gemini/GPT proxy)\nclaude-code-skill session-start gemini-task -d ~/project \\\n --base-url http://127.0.0.1:8082 \\\n --model gemini-2.0-flash\n\n# With permission mode (plan = preview changes before applying)\nclaude-code-skill session-start review -d ~/project --permission-mode plan\n\n# With tool whitelist (auto-approve these tools)\nclaude-code-skill session-start safe -d ~/project \\\n --allowed-tools \"Bash(git:*),Read,Glob,Grep\"\n\n# With budget limit\nclaude-code-skill session-start limited -d ~/project --max-budget 1.50\n\n# Full configuration\nclaude-code-skill session-start advanced -d ~/project \\\n --permission-mode acceptEdits \\\n --allowed-tools \"Bash,Read,Edit,Write\" \\\n --disallowed-tools \"Task\" \\\n --max-budget 5.00 \\\n --model claude-opus-4-5 \\\n --append-system-prompt \"Always write tests\" \\\n --add-dir \"/tmp,/var/log\"\n```\n\n**Permission Modes:**\n| Mode | Description |\n|------|-------------|\n| `acceptEdits` | Auto-accept file edits (default) |\n| `plan` | Preview changes before applying |\n| `default` | Ask for each operation |\n| `bypassPermissions` | Skip all prompts (dangerous!) |\n| `delegate` | Delegate decisions to parent |\n| `dontAsk` | Never ask, reject by default |\n\n#### Sending Messages\n\n```bash\n# Basic send (blocks until complete)\nclaude-code-skill session-send myproject \"Write unit tests for auth.ts\"\n\n# Streaming (see progress in real-time)\nclaude-code-skill session-send myproject \"Refactor this module\" --stream\n\n# With custom timeout\nclaude-code-skill session-send myproject \"Run all tests\" -t 300000\n\n# With effort control\nclaude-code-skill session-send myproject \"Quick lint fix\" --effort low\nclaude-code-skill session-send myproject \"Design new auth system\" --ultrathink\n\n# Plan mode — Claude creates a plan, then executes\nclaude-code-skill session-send myproject --plan \"Add rate limiting to all API endpoints\"\n\n# Auto-resume stopped sessions\nclaude-code-skill session-send myproject \"Continue the migration\" --auto-resume\n\n# NDJSON output for programmatic consumption\nclaude-code-skill session-send myproject \"Run tests\" --stream --ndjson\n```\n\n#### Managing Sessions\n\n```bash\n# List active sessions\nclaude-code-skill session-list\n\n# Get detailed status\nclaude-code-skill session-status myproject\n\n# View conversation history\nclaude-code-skill session-history myproject -n 50\n\n# Pause and resume\nclaude-code-skill session-pause myproject\nclaude-code-skill session-resume-paused myproject\n\n# Fork a session (create a branch for experiments)\nclaude-code-skill session-fork myproject myproject-experiment\n\n# Stop\nclaude-code-skill session-stop myproject\n\n# Restart a failed session\nclaude-code-skill session-restart myproject\n```\n\n#### Effort & Model Control\n\n```bash\n# Set effort level for a session (persists across messages)\nclaude-code-skill session-effort myproject low # Fast, minimal thinking\nclaude-code-skill session-effort myproject medium # Balanced (default for Opus 4.6)\nclaude-code-skill session-effort myproject high # Deep thinking\nclaude-code-skill session-effort myproject max # Maximum capability, no token limit (Opus 4.6 only)\nclaude-code-skill session-effort myproject auto # Reset to default\n\n# Switch model mid-session\nclaude-code-skill session-model myproject opus\nclaude-code-skill session-model myproject sonnet\nclaude-code-skill session-model myproject gemini-pro\n\n# Start session with effort preset\nclaude-code-skill session-start myproject -d ~/project --effort high\n\n# Model aliases (built-in: opus, sonnet, haiku, gemini-flash, gemini-pro)\n# Custom aliases via --model-overrides\nclaude-code-skill session-start myproject -d ~/project \\\n --model-overrides '{\"fast\":\"gemini-2.0-flash\",\"smart\":\"claude-opus-4-5\"}'\n```\n\n#### Cost Tracking\n\n```bash\n# Show cost breakdown for a session\nclaude-code-skill session-cost myproject\n# → Model: claude-opus-4-5\n# → Tokens in: 12,345 | out: 3,456 | cached: 8,901\n# → Breakdown: Input $0.0103 | Cached $0.0033 | Output $0.0518\n# → 💰 Total: $0.0654\n```\n\n#### Branching\n\n```bash\n# Branch a session (fork + optional model/effort change)\nclaude-code-skill session-branch myproject experiment\nclaude-code-skill session-branch myproject fast-branch --model sonnet --effort low\n\n# Branch preserves full conversation history from parent\n# Both parent and branch continue independently\n```\n\n#### Hooks (Webhook Callbacks)\n\n```bash\n# List available hooks\nclaude-code-skill session-hooks myproject\n\n# Register webhook URLs for events\nclaude-code-skill session-hooks myproject \\\n --on-tool-error http://localhost:8080/webhook \\\n --on-context-high http://localhost:8080/webhook \\\n --on-stop http://localhost:8080/webhook\n\n# Available hooks:\n# onToolError — a tool call failed\n# onContextHigh — context usage exceeded 70%\n# onStop — session stopped (includes cost summary)\n# onTurnComplete — each turn finished (includes usage)\n# onStopFailure — API error (rate limit, auth failure)\n```\n\n#### Config Files\n\n```bash\n# Load session config from JSON file\nclaude-code-skill session-start myproject --config agent.json\n\n# agent.json example:\n# {\n# \"cwd\": \"~/project\",\n# \"permissionMode\": \"acceptEdits\",\n# \"allowedTools\": [\"Bash\", \"Read\", \"Edit\", \"Write\"],\n# \"effort\": \"high\",\n# \"maxBudget\": \"5.00\",\n# \"modelOverrides\": { \"fast\": \"gemini-2.0-flash\" },\n# \"appendSystemPrompt\": \"Always write tests\"\n# }\n```\n\n#### Context Management\n\n```bash\n# Compact session to reclaim context window\nclaude-code-skill session-compact myproject\n\n# Compact with custom summary\nclaude-code-skill session-compact myproject --summary \"Finished auth refactor, now on tests\"\n\n# Check context usage\nclaude-code-skill session-context myproject\n```\n\n### Session History & Search\n\n```bash\n# Browse all Claude Code sessions\nclaude-code-skill sessions -n 20\n\n# Search sessions by project\nclaude-code-skill session-search --project ~/myapp\n\n# Search by time\nclaude-code-skill session-search --since \"2h\"\nclaude-code-skill session-search --since \"2024-02-01\"\n\n# Search by query\nclaude-code-skill session-search \"bug fix\"\n\n# Resume a historical session\nclaude-code-skill resume <session-id> \"Continue where we left off\" -d ~/project\n```\n\n### Batch Operations\n\n```bash\n# Read multiple files at once\nclaude-code-skill batch-read \"src/**/*.ts\" \"tests/**/*.test.ts\" -p ~/project\n```\n\n## 🤝 Agent Team Features\n\nDeploy multiple Claude agents working together on complex tasks.\n\n### Basic Agent Team\n\n```bash\n# Define a team of agents\nclaude-code-skill session-start team-project -d ~/project \\\n --agents '{\n \"architect\": {\n \"description\": \"Designs system architecture\",\n \"prompt\": \"You are a senior software architect. Design scalable, maintainable systems.\"\n },\n \"developer\": {\n \"description\": \"Implements features\",\n \"prompt\": \"You are a full-stack developer. Write clean, tested code.\"\n },\n \"reviewer\": {\n \"description\": \"Reviews code quality\",\n \"prompt\": \"You are a code reviewer. Check for bugs, style issues, and improvements.\"\n }\n }' \\\n --agent architect\n\n# Switch between agents mid-conversation\nclaude-code-skill session-send team-project \"Design the authentication system\"\n# (architect responds)\n\nclaude-code-skill session-send team-project \"@developer implement the design\"\n# (developer agent takes over)\n\nclaude-code-skill session-send team-project \"@reviewer review the implementation\"\n# (reviewer agent takes over)\n```\n\n### Pre-configured Team Templates\n\n```bash\n# Code review team\nclaude-code-skill session-start review -d ~/project \\\n --agents '{\n \"security\": {\"prompt\": \"Focus on security vulnerabilities\"},\n \"performance\": {\"prompt\": \"Focus on performance issues\"},\n \"quality\": {\"prompt\": \"Focus on code quality and maintainability\"}\n }' \\\n --agent security\n\n# Full-stack team\nclaude-code-skill session-start fullstack -d ~/project \\\n --agents '{\n \"frontend\": {\"prompt\": \"React/TypeScript frontend specialist\"},\n \"backend\": {\"prompt\": \"Node.js/Express backend specialist\"},\n \"database\": {\"prompt\": \"PostgreSQL/Redis database specialist\"}\n }' \\\n --agent frontend\n```\n\n## 🔧 Advanced Features\n\n### Tool Control\n\n```bash\n# Allow specific tools with patterns\n--allowed-tools \"Bash(git:*,npm:*),Read,Edit\"\n\n# Deny dangerous operations\n--disallowed-tools \"Bash(rm:*,sudo:*),Write(/etc/*)\"\n\n# Limit to specific tool set\n--tools \"Read,Glob,Grep\"\n\n# Disable all tools\n--tools \"\"\n```\n\n### System Prompts\n\n```bash\n# Replace system prompt completely\n--system-prompt \"You are a Python expert. Always use type hints.\"\n\n# Append to existing prompt\n--append-system-prompt \"Always run tests after changes.\"\n```\n\n### Session Management\n\n```bash\n# Resume with fork (create a branch)\n--resume <session-id> --fork-session\n\n# Use custom UUID for session\n--session-id \"550e8400-e29b-41d4-a716-446655440000\"\n\n# Add additional working directories\n--add-dir \"/var/log,/tmp/workspace\"\n```\n\n### Multi-Model Support (Proxy)\n\nUse `--base-url` to route requests through a proxy, enabling other models (Gemini, GPT) to power Claude Code:\n\n```bash\n# Use Gemini via claude-code-proxy\nclaude-code-skill session-start gemini-task -d ~/project \\\n --base-url http://127.0.0.1:8082 \\\n --model claude-3-5-sonnet-20241022 # Proxy will map to Gemini\n\n# Use GPT via proxy\nclaude-code-skill session-start gpt-task -d ~/project \\\n --base-url http://127.0.0.1:8082 \\\n --model claude-3-haiku-20240307 # Proxy will map to GPT\n```\n\n**Note:** Requires `claude-code-proxy` running on port 8082 with proper API keys configured.\n\n```bash\n# Start the proxy\ncd ~/clawd/claude-code-proxy && source .venv/bin/activate\nuvicorn server:app --host 127.0.0.1 --port 8082\n```\n\n## 🎓 Best Practices\n\n### For SolanaOS Agents\n\n1. **Always use persistent sessions for multi-step tasks**\n ```bash\n # ❌ Bad: Multiple disconnect/reconnect cycles\n claude-code-skill bash \"step1\"\n claude-code-skill bash \"step2\"\n\n # ✅ Good: Single persistent session\n claude-code-skill session-start task -d ~/project\n claude-code-skill session-send task \"Do step1 then step2\"\n ```\n\n2. **Use `--stream` for long-running tasks**\n ```bash\n claude-code-skill session-send task \"Run full test suite\" --stream\n ```\n\n3. **Set budget limits for safety**\n ```bash\n --max-budget 2.00 # Stop after $2 of API usage\n ```\n\n4. **Use plan mode for critical changes**\n ```bash\n --permission-mode plan # Preview before applying\n ```\n\n5. **Fork before experiments**\n ```bash\n claude-code-skill session-fork main experimental\n claude-code-skill session-send experimental \"Try risky refactor\"\n ```\n\n### Error Recovery\n\n```bash\n# If session fails:\nclaude-code-skill session-status myproject # Check what happened\nclaude-code-skill session-history myproject -n 20 # See recent events\nclaude-code-skill session-restart myproject # Restart from last good state\n\n# If you need to start over:\nclaude-code-skill session-stop myproject\nclaude-code-skill session-start myproject -d ~/project --resume <old-session-id>\n```\n\n## 🏗️ Architecture\n\n```\nsolanaos agent\n ↓\nclaude-code-skill CLI (this tool)\n ↓ HTTP\nbackend-api API (:18795)\n ↓ MCP\nclaude mcp serve (Claude Code)\n ↓\nYour files & tools\n```\n\n## 🔌 Available Tools (via MCP)\n\nAll Claude Code tools are accessible:\n\n| Tool | Description |\n|------|-------------|\n| Bash | Execute shell commands |\n| Read | Read file contents |\n| Write | Create/overwrite files |\n| Edit | Edit files with string replacement |\n| Glob | Find files by pattern |\n| Grep | Search file contents |\n| Task | Launch sub-agents |\n| WebFetch | Fetch web content |\n| WebSearch | Search the web |\n| Git* | Git operations |\n| AskUserQuestion | Interactive prompts |\n| ... | and 10+ more |\n\n## 📊 Examples\n\n### Example 1: Code Review\n\n```bash\nclaude-code-skill session-start review -d ~/myapp \\\n --permission-mode plan \\\n --agents '{\"security\":{\"prompt\":\"Focus on security\"},\"quality\":{\"prompt\":\"Focus on quality\"}}' \\\n --agent security\n\nclaude-code-skill session-send review \\\n \"Review all TypeScript files in src/, check for security issues and code quality problems\" \\\n --stream\n```\n\n### Example 2: Automated Testing\n\n```bash\nclaude-code-skill session-start test -d ~/myapp \\\n --allowed-tools \"Bash(npm:*,git:*),Read,Write\" \\\n --max-budget 1.00\n\nclaude-code-skill session-send test \\\n \"Find all untested functions, write unit tests, run tests, fix failures\"\n```\n\n### Example 3: Multi-Agent Debugging\n\n```bash\nclaude-code-skill session-start debug -d ~/myapp \\\n --agents '{\n \"detective\": {\"prompt\": \"Find the root cause of bugs\"},\n \"fixer\": {\"prompt\": \"Implement fixes\"},\n \"tester\": {\"prompt\": \"Verify fixes work\"}\n }' \\\n --agent detective\n\nclaude-code-skill session-send debug \"We have a memory leak in the API server\" --stream\n# Detective investigates, then hands off to fixer, then to tester\n```\n\n## 🔗 Integration with SolanaOS\n\nWhen solanaos needs to perform complex coding tasks:\n\n```bash\n# From within solanaos agent context:\nsolanaos skills run claude-code-skill -- session-start task -d ~/project\nsolanaos skills run claude-code-skill -- session-send task \"Implement feature X\" --stream\nsolanaos skills run claude-code-skill -- session-status task\n```\n\nOr use the skill programmatically via backend-api HTTP API (see TOOLS.md section 3).\n\n## 📖 See Also\n\n- **TOOLS.md section 3** - Full HTTP API documentation\n- **backend-api endpoints** - Backend integration details\n- **Claude Code docs** - Official Claude Code documentation (query via `qmd` tool)\n" |
| #25 | } |
| #26 |