coding-agent
Delegate coding tasks to Codex, Claude Code, or Pi agents via background process. Use when: (1) building/creating new features or apps, (2) reviewing PRs (spawn in temp dir), (3) refactoring large codebases, (4) iterative coding that needs file exploration. NOT for: simple one-liner fixes (just edit), reading code (use read tool), thread-bound ACP harness requests in chat (for example spawn/run Codex or Claude Code in a Discord thread; use sessions_spawn with runtime:"acp"), or any work in ~/clawd workspace (never spawn agents here). Claude Code: use --print --permission-mode bypassPermissions (no PTY). Codex/Pi/OpenCode: pty:true required.
Install via CLI (Recommended)
clawhub install openclaw/openclaw/skills/coding-agentWhat This Skill Does
The Coding Agent skill is designed to offload complex coding tasks to specialized AI agents like Codex, Claude Code, or Pi. It operates via background processes, allowing for asynchronous execution of coding-related operations. This skill is your go-to for anything involving significant code manipulation, from initial feature development and application building to in-depth code reviews and large-scale refactoring. It also excels at iterative coding tasks that require exploring multiple files or directories. The agent leverages the power of bash for execution, offering flexibility through various parameters like pty for interactive sessions, workdir for scoped context, background for asynchronous tasks, timeout for process control, and elevated for host execution when permitted.
Installation
To install the Coding Agent skill, use the following command:
clawhub install openclaw/openclaw/skills/coding-agent
Use Cases
This skill is ideal for:
- Building New Features or Applications: Delegate the creation of new code modules, components, or entire applications.
- Reviewing Pull Requests (PRs): Spawn the agent in a temporary directory to analyze and provide feedback on code changes without affecting your current workspace.
- Refactoring Large Codebases: Undertake substantial code restructuring and optimization efforts efficiently.
- Iterative Coding with File Exploration: Engage in coding tasks that require navigating and understanding the context of multiple files.
Important Considerations:
- PTY Mode: Codex, Pi, and OpenCode require
pty:truefor interactive terminal applications. Claude Code (claudeCLI) does not require PTY and should use--print --permission-mode bypassPermissionsfor full tool access and to avoid interactive confirmations. - Workspace Restriction: Never spawn agents within your
~/clawdworkspace. Always use temporary directories or project-specific directories outside of this restricted area. - Simple Fixes: Avoid using this skill for trivial one-liner code edits; direct manual editing is more efficient.
- ACP Harness: For thread-bound ACP harness requests (e.g., spawning Codex in a Discord thread), use
sessions_spawnwithruntime:"acp"instead.
Example Prompts
bash pty:true workdir:/path/to/my/project command:"codex exec 'Implement user authentication using JWT in the Node.js backend'"bash background:true workdir:/tmp/review-pr-123 command:"claude --print --permission-mode bypassPermissions 'Review the changes in this PR for potential security vulnerabilities and suggest improvements.'"bash pty:true workdir:~/projects/legacy-app command:"pi exec 'Refactor the database connection module to use connection pooling'"
Tips & Limitations
- Background Execution: For long-running tasks, utilize the
background:trueparameter. This returns asessionIdthat can be used with process tool actions (list,poll,log,write,submit,send-keys,paste,kill) to monitor and manage the background session. - Temporary Directories: When reviewing PRs or experimenting, leverage
mktemp -dto create isolated temporary directories. Remember tocdinto them before executing commands. - Agent Specific Flags: Pay close attention to the specific flags required by each agent (e.g.,
pty:truefor Codex/Pi/OpenCode,--print --permission-mode bypassPermissionsfor Claude Code). - Security: Be mindful of the commands you execute, especially when using
elevated:true. Running agents in sandboxed environments or temporary directories is generally safer. - Code Execution: This skill inherently involves code execution. Ensure you understand the implications and potential risks, particularly when running commands with elevated privileges or in production environments.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-openclaw-coding-agent": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: code-execution, file-write, file-read
Related Skills
blogwatcher
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
obsidian
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
github
GitHub operations via `gh` CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: complex web UI interactions requiring manual browser flows (use browser tooling when available), bulk operations across many repos (script with gh api), or when gh auth is not configured.
openai-whisper-api
Transcribe audio via OpenAI Audio Transcriptions API (Whisper).
camsnap
Capture frames or clips from RTSP/ONVIF cameras.