Update iso-bot skill with Claude Code workflow
This commit is contained in:
parent
5d5bdffea6
commit
a6afccf123
3 changed files with 46 additions and 4 deletions
19
bin/claude-code
Executable file
19
bin/claude-code
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
# Wrapper that sets ANTHROPIC_API_KEY from OpenClaw's auth config
|
||||
export ANTHROPIC_API_KEY=$(python3 -c "
|
||||
import json
|
||||
with open('/home/openclaw/.openclaw/agents/main/agent/auth-profiles.json') as f:
|
||||
data = json.load(f)
|
||||
for key, profile in data.get('profiles', {}).items():
|
||||
if 'anthropic' in key:
|
||||
print(profile.get('token', ''))
|
||||
break
|
||||
" 2>/dev/null)
|
||||
|
||||
if [ -z "$ANTHROPIC_API_KEY" ]; then
|
||||
echo "Error: Could not extract Anthropic API key from auth-profiles.json"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
exec claude "$@"
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 80ba9b1b906cd73d361136889c38cfb616302929
|
||||
Subproject commit 67f2e5536aba342d3108cecdac29d3839cbd6dac
|
||||
|
|
@ -59,9 +59,32 @@ All game logic is behind interfaces in `pkg/plugin/plugin.go`:
|
|||
- Feature branches → main
|
||||
- Always commit and push after changes
|
||||
|
||||
## Sub-Agent Settings
|
||||
When spawning sub-agents for this project, use generous timeouts. Estimate per task — no fixed limits. Use `runTimeoutSeconds` proportional to complexity (e.g., 300 for docs, 3600+ for large multi-file implementations). Don't let timeouts cut work short.
|
||||
- Model: `anthropic/claude-sonnet-4-20250514` (good balance of speed and quality for code)
|
||||
## Development Workflow — Claude Code
|
||||
|
||||
**For all coding tasks, use Claude Code CLI instead of sub-agents.** Claude Code can iterate (edit → build → see errors → fix), unlike one-shot sub-agents.
|
||||
|
||||
**Wrapper script:** `/home/openclaw/.openclaw/workspace/bin/claude-code`
|
||||
- Auto-injects Anthropic API key from OpenClaw's auth config
|
||||
- Adds Go to PATH
|
||||
|
||||
**How to run a coding task:**
|
||||
```bash
|
||||
cd /home/openclaw/.openclaw/workspace/projects/iso-bot
|
||||
/home/openclaw/.openclaw/workspace/bin/claude-code -p "your task description here" --allowedTools "Edit,Write,Bash" --max-turns 50
|
||||
```
|
||||
|
||||
**Use `exec` with `pty=true`** for interactive Claude Code sessions.
|
||||
|
||||
**Project has `CLAUDE.md`** at repo root with full project context.
|
||||
|
||||
**When to use what:**
|
||||
- **Claude Code** → all coding tasks (features, fixes, refactors)
|
||||
- **Sub-agents (`sessions_spawn`)** → research, analysis, non-coding tasks
|
||||
- **Direct edits** → small single-file changes
|
||||
|
||||
## Sub-Agent Settings (for non-coding tasks)
|
||||
When spawning sub-agents for research/analysis, use generous timeouts. Estimate per task.
|
||||
- Model: `anthropic/claude-sonnet-4-20250514`
|
||||
|
||||
## Git Workflow
|
||||
```bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue