git-pr-workflows-git-workflow
Skill này làm gì
Agent này giúp tổ chức quy trình gửi thay đổi mã để người khác review. Nó đảm bảo mọi thứ được kiểm thử, ghi lại đúng cách và gửi như một pull request mà không vi phạm các quy tắc của dự án.
Khi nào nên dùng
- ✓Khi bạn viết xong mã và muốn gửi để người khác review.
- ✓Khi dự án có quy định nghiêm ngặt về cách gửi và kiểm thử mã.
- ✓Khi bạn muốn tự động hóa việc tạo pull request sau khi thay đổi.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/git-pr-workflows-git-workflow/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
“Tôi muốn gửi các thay đổi mới nhất để review, kiểm thử mọi thứ và tạo một pull request vào nhánh chính.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent trước hết kiểm tra trạng thái hiện tại của mã và các quy tắc của dự án. Sau đó, nó chạy kiểm thử và xác thực, chuẩn bị các thay đổi trên một nhánh mới, và cuối cùng tạo pull request với đầy đủ thông tin cần thiết.
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.
Guarded Git Pull Request Workflow
Move completed changes from local review to a verified pull request without bypassing repository policy or branch protection.
When to Use
Use for completed implementation work that must be reviewed, tested, committed, pushed to a topic branch, and opened as a pull request. Use the repository's dedicated maintainer or release workflow instead when one is mandatory.
Policy Gate
Before mutation:
- Read
AGENTS.md, contribution guidance, maintainer docs, and relevant nested instructions. - Inspect the current branch, worktree, remotes, upstream, and effective target-branch protection.
- Discover repository-native validation, commit, PR, merge, and release commands.
- Preserve unrelated dirty and staged files.
Repository policy wins over flags and user shorthand. Trunk-based development does not imply a direct push: when the target is protected, use a short-lived branch and pull request. If a repository defines a mandatory maintainer skill or guarded merge command, hand off merge and release actions to it. In agentic-awesome-skills, use antigravity-maintainer-batch-release and npm run merge:batch.
Inputs
Resolve these from the request and repository:
- target branch, defaulting to the repository default branch;
- intended changed files and excluded user work;
- required test, lint, security, build, and documentation checks;
- branch naming and commit-message conventions;
- draft or ready-for-review PR state;
- required reviewers, labels, issue links, and merge method.
Ask only when a missing choice changes the result materially.
Workflow
1. Capture the exact change
git status --short --branch
git diff --stat
git diff --cached --stat
git branch --show-current
git remote -v
Confirm every file in scope. Stop if staged or dirty files cannot be separated safely.
2. Review in parallel
When subagents are available and authorized, assign independent bounded passes for:
- correctness and regression risk;
- security, secrets, permissions, and dependency risk;
- test coverage and repository-policy compliance.
Give each reviewer the raw diff and repository instructions. Keep the main agent responsible for deduplication, severity, edits, and final verification.
3. Validate and repair
Run the repository's targeted checks, then its required pre-PR suite. If a check fails:
- identify whether the cause is source, policy, environment, or infrastructure;
- fix only source or policy defects in scope;
- rerun the targeted failure;
- rerun the complete required suite.
Do not weaken gates, hide skipped tests, or treat deterministic failures as flaky.
4. Prepare the branch and commit
Fetch the target before committing. If currently on a protected/default branch, create a topic branch before mutation.
git fetch origin <target-branch>
git switch -c <topic-branch> origin/<target-branch>
git status --short --branch
Stage only intended paths and create focused conventional commits according to repository policy. Rebase or update the topic branch when strict required checks demand the latest target; never force a shared branch without explicit authorization.
5. Push and create the pull request
git push -u origin <topic-branch>
gh pr create --base <target-branch> --head <topic-branch> \
--title "<conventional title>" --body-file <body-file>
The PR body must truthfully include:
- what changed and why;
- tests and validation actually run;
- risk, deployment, rollback, and breaking-change notes when applicable;
- issue links, screenshots, and repository checklists when applicable.
Never mark a pending automated review or test as completed.
6. Verify the remote result
gh pr view <pr-number> --json headRefOid,baseRefOid,mergeable,mergeStateStatus,url
gh pr checks <pr-number>
Bind review evidence to the current full head SHA. If the head or base changes, discard stale conclusions and rerun affected checks.
Use the repository's guarded merge path. Do not replace required checks, merge queues, exact-SHA attestations, or maintainer commands with a raw merge API. After merge, fetch the target and verify the requested remote, CI, deployment, or release state.
Stop Condition
…
Câu hỏi thường gặp
Pull request là gì?
Đây là yêu cầu đưa các thay đổi mã của bạn vào dự án chính. Người khác có thể review mã của bạn trước khi nó được chấp nhận.
Nhánh (branch) là gì?
Nhánh giống như các bản sao song song của dự án, nơi bạn có thể làm tính năng mới hoặc sửa lỗi mà không ảnh hưởng đến mã chính. Sau đó bạn có thể gộp các thay đổi lại.
Điều gì xảy ra nếu kiểm thử thất bại?
Agent sẽ cố xác định vấn đề và sửa nếu nó liên quan đến mã hoặc quy tắc của bạn. Nó sẽ không tiếp tục nếu các kiểm thử quan trọng thất bại.
Chi tiết
Mô tả gốc của tác giả
Orchestrate review, tests, commits, branch pushes, and pull-request creation with parallel agents. Use when completed changes must move through validation into a PR or guarded merge.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #4737
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.