当前位置: 首页 > Skill >

OpenClaw Coding Agent Playbook

OpenClaw Coding Agent Playbook

OpenClaw Coding Agent Playbook

在 Bash 中安全启动、后台监控并提供仓库隔离审查工作流,将编码任务委托给 Codex、Claude Code、Pi 或 OpenCode。

0.1.1 2026.11.27 136
获取Skill文件查看使用说明
作 者:苏川 许可证: 更新时间:2026.11.27
本文目录展开

Coding Agent

Use this skill when you need another coding agent to implement or review changes in a repository.

Use this for

  • Building features that need multi-file edits.
  • Large refactors where you want parallel workstreams.
  • PR review or issue triage in an isolated checkout.
  • Repeatable "run/fix/verify" loops that benefit from background execution.

Do not use this for

  • Tiny one-line edits you can apply directly.
  • Read-only code lookup tasks.
  • Work inside ~/.openclaw for external repo reviews.

Execution mode matrix

  • Codex: use pty:true.
  • Pi: use pty:true.
  • OpenCode: use pty:true.
  • Claude Code: use --print --permission-mode bypassPermissions (no PTY required).

Examples:

# Codex (PTY required)
bash pty:true workdir:~/project command:"codex exec --full-auto 'Add request timeout handling to API client and update tests.'"

# Claude Code (print mode, no PTY required)
bash workdir:~/project command:"claude --permission-mode bypassPermissions --print 'Refactor auth middleware and explain risk areas.'"

# OpenCode (PTY required)
bash pty:true workdir:~/project command:"opencode run 'Add retry/backoff for webhook delivery.'"

# Pi (PTY required)
bash pty:true workdir:~/project command:"pi 'Fix failing Vitest suite in src/api and keep behavior unchanged.'"

Background session pattern

# Start
bash pty:true workdir:~/project background:true command:"codex exec --full-auto 'Implement issue #142 and run tests.'"

# Monitor output
process action:log sessionId:XXX

# Check running state
process action:poll sessionId:XXX

# Reply when prompted
process action:submit sessionId:XXX data:"yes"

# Stop session
process action:kill sessionId:XXX

Safe review workflow

Never run PR review in your live OpenClaw repo. Use a temp clone or a worktree.

# Temp clone review
REVIEW_DIR=$(mktemp -d)
git clone https://github.com/org/repo.git "$REVIEW_DIR"
cd "$REVIEW_DIR" && gh pr checkout 130
bash pty:true workdir:"$REVIEW_DIR" command:"codex review --base origin/main"

# Worktree review
git worktree add /tmp/pr-130-review pr-130-branch
bash pty:true workdir:/tmp/pr-130-review command:"codex review --base main"

Prompt template for long tasks

Task:
- [clear scope]
- [constraints]
- [required checks]

When finished:
1) Summarize changed files and why.
2) Report test/lint commands and outcomes.
3) Run:
openclaw system event --text "Done: [brief result]" --mode now

Failure recovery checklist

  • If output stalls, poll once before killing.
  • If agent asks for missing context, answer directly and continue the same session.
  • If the session dies early, relaunch with a tighter prompt and explicit file scope.
  • If multiple retries fail, switch to a fresh worktree to remove local state noise.

Rules

  1. Match the user-requested agent when explicitly specified.
  2. Keep each session scoped to one repository and one objective.
  3. Prefer --full-auto for implementation and conservative flags for review.
  4. Send user updates at start, major milestones, blockers, and completion.
  5. Do not silently take over coding work when orchestration mode was requested.

相关文章

更多
generate-design 上手指南:配置 Stitch MCP 生成与修改界面

本文介绍如何通过 OpenCode 的 generate-design 技能调用 Stitch MCP 服务进行界面生成与修改。内容涵盖提示词编写规范、OpenCode 本地安装步骤、MCP 服务端点配置及常见排错方法,帮助开发者快速打通从任务描述到界面输出的完整流程。

2026.11.05 207
Skill 文件
  • SKILL.md
    • Coding Agent
    • Use this for
    • Do not use this for
    • Execution mode matrix
    • Background session pattern
    • Safe review workflow
    • Prompt template for long tasks
    • Failure recovery checklist
    • Rules
  • 项目或源文件

相关 Skill

更多
Development Coding Agent Development Coding Agent 提升的编码代理,面向开发工作流,针对功能开发、bug 修复和代码重构进行优化,集成 OpenCode。
Hermes Code Bridge Hermes Code Bridge 用于将 Hermes Agent 连接到本地编码 CLI,如 Codex、Kimi Code、Claude Code、OpenCode、Gemini CLI 等终端编码助手。
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。