coding-agent
Skill này làm gì
Skill hướng dẫn một agent AI khởi động một công cụ lập trình như Codex, Claude Code hoặc OpenCode để xây dựng tính năng, xem xét pull request hoặc tái cấu trúc lớn ở chế độ nền. Dành cho người muốn giao các việc lập trình lớn hơn.
Khi nào nên dùng
- ✓Khi bạn muốn một tính năng lớn được xây dựng ở chế độ nền trong lúc bạn làm việc khác.
- ✓Khi bạn cần một pull request được xem xét hoặc một đợt tái cấu trúc lớn do công cụ lập trình thực hiện.
- ✓Khi bạn muốn một worker lập trình biến một issue thành pull request.
Liên kết skill
https://github.com/openclaw/openclaw/blob/main/skills/coding-agent/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Nhờ Codex xây dựng tính năng xuất dữ liệu mới trong một bản sao riêng của dự án và báo cho tôi khi xong.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill khởi động công cụ lập trình đã chọn trong một tiến trình nền, làm việc trong bản sao cô lập của dự án. Nó theo dõi tiến độ và báo lại khi worker hoàn thành hoặc thất bại.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Nó có sửa trực tiếp dự án chính của tôi không?
Không. Công việc được thực hiện trong một bản checkout cô lập, không trực tiếp trong thư mục dự án chính.
Nó có xử lý các chỉnh sửa đơn giản không?
Không. Các chỉnh sửa đơn giản và tra cứu mã chỉ đọc nên làm trực tiếp, nên skill này dành cho các việc lớn hơn.
Điều gì xảy ra nếu worker bị kẹt?
Skill giám sát worker và có thể khởi động lại hoặc hỏi bạn, thay vì âm thầm tự làm thủ công.
Chi tiết
Mô tả gốc của tác giả
Delegate coding work to Codex, Claude Code, or OpenCode as background workers; not simple edits or read-only code lookup.
repo: openclaw/openclaw
Độ phổ biến
- Sao GitHub
- 394k
- Vị trí xếp hạng
- #49
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
discord-user-post
394kCho phép agent của bạn đăng tin nhắn đã duyệt lên Discord dưới tên bạn qua app Discord trên máy tính, sau khi xác nhận đúng kênh.
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
graincrawl
394kCho phép agent của bạn tìm trong ghi chú cuộc họp và bản chép lời Granola đã lưu, kiểm tra độ mới và đếm số cuộc họp trong một khoảng thời gian.
Skill tương tự
executing-plans
311kGiúp agent của bạn thực hiện một kế hoạch triển khai đã viết từng bước trong phiên hiện tại, kiểm thử từng bước trước khi chuyển sang bước tiếp theo.
finishing-a-development-branch
311kGiúp agent của bạn hoàn tất mã đã xong bằng cách chạy kiểm thử, rồi đưa ra các lựa chọn rõ ràng để merge, mở pull request hoặc giữ nhánh.
receiving-code-review
311kGiúp agent của bạn cân nhắc kỹ các góp ý đánh giá mã, kiểm tra từng điểm với mã trước khi thay đổi bất cứ thứ gì.