coding-agent
できること
このスキルは、機能の構築、プルリクエストのレビュー、大規模なリファクタリングをバックグラウンドで行うために、Codex、Claude Code、OpenCodeなどのコーディングツールを起動する手順を、AIエージェントに示します。大きめのプログラミング作業を任せたい人のためのものです。
使う場面
- ✓大きな機能を、ほかの作業をしている間にバックグラウンドで構築させたいとき。
- ✓プルリクエストのレビューや大規模なリファクタリングを、コーディングツールに任せたいとき。
- ✓イシューを、コーディング用のワーカーによってプルリクエストにしたいとき。
スキルのリンク
https://github.com/openclaw/openclaw/blob/main/skills/coding-agent/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Codexに、新しいエクスポート機能をプロジェクトの別のコピーで構築させ、完了したら教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、選んだコーディングツールをバックグラウンドのプロセスで起動し、メインのプロジェクトから分離されたコピーで作業させます。進捗を監視し、ワーカーが完了または失敗したら報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Coding Agent
Use for background feature builds, PR reviews, large refactors, and issue-to-PR loops. Do not use for simple edits, read-only lookup, ACP thread-bound work, or any run inside ~/.openclaw, $OPENCLAW_STATE_DIR, or active OpenClaw state dirs.
Hard rules
- Always launch with
background:true. - Codex and OpenCode: use
pty:true. - Codex: never inherit ambient
CODEX_HOMEor the default~/.codex. Use a separately authenticated coding-agent home and scope it to each Codex command. - Claude Code: no PTY; use
claude --permission-mode bypassPermissions --print. - Capture a real notification route before spawning.
- Worker must send completion/failure via
openclaw message send. - Do not rely on heartbeat, system events, or notify-on-exit.
- Monitor with
process; do not kill slow workers without cause. - If user asked for a specific agent, use that agent.
- If worker fails/hangs, respawn or ask; do not silently hand-code instead.
- Never checkout branches or run background coding agents in
~/Projects/openclaw; use an isolated checkout. - Classify the source ref as trusted or untrusted before any checkout or worktree creation. Never materialize a contributor-controlled ref outside the repository's approved untrusted-PR sandbox/review workflow, and never launch a permission-bypassed worker in it.
- For tasks that modify a Git-backed project, prepare and verify the Git worktree before launch, then include the exact Git preparation block below in the worker prompt.
Mandatory Git preparation
Before launching Codex, Claude Code, or OpenCode for work that modifies a Git-backed project:
- Establish the intended target repository, then select its canonical remote. Prefer
upstreamwhen it exists and matches that target; otherwise verifyorigin. Resolve the selected remote's default branch dynamically. Determine the target base from an explicit task branch or authoritative existing-PR metadata; for other shared branches, prove the configured/tracked base or ask. Use the canonical default only for new work with no other specified base. Stop if the repository, remote, or target base cannot be proven. - Classify the source ref as trusted or untrusted before any checkout or worktree creation. For contributor-controlled refs, use the repository's approved untrusted-PR sandbox/review workflow, which must own ref materialization inside the sandbox, or stop. The remaining steps and launch forms are for trusted refs only.
- For trusted new work, run
git fetch --prune <canonical>immediately before creating a new isolated worktree and branch from<canonical>/<targetBaseBranch>. - For trusted new work, verify the worktree's initial
HEADequals the fetched target-base SHA. Record the canonical remote, canonical default branch, target base branch, base SHA, worktree path, and branch. - For a trusted existing PR or shared branch, fetch the canonical target base and source branch immediately before creating an isolated worktree from the fetched source branch. Record that source ref and starting SHA, report its divergence from the refreshed target base, and do not automatically rebase, merge, reset, force-push, or otherwise rewrite shared history.
- Launch the worker in the isolated worktree, never the primary checkout. For OpenClaw, the primary checkout under
~/Projects/openclawremains forbidden.
For tasks that modify a Git-backed project, append this block to the worker prompt with real values:
Git preparation (mandatory before edits):
- canonical remote: <canonicalRemote>
- canonical default branch: <canonicalDefaultBranch>
- target base branch: <targetBaseBranch>
- fetched target base SHA: <targetBaseSha>
- preparation mode: <new work | existing PR/shared branch>
- checkout trust: trusted
- prepared source ref: <canonicalRemote/targetBaseBranch | fetched trusted source ref>
- prepared start SHA: <preparedStartSha>
- isolated worktree: <worktreePath>
- working branch: <branch>
- preparation receipt: <new work: `git fetch --prune <canonicalRemote>` ran immediately before creation from `<canonicalRemote>/<targetBaseBranch>` | existing branch: the canonical target base and trusted source ref were fetched immediately before the worktree was created from `<preparedSourceRef>` at `<preparedStartSha>`>
Before editing, verify the current directory is the isolated worktree and its initial HEAD equals <preparedStartSha>. For new work, that SHA must equal <targetBaseSha>. Never edit the
よくある質問
メインのプロジェクトを直接編集しますか?
いいえ。作業は分離されたチェックアウトで行われ、メインのプロジェクトフォルダでは直接行いません。
簡単な編集にも使えますか?
いいえ。簡単な編集や読み取り専用のコードの確認は、直接行うほうが適しているため、このスキルは大きめの作業のためのものです。
ワーカーが止まってしまった場合はどうなりますか?
このスキルはワーカーを監視し、再起動するか、あなたに確認します。黙って自分で作業を行うことはありません。
詳細
作者による元の説明
Delegate coding work to Codex, Claude Code, or OpenCode as background workers; not simple edits or read-only code lookup.
repo: openclaw/openclaw
人気
- GitHubのスター
- 394k
- ランキング
- #49
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
discord-user-post
394kエージェントが、承認済みのお知らせをDiscordのデスクトップアプリからあなたとして投稿できるよう支援します。投稿前に正確なチャンネルを確認します。
discrawl
394k保存済みのローカルなDiscordメッセージのアーカイブを検索して要約し、その新しさを確認し、ダイレクトメッセージを読めるようエージェントを支援します。
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
graincrawl
394k保存されたGranolaのミーティングメモとトランスクリプトを検索し、その新しさを確認して、一定期間の件数を数えるようエージェントを支援します。
似ているスキル
executing-plans
311k書かれた実装計画を、現在のセッションの中で段階的に実行し、次に進む前に各ステップをテストするようエージェントを支援します。
finishing-a-development-branch
311k完成したコードを、テストを実行してから、マージ、プルリクエストの作成、またはブランチの保持という明確な選択肢を示すことで仕上げるようエージェントを支援します。
receiving-code-review
311kコードレビューのフィードバックを慎重に検討し、変更を加える前に、各指摘がコードに照らして正しいかを確認するようエージェントを支援します。