create-github-pr
Skill này làm gì
Skill này cho phép AI mở pull request trên GitHub từ một nhánh bạn đã đẩy lên. Skill dành cho người đóng góp muốn mã của mình được xem xét và hợp nhất.
Khi nào nên dùng
- ✓Khi bạn đã hoàn thành thay đổi trên một nhánh và muốn gửi để xem xét trên GitHub.
- ✓Khi bạn cần một pull request liên kết tới issue mà nó sẽ đóng.
- ✓Khi bạn muốn AI kiểm tra quyền truy cập và việc issue đã được phê duyệt trước khi mở pull request.
Liên kết skill
https://github.com/NVIDIA/OpenShell/blob/main/.agents/skills/create-github-pr/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
“Mở pull request cho nhánh của tôi và liên kết nó với issue mà nó sửa.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI kiểm tra đăng nhập gh và quy tắc đóng góp của repository, rồi tạo pull request bằng một lệnh theo định dạng mô tả của dự án.
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.
Create GitHub Pull Request
Create pull requests on GitHub using the gh CLI.
Prerequisites
- The
ghCLI must be authenticated (gh auth status) - You must have commits on a branch that's pushed to the remote
- Every PR must close an existing issue, except automated dependency updates and build or flaky-test fixes from authors with write access, as described in
CONTRIBUTING.md. Follow Branch Names inCONTRIBUTING.mdfor contributor branch names.
Before Creating a PR
Verify Contributor Access and Issue Acceptance
Before pushing or creating a PR (including a draft), verify the author's access
to the target repository, not their fork. For the authenticated gh user:
gh repo view OWNER/REPO --json nameWithOwner,viewerPermission
gh issue view ISSUE_NUMBER --repo OWNER/REPO --json number,url,labels
Authors with verified WRITE, MAINTAIN, or ADMIN access may proceed without
state:accepted; keep the issue link and note the missing label. Everyone else
must link at least one target-repository issue and have state:accepted on each.
Otherwise, preserve local work and report which issue needs acceptance. A direct
request, roadmap placement, other labels, or vouch status does not bypass this gate.
When acting for another author, verify their permissions. Resolve failed lookups before proceeding; retry sandbox network failures outside the sandbox before reporting an authentication problem. Vouch requirements still apply separately.
Check Config Documentation
If the branch changes gateway TOML parsing, [openshell.gateway] fields,
[openshell.drivers.<name>] fields, driver config defaults, or Helm rendering
of gateway.toml, verify that docs/how-it-works/gateways/configuration.mdx is updated
in the same branch. If the change affects user-facing compute-driver setup,
also update docs/how-it-works/sandboxes/runtimes.mdx or the relevant
deployment docs.
Check Agent Infrastructure
Use the sync-agent-infra skill's maintenance map to identify related skill updates when the branch changes behavior, commands, or development workflows. Run its full consistency check when the branch adds, removes, or renames skills or crates; changes workflow relationships or skill coverage; modifies issue or PR templates; or changes agent cross-references. Resolve any drift before creating the PR.
Verify the Affected Areas
Use the verification guidance in CONTRIBUTING.md to select checks for the changed files and behavior. Guidance, skills, and template changes need applicable Markdown, YAML, link, and consistency checks. Run Rust or SDK suites when those components or their dependencies can be affected. Shared APIs, schemas, dependencies, and build changes may require broader checks even when component source files are unchanged.
mise run ci and mise run pre-commit are broad convenience tasks, not blanket PR prerequisites. Broaden validation only for a concrete remaining risk or failed check, and report what actually ran.
Verify Branch State
Before creating a PR, verify:
You're not on main - Never create PRs directly from main:
# Should NOT be "main" git branch --show-currentBranch follows naming convention - Follow Branch Names in
CONTRIBUTING.md, including the exceptions for generated branches and private security work.# Example: feat/1234-add-pagination/octocat git branch --show-current
Push Your Branch
Ensure your branch is pushed to the remote:
git push -u origin HEAD
Creating a PR
Basic PR creation (opens editor for description):
gh pr create
With title and body:
gh pr create --title "PR title" --body "PR description"
PR Title Format
PR titles must follow the conventional commit format:
<type>(<scope>): <description>
Types:
feat- New featurefix- Bug fixdocs- Documentation onlyrefactor- Code change that neither fixes a bug nor adds a featuretest- Adding or updating testschore- Maintenance tasks (CI, build, dependencies)perf- Performance improvement
Scope is typically the component name (e.g., evaluator, cli, sdk, jobs).
Examples:
feat(evaluator): add support for custom rubricsfix(jobs): handle timeout errors gracefullydocs(sdk): update authentication examplesrefactor(models): simplify deployment logic- `chore(ci): update Python version in pip
Câu hỏi thường gặp
Nhánh của tôi có cần được đẩy lên trước không?
Có. Các commit phải nằm trên một nhánh đã có trên remote trước khi tạo pull request.
Mọi pull request có cần issue không?
Trong hầu hết trường hợp là có. Skill nói mỗi pull request phải đóng một issue đang tồn tại, trừ một số ngoại lệ cho cập nhật tự động hoặc bảo trì.
Nếu tôi không có quyền ghi vào repository thì sao?
Skill kiểm tra quyền của bạn trước. Người đóng góp không có quyền ghi cần một issue liên kết đã có nhãn được chấp nhận.
Chi tiết
Mô tả gốc của tác giả
Create GitHub pull requests using the gh CLI. Use when the user wants to create a new PR, submit code for review, or open a pull request. Trigger keywords - create PR, pull request, new PR, submit for review, code review.
repo: NVIDIA/OpenShell
Độ phổ biến
- Sao GitHub
- 21k
- Vị trí xếp hạng
- #10361
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
create-github-issue
21kGiúp agent của bạn tạo issue GitHub cho lỗi, yêu cầu tính năng hoặc tác vụ, bằng công cụ dòng lệnh gh và mẫu của dự án.
review-github-pr
21kHướng dẫn agent của bạn đọc pull request trên GitHub và giải thích các thay đổi, lựa chọn thiết kế chính và đoạn mã đáng chú ý bằng ngôn ngữ dễ hiểu.
watch-github-actions
21kCho phép agent của bạn kiểm tra các lần chạy GitHub Actions, theo dõi cho đến khi hoàn tất và đọc log của mọi job bị lỗi.
openshell-policy-advisor
21kGiúp agent của bạn phục hồi khi sandbox chặn một yêu cầu mạng, bằng cách xin một quyền hẹp và thử lại sau khi được phê duyệt.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.