skills/claude-code-orchestration/SKILL.md
Skill for orchestrating Claude Code sessions from OpenClaw. Covers launching, monitoring, multi-turn interaction, lifecycle management, notifications, and parallel work patterns.
npx skillsauth add alizarion/openclaw-claude-code-plugin Claude Code OrchestrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You orchestrate Claude Code sessions via the openclaw-claude-code-plugin. Each session is an autonomous agent that executes code tasks in the background.
agentChannels config. Do NOT pass channel manually — it bypasses automatic routing.multi_turn: true unless the task is a guaranteed one-shot with no possible follow-up.name in kebab-case, short and descriptive.workdir to the target project directory, not the agent's workspace.| Parameter | When to use |
|---|---|
| prompt | Always. Clear and complete instruction. |
| name | Always. Descriptive kebab-case (fix-auth-bug, add-dark-mode). |
| channel | Do NOT pass. Resolved automatically via agentChannels. |
| workdir | Always when the project is not in the defaultWorkdir. |
| multi_turn | true by default unless explicitly one-shot. |
| max_budget_usd | Adjust accordingly: 1-2 for a small fix, 5 for a feature, 10+ for a major refactoring. |
| model | When you want to force a specific model ("sonnet", "opus"). |
| system_prompt | To inject project-specific context. |
| permission_mode | "bypassPermissions" by default. "acceptEdits" for more control. |
# Simple task
claude_launch(
prompt: "Fix the null pointer in src/auth.ts line 42",
name: "fix-null-auth",
workdir: "/home/user/projects/myapp",
multi_turn: true,
max_budget_usd: 2
)
# Full feature
claude_launch(
prompt: "Implement dark mode toggle in the settings page. Use the existing theme context in src/context/theme.tsx. Add a toggle switch component and persist the preference in localStorage.",
name: "add-dark-mode",
workdir: "/home/user/projects/myapp",
multi_turn: true,
max_budget_usd: 5
)
# Major refactoring
claude_launch(
prompt: "Refactor the database layer to use the repository pattern. Migrate all direct Prisma calls in src/services/ to use repositories in src/repositories/.",
name: "refactor-db-repositories",
workdir: "/home/user/projects/myapp",
multi_turn: true,
max_budget_usd: 10,
model: "opus"
)
# Resume a completed session
claude_launch(
prompt: "Continue. Also add error handling for the edge cases we discussed.",
resume_session_id: "fix-null-auth",
multi_turn: true
)
# Fork to try an alternative approach
claude_launch(
prompt: "Try a completely different approach: use middleware instead of decorators.",
resume_session_id: "refactor-db-repositories",
fork_session: true,
name: "refactor-db-middleware-approach",
multi_turn: true
)
# All sessions
claude_sessions()
# Only running sessions
claude_sessions(status: "running")
# Completed sessions (for resume)
claude_sessions(status: "completed")
# Summary (last 50 lines)
claude_output(session: "fix-null-auth")
# Full output (up to 200 blocks)
claude_output(session: "fix-null-auth", full: true)
# Specific last N lines
claude_output(session: "fix-null-auth", lines: 100)
# Switch to foreground (displays catchup of missed outputs + live stream)
claude_fg(session: "fix-null-auth")
# Switch back to background (stops the stream, session continues)
claude_bg(session: "fix-null-auth")
# Detach all foreground sessions from a channel
claude_bg()
Note: claude_fg first displays a catchup "Catchup (N missed outputs):" with everything that happened in the background, then starts live streaming.
# Reply to a Claude question
claude_respond(session: "add-dark-mode", message: "Yes, use CSS variables for the theme colors.")
# Redirect a running session (interrupts the current turn)
claude_respond(session: "add-dark-mode", message: "Stop. Use Tailwind dark: classes instead of CSS variables.", interrupt: true)
Auto-respond immediately with claude_respond:
"Yes, proceed.""Yes, continue.""Use your best judgment."Forward to the user:
openclaw system event arrives when the session is waiting for inputclaude_output(session, full: true)claude_respond(session, answer)claude_respondclaude_kill(session: "fix-null-auth")
Use when:
idleTimeoutMinutes (default: 30 min)When a session completes (completion wake event):
claude_output(session: "xxx", full: true) to read the resultNotifications are routed automatically based on the session's workdir using the agentChannels plugin config. Each workspace directory maps to a specific channel (e.g., telegram:seo-bot:123456789). See Agent Channels for setup.
| Event | What happens |
|---|---|
| Session starts | Silent |
| Session in foreground | Real-time stream (text debounced 500ms + tool indicators) |
| Session completed | Notification to the originating channel |
| Session failed | Error notification to the originating channel |
| Waiting for input | openclaw system event to wake the orchestrator + "Claude asks:" in the channel |
| Response sent | "Responded:" echo in the channel |
| Session > 10 min | One-shot reminder |
| Session limit reached | Notification to the channel |
Even without foreground, the user sees in their chat:
Claude asks: when Claude asks a questionResponded: when a follow-up is sentThis makes the conversation transparent without needing foregrounding.
agentChannels is configured for this workdir -> notifications arrivemulti_turn: true -> interaction is possible after launchname is descriptive -> easy to identify in claude_sessionsworkdir points to the correct project -> Claude Code works in the right directorymax_budget_usd is calibrated -> no waste# Launch multiple sessions on independent tasks
claude_launch(prompt: "Build the frontend auth page", name: "frontend-auth", workdir: "/app/frontend", multi_turn: true, max_budget_usd: 5)
claude_launch(prompt: "Build the backend auth API", name: "backend-auth", workdir: "/app/backend", multi_turn: true, max_budget_usd: 5)
maxSessions limit (default: 5)namefork_session: true) if you want to try a different approach without losing contextWhen a session completes:
claude_output(session, full: true)| Anti-pattern | Consequence | Fix |
|---|---|---|
| Passing channel explicitly | Bypasses automatic routing, notifications may go to wrong bot | Let agentChannels handle routing automatically |
| Forgetting multi_turn: true | Unable to send follow-ups with claude_respond | Enable multi_turn except for explicit one-shots |
| Not checking the result of a completed session | The user doesn't know what happened | Always read claude_output and summarize |
| Launching too many sessions in parallel | maxSessions limit reached, sessions rejected, diluted attention | Respect the limit, prioritize, sequence if necessary |
| Using the agent's workdir instead of the project's | Claude Code works in the wrong directory | Always point to the target project directory |
| Not naming sessions | Hard to identify them in claude_sessions | Always use name in kebab-case |
| Auto-responding to critical questions | Decisions made without the user's approval | When in doubt, forward to the user |
| Ignoring wake events | Sessions stuck waiting indefinitely | Handle each wake event promptly |
| Not adjusting the budget | Waste (too high) or interruption (too low) | Calibrate max_budget_usd based on complexity |
| Tool | Usage | Key parameters |
|---|---|---|
| claude_launch | Launch a session | prompt, name, workdir, multi_turn, max_budget_usd |
| claude_sessions | List sessions | status (all/running/completed/failed) |
| claude_output | Read the output | session, full, lines |
| claude_fg | Foreground + live stream | session |
| claude_bg | Switch back to background | session |
| claude_kill | Kill a session | session |
| claude_respond | Send a follow-up | session, message, interrupt |
| claude_stats | Usage metrics | none |
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.