coding-agent

Delegate coding tasks to Codex, Claude Code, Pi, or OpenCode agents via background bash processes. Supports four coding agents (Codex, Claude Code, Pi, OpenCode) with agent-specific execution modes: PTY required for Codex/Pi/OpenCode; Claude Code uses --print --permission-mode bypassPermissions without PTY Background execution with session monitoring via process tool actions (log, poll, write, submit, kill) for long-running tasks Designed for feature building, PR reviews, refactoring, and iterative coding with file exploration; includes patterns for parallel issue fixing using git worktrees Requires git repository for Codex (use temp init for scratch work); respects workdir isolation to prevent unrelated file access

INSTALLATION
npx skills add https://github.com/steipete/clawdis --skill coding-agent
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$2a

Append this shape to every worker prompt with real values:

Notification route:

- channel: <notifyChannel>

- target: <notifyTarget>

- account: <notifyAccount or omit>

- reply_to: <notifyReplyTo or omit>

- thread_id: <notifyThreadId or omit>

When finished, send exactly one completion or failure message using:

openclaw message send --channel <channel> --target '<target>' --message '<brief result>'

Add --account, --reply-to, or --thread-id only when present above.

Do not use openclaw system event or heartbeat.

If no trustworthy route exists, say completion auto-notify is unavailable.

Launch forms

Write the worker prompt to a temp file first. This avoids shell quoting bugs when the required notification block contains quotes or newlines.

PROMPT=$(mktemp -t openclaw-worker-prompt.XXXXXX)

cat >"$PROMPT" <<'EOF'

Task.

<notification block>

EOF

printf 'prompt file: %s\n' "$PROMPT"

Use $PROMPT when launching from the same shell/session. If using a separate tool call, substitute the printed path.

Codex:

bash pty:true background:true workdir:/path/repo command:"codex exec - < \"$PROMPT\""

Claude Code:

bash background:true workdir:/path/repo command:"claude --permission-mode bypassPermissions --print < \"$PROMPT\""

OpenCode:

bash pty:true background:true workdir:/path/repo command:"opencode run < \"$PROMPT\""

Pi:

bash pty:true background:true workdir:/path/repo command:"pi -p \"$(cat \"$PROMPT\")\""

Long issue-to-PR work

  • Create/reuse a GitHub issue as durable spec.
  • Include issue URL, repo, base branch, expected PR, proof, and notification route.
  • Tell worker to branch, implement, test, run review until no accepted actionable findings, open PR.
  • Return issue URL and sessionId immediately.
  • Monitor with process; cancel through Task Registry if mirrored there.

Scratch Codex

Codex needs a trusted git repo:

SCRATCH=$(mktemp -d)

git -C "$SCRATCH" init

PROMPT=$(mktemp -t openclaw-worker-prompt.XXXXXX)

cat >"$PROMPT" <<'EOF'

Build X.

<notification block>

EOF

printf 'prompt file: %s\n' "$PROMPT"

bash pty:true background:true workdir:$SCRATCH command:"codex exec - < \"$PROMPT\""

Process actions

  • list: running/recent sessions.
  • poll: status.
  • log: output.
  • submit: send input + Enter.
  • write: raw stdin.
  • paste: paste text.
  • kill: terminate.

Status to user

  • Say what started, where, and sessionId.
  • Update only on milestone, worker question, error, user action needed, or finish.
  • If killed, say why.
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card