Install
openclaw skills install coding-leadCoding execution skill for any implementation-focused agent. Current production path is claude-only with simple tasks direct, medium tasks preferring ACP run...
openclaw skills install coding-leadThis is a coding execution skill for any agent that owns implementation work. It defines how coding work runs, not who should own the task. In multi-agent teams, routing may be handled elsewhere; in single-agent use, this skill still works directly.
Route by complexity. Current production path is claude-only. Do not depend on ACP session persistence in IM threads; use direct execution, direct acpx, and existing implementation session continuity instead.
| Level | Criteria | Action |
|---|---|---|
| Simple | Single file, <60 lines, clear local scope | Direct: read/write/edit/exec |
| Medium | 2-5 files, clear scope, likely follow-up questions | Prefer Claude ACP mode:"run" or direct acpx → fallback direct |
| Complex | Multi-module, architecture, needs continuity | Use existing implementation session continuity + context files + direct acpx/direct execution |
When in doubt, go one level up.
run) when available; otherwise direct acpxsession the default pathruntime.type: "acp" in openclaw.json): use sessions_spawn(runtime="acp"), may include streamTo="parent"sessions_spawn(runtime="subagent"), never include streamToruntime.type: "acp", use ACP; otherwise use subagent| Layer | Preferred | Fallback |
|---|---|---|
| Backend | PHP (Laravel/ThinkPHP) | Python |
| Frontend | Vue.js | React |
| Mobile | Flutter | UniApp-X |
| CSS | Tailwind | - |
| DB | MySQL | PostgreSQL |
Existing projects: follow current stack. New: propose first, wait for confirmation.
All tools are optional. Detect once per session:
| Tool | Check | Fallback |
|---|---|---|
| smart-agent-memory | node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js stats ok? | memory_search + manual .md writes |
| qmd | qmd --version ok? | grep (Linux/macOS) / Select-String (Windows) / find |
| ACP | See ACP detection below | Direct read/write/edit/exec |
Notation: [memory] [qmd] [acp] = use if available, fallback if not.
Run once per session, stop at first success:
sessions_spawn (timeout: 30s)sessions_spawn(runtime: "acp", agentId: "claude", task: "say hello", mode: "run", runTimeoutSeconds: 30)
Preferred in OpenClaw because it cleanly supports both:
mode: "run" for one-shot coding tasksmode: "session" for persistent long-context coding threadsACP_MODE = "spawn". Done.# Detect acpx path (OS-dependent)
# Windows: %APPDATA%\npm\node_modules\openclaw\extensions\acpx\node_modules\.bin\acpx.cmd
# macOS/Linux: $(npm root -g)/openclaw/extensions/acpx/node_modules/.bin/acpx
# Use exec with timeout
acpx claude exec "say hello" # timeout 30s
ACP_MODE = "acpx". Done.ACP_MODE = "direct". Agent executes all coding tasks directly with read/write/edit/exec. Load team standards (see Coding Standards below).
Set a session variable (mental note): ACP_MODE = "spawn" | "acpx" | "direct"
Current supported ACP coding agent: claude only.
Apply rules in this order:
If the same topic appears in multiple places, follow the highest-priority source above and simplify the lower-priority wording instead of combining conflicting chains.
Context files exist to preserve continuity across the current code chain, but they must stay tidy.
<project>/.openclaw/context-<task-slug>.md.openclaw/archive/ if it has durable follow-up valueRecommended pattern:
<project>/.openclaw/context-<task-slug>.mdProjects may have their own CLAUDE.md, .cursorrules, docs/ — these are Claude Code's responsibility. It reads them automatically. Do NOT paste project-level rules into ACP prompts.
shared/knowledge/tech-standards.md — cross-project standards (security, change control, tech stack preferences). Only relevant for direct execution (simple tasks without ACP).
Load standards once per session, first match wins:
shared/knowledge/tech-standards.md (team-level, if exists)Write to <project>/.openclaw/context-<task-id>.md (ACP reads from disk, not from prompt):
# [qmd] or grep: find relevant code
# [memory] recall + lessons: find past decisions
# Standards already loaded (see "Coding Standards Loading" above)
# Write context file with 3-5 key rules from loaded standards — do NOT paste full file
Minimal context file structure:
# Task Context: <id>
## Project — path, stack, architecture style
## Relevant Code — file paths + brief descriptions from qmd/grep
## History — past decisions/lessons from memory (if any)
## Long-term Knowledge Boundary — durable facts or decisions worth preserving outside this file; if none, say "none"
## Constraints — task-specific rules only (NOT general coding standards — Claude Code has CLAUDE.md)
Full template with examples → see references/prompt-templates.md
Use the smallest prompt that still preserves correctness. Start with the task and acceptance criteria. Add only the minimum extra header needed for the run to be unambiguous.
Project: <path> | Stack: <e.g. Laravel 10 + React 18 + TS>
Context file: .openclaw/context-<task-id>.md (read it first if it exists)
## Task
<description>
## Acceptance Criteria
- [ ] <criteria>
- [ ] Tests pass, no unrelated changes, clean code
Before finishing: run linter + tests, include results.
When done: openclaw system event --text "Done: <summary>" --mode now
# ACP_MODE = "spawn", medium task:
sessions_spawn(runtime: "acp", agentId: "claude", task: <prompt>, cwd: <project-dir>, mode: "run")
# Complex task primary path:
Use the existing implementation session + context file + serial follow-ups.
If ACP is helpful, prefer bounded Claude `run` invocations or direct acpx commands inside the project directory.
# ACP_MODE = "acpx":
exec: cd <project-dir> && acpx claude exec "<prompt>"
# ACP_MODE = "direct":
Skip spawn, execute directly with read/write/edit/exec
| Condition | Action |
|---|---|
| Spawn failed / timeout | → Direct execution |
| Empty output / no file changes | → Direct execution |
| Partial completion | → Agent fixes remaining |
Fallback: [memory] log failure → agent executes directly → report to user.
Never silently fail. Always complete or report why not.
Read references/complex-tasks.md only for Complex-level tasks — roles, QA isolation, parallel strategies, RESEARCH→PLAN→EXECUTE→REVIEW flow.
run: cheaper than opening a persistent session[memory] Before: recall related work + lessons for context file. [memory] After: record what changed, decisions made, lessons learned. Cross-session: agent remembers across sessions; Claude Code doesn't. This is the core advantage.
Parallelism is allowed in the current production path, but only with explicit boundaries.
Recommended shape:
run, direct acpx, or direct execution)Good parallel cases:
run while direct tasks proceed elsewhereBad parallel cases:
See references/prompt-templates.md for multi-project examples.
Start → 1 short message. Error → immediate report. Completion → summary. Fallback → explain.
cwd explicitly to the project directory