github
Skill này làm gì
Skill hướng dẫn một agent AI dùng dòng lệnh GitHub cho issue, pull request, nhật ký kiểm tra CI, đánh giá và bản phát hành. Dành cho lập trình viên dùng GitHub để lưu trữ mã nguồn.
Khi nào nên dùng
- ✓Khi bạn muốn liệt kê, đọc hoặc bình luận về issue hoặc pull request trên GitHub.
- ✓Khi một pull request có kiểm tra thất bại và bạn cần xem lý do.
- ✓Khi bạn muốn tạo pull request hoặc xem xét thay đổi trong một repository.
Liên kết skill
https://github.com/openclaw/openclaw/blob/main/skills/github/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
“Cho tôi xem các pull request đang mở trong repo của tôi, và cho biết cái nào có kiểm tra thất bại.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill dùng lệnh gh để đọc pull request, kiểm tra, diff và bình luận, và có thể tạo pull request mới. Nó dùng git cho các commit, nhánh và push cục bộ.
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.
GitHub
Use gh for GitHub. Use git for local commits/branches/push/pull. Use code-reading tools for deep reviews.
Auth
gh auth status
gh auth login
Gateway HOME can differ from operator HOME. If gh auth exists elsewhere, set GH_CONFIG_DIR in the gateway service env and restart.
PRs
gh pr list --repo owner/repo --json number,title,state,author,url
gh pr view 55 --repo owner/repo --json title,body,author,files,commits,reviews,reviewDecision
gh pr checks 55 --repo owner/repo
gh pr diff 55 --repo owner/repo
gh pr create --repo owner/repo --title "feat: title" --body-file /tmp/pr.md
When creating or refreshing a PR body, append this final footer only when the Runtime line supplies sessionUrl=<exact-url>. Replace <sessionUrl> with that URL verbatim; do not construct or modify it. sessionUrl is supplied only for an explicitly public session. Omit the footer when it is absent; never substitute a private chat URL or enable sharing to obtain one. Preserve any publication marker before exactly one footer, and keep the footer final:
---
[View the OpenClaw team session](<sessionUrl>)
URLs work directly: gh pr view https://github.com/owner/repo/pull/55.
Async merges
Use the repository's native landing workflow when provided. For authorized
programmatic merges elsewhere, use GitHub's async merge API
through gh api; gh pr merge does not select this API. Supply the reviewed head
SHA, preserve required reviews/checks, and check stack membership first: submitting
a stacked PR also merges or queues its open downstack PRs, which need their own
review and authorization.
gh api -H 'X-Octopool-Require: merge-async-v1' \
--method PUT repos/owner/repo/pulls/55/merge-async \
-H 'X-GitHub-Api-Version: 2026-03-10' \
-f sha=REVIEWED_HEAD_SHA -f merge_method=squash -f merge_action=direct_merge
gh api -H 'X-Octopool-Require: merge-async-v1' \
repos/owner/repo/pulls/55/merge-async/REQUEST_UUID \
-H 'X-GitHub-Api-Version: 2026-03-10' -H 'Cache-Control: max-age=0'
Keep the Octopool guard header first after api. Protected older wrappers reject
it before they can rewrite merge authority; use an Octopool build containing
the async guard if it is refused.
The supported wrapper preserves SHA/method/action/bypass and only rewrites commit
text. Native gh can pass the header through. Do not remove it, disable policy,
or select a raw binary to work around a rejection.
Retain details.uuid from a 202 response before polling. pending means wait;
merged includes details.sha, which still needs final PR/head verification.
enqueued means queued, not merged: monitor the PR itself. To honor a configured
queue, use merge_action=default (or merge_queue to explicitly enqueue), omitting
direct-only method/title/message fields. Never enable bypass_rules without authorization.
On failed, report details.message. A 409 identifies an existing request;
inspect its UUID and options without resubmitting. Lost replies, polling errors,
and result expiry after 24 hours require reconciliation, never a blind retry or
synchronous fallback. Poll with bounded waits and fresh reads. Async processing
does not arm auto-merge for unmet checks; use the native workflow or gh pr merge --auto when that behavior is authorized.
Landing ownership
When the user asks to land or merge a PR, the terminal outcome is the PR's verified GitHub state, not the end of a review, worker turn, or CI observation.
- Keep the job active until
gh pr view ... --json state,mergedAt,mergeCommitprovesstateisMERGED. - Treat review findings, merge conflicts, failed checks, and requested changes as continuation work when they are in scope. Patch them, rerun the required gates, and re-evaluate the exact updated head.
- A pending check is a wait state, not completion. Use the repository's supported wait or merge workflow; do not claim success from partial green checks.
- If work was delegated to a persistent session and that run stops before merge, continue the same session rather than treating its report as the final result.
- Stop as blocked only when continuing requires new authority, unavailable credentials, or a product decision that cannot be inferred safely. Report the exact blocker and leave the PR unmerged.
Issues
Câu hỏi thường gặp
Tôi có phải đăng nhập trước không?
Có. Kiểm tra đăng nhập bằng lệnh auth status, hoặc đăng nhập qua công cụ gh.
Nó có đọc được nhật ký kiểm tra CI không?
Có. Nó có thể hiển thị các kiểm tra của một pull request để bạn thấy cái nào thất bại.
Nó có merge được pull request không?
Nó có thể dùng quy trình hạ cánh riêng của repository, hoặc một quy trình merge được ủy quyền khi có sẵn.
Chi tiết
Mô tả gốc của tác giả
GitHub CLI for issues, PRs, CI/check logs, comments, reviews, releases, repos, and gh api queries.
repo: openclaw/openclaw
Độ phổ biến
- Sao GitHub
- 394k
- Vị trí xếp hạng
- #57
- 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ì.