From a6afccf123af543817d05901807a14ab65fc8c56 Mon Sep 17 00:00:00 2001 From: Hoid Date: Sat, 14 Feb 2026 11:00:43 +0000 Subject: [PATCH] Update iso-bot skill with Claude Code workflow --- bin/claude-code | 19 +++++++++++++++++++ projects/iso-bot | 2 +- skills/iso-bot/SKILL.md | 29 ++++++++++++++++++++++++++--- 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100755 bin/claude-code diff --git a/bin/claude-code b/bin/claude-code new file mode 100755 index 0000000..59788a1 --- /dev/null +++ b/bin/claude-code @@ -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 "$@" diff --git a/projects/iso-bot b/projects/iso-bot index 80ba9b1..67f2e55 160000 --- a/projects/iso-bot +++ b/projects/iso-bot @@ -1 +1 @@ -Subproject commit 80ba9b1b906cd73d361136889c38cfb616302929 +Subproject commit 67f2e5536aba342d3108cecdac29d3839cbd6dac diff --git a/skills/iso-bot/SKILL.md b/skills/iso-bot/SKILL.md index eeb3cdf..2526aae 100644 --- a/skills/iso-bot/SKILL.md +++ b/skills/iso-bot/SKILL.md @@ -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