pr
Use when the user asks to create or update a pull request for the current branch.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when the user asks to create or update a pull request for the current branch.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when auditing comments, docstrings, or embedded documentation prose in a scope — to strip bloat and rewrite cluttered-but-justified entries. Triggers on "audit comments", "clean up docstrings", "strip stale comments", "comment cleanup".
Use when the goal is to reduce code size, remove unnecessary complexity, or simplify a module without removing user-facing behavior.
Use when auditing and fixing end-to-end contracts and compatibility in a scope — HTTP/RPC APIs, events/messages, schemas, files, CLIs, libraries, configuration, database consumers, and external integrations. Triggers on "audit contracts", "API compatibility review", "schema compatibility audit", "check producer/consumer drift", "compatibility review", and "contract review". Performs an architecture-led review of semantic, backward, forward, and mixed-version compatibility; named interface classes are a minimum, never an exhaustive boundary.
Use when auditing and fixing logic bugs in a scope — off-by-one, wrong operator, inverted condition, unhandled boundary cases, unit/dimension mismatch, code that doesn't do what its name or docstring claims. Triggers on "audit correctness", "fix logic bugs", "check for off-by-one", "correctness review".
Use when auditing and fixing end-to-end data integrity in a scope — invariant violations, partial or conflicting writes, unsafe migrations/backfills, duplicate or reordered effects, precision or time corruption, stale derived stores, broken retention/deletion, and unrecoverable drift. Triggers on "audit data integrity", "review data consistency", "check migrations and invariants", "find data corruption", and related requests. Named risks are minimum, never exhaustive.
Use when auditing and fixing error handling in a scope — swallowed exceptions, defaults returned on error, optional chaining masking missing data, floating promises / missing awaits, entry points with no error boundary, resource leaks on error paths. Triggers on "audit error handling", "hunt silent failures", "fix swallowed errors", "check error boundaries", "missing await".
| name | pr |
| description | Use when the user asks to create or update a pull request for the current branch. |
Open a reviewable PR/MR for the current branch. Reviewer arrives cold — the body is the only bridge between agent context and what the human needs to decide.
Multi-repo work: one PR per repo. cd into each repo root before the create command — git CLIs infer the remote from cwd, not arguments. Cross-reference paired PRs in the body.
Write the body from git log --oneline <target>..HEAD and git diff <target>...HEAD, never from memory of the session — what you remember doing and what the branch actually contains diverge.
Uncommitted work is not PR material unless the user explicitly said to include it. A branch that already has an open PR/MR gets updated, not duplicated. Push and set upstream before invoking the CLI — an unpushed branch drops gh/glab into an interactive prompt that cannot be answered here.
Title: conventional commit, same type/scope vocabulary as the commits it covers. Full spec if a case is unclear: ~/.claude/skills/conventional-commits.md.
--fill conflicts with explicit title/body in both gh and glab.
| Find existing | Title | Body | Create | Update body | Cleanup flag | |
|---|---|---|---|---|---|---|
gh | gh pr view --json url | --title | --body | gh pr create | gh pr edit --body | --delete-branch |
glab | glab mr view | --title | --description | glab mr create | glab mr update --description | --remove-source-branch |
Pass the cleanup flag — source branch removed on merge.
Updating overwrites the body. Re-render from current truth; do not fetch-and-concat stale text.
Create as draft when the user asks, work is incomplete, verification is missing for risky changes, or the branch is clearly exploratory. Otherwise create ready for review.
Default to a compact body. No placeholders, filler, unchecked boxes, or "chapters" that repeat the diff. Scale by reviewer load, not by fixed counts: small PRs should fit on one screen; large PRs may be longer when grouped by behavior, subsystem, or review path.
Required:
Optional, only when needed:
Those four sections are the whole body; anything else you'd reach for folds into one of them. Prefer inline diff annotations for per-hunk WHY — the body carries only what the diff cannot show.
When warranted, place a before/after Mermaid diagram at the bottom of the body after any Review notes. Stack BEFORE above AFTER:
```mermaid
flowchart TB
subgraph BEFORE["BEFORE — <one-line label>"]
direction TB
B_x["..."]
end
subgraph AFTER["AFTER — <one-line label>"]
direction TB
A_x["..."]
end
BEFORE ~~~ AFTER
```
Skip for pure refactors, bugfixes, dep bumps, copy changes — shape didn't move.
After creating or updating, report the PR/MR URL, title, branch, ready/draft state, and verification gaps.