/git
Load when planning or about to git commit, branch, push, rebase, resolve a merge conflict, open PR, stack PRs (even when gh-stack drives the stack), or write/update the description of a Pull Request (PR), attach a screenshot or video to a PR, respond to review comments, review a
Claude Code
$ npx -y skills add sherifabdlnaby/skills --skill git --agent claude-code
Codex
$ npx skills add sherifabdlnaby/skills --skill git -a codex -y
Cursor
$ npx skills add sherifabdlnaby/skills --skill git -a cursor -y
Gemini CLI
$ npx skills add sherifabdlnaby/skills --skill git -a gemini-cli -y
GitHub Copilot
$ npx skills add sherifabdlnaby/skills --skill git -a github-copilot -y
OpenCode
$ npx skills add sherifabdlnaby/skills --skill git -a opencode -y
Windsurf
$ npx skills add sherifabdlnaby/skills --skill git -a windsurf -y
SKILL.md
git.SKILL.mdname: git
description: >
Load when planning or about to git commit, branch, push, rebase, resolve a merge conflict, open PR, stack PRs (even when gh-stack drives the stack),
or write/update the description of a Pull Request (PR),
attach a screenshot or video to a PR, respond to review comments, review a PR, watch/babysit a PR's CI or reviews.
Carries the user's git conventions and style you are expected to match. Load as early as possible, the moment git or GitHub work is anywhere in the chat's future.
license: MIT
argument-hint: "[commit|branch|pr|attach|rebase|review|watch]"
metadata:
author: sherifabdlnaby
version: "0.5.1"
Git
Route first: each action's actual rules live in a `references/` file. Open the matching one before planning or acting; rules like commit grouping and branch naming shape the plan, so reading them late means redoing it. Several actions, several references.
**Versions.** Checked against gh 2.103.3 and gh-stack 0.3.0 on 2026-10-31.
Router
**Branches** (create, name, stack) -> [`references/branches.md`](references/branches.md) Switching branches, naming rules, ticket references, switching with a dirty tree, stacked PRs (conventions here, mechanics via the gh-stack skill), the gh-stack/manual path probe, cascade conflicts and verification, manual restacking fallback (after merge, chain of 3+, mid-stack push), force-pushing.
**Committing** -> [`references/commits.md`](references/commits.md) Pre-staging walk, file confirmation, message style, hook-failure handling, scoping, editor-free squash, empty commits.
**Pull Requests** (open, update) -> [`references/pull-requests.md`](references/pull-requests.md) Pre-flight survey, title format (including the stacked `[n/N]` marker), `gh pr create` flags, post-create lines, finishing PRs after `gh stack submit`, updating a body without clobbering it.
**PR body** (write or rewrite a description) -> [`references/pr-body.md`](references/pr-body.md) Voice for the product and engineer blocks, each block's rule in body order, where a visual sits and when to take a screenshot, receipts and the structure hook, the skeleton, linking, AI footers.
**Attach a screenshot or video** -> [`references/attach.md`](references/attach.md) `--attach` on create/edit/comment, body-file placement, screenshot framing guidance.
**Responding to review comments** (on your own/target PR) -> [`references/review-responses.md`](references/review-responses.md) Classify the reviewer (automated bot/AI tool, an AI-disclosed agent behind a human account, or a human), then fix / push back / escalate; in-thread replies, thread resolution, re-requesting review, batching a round into one GraphQL query and one aliased mutation, where a PR stands.
**Rebasing, merging, pulling, resolving conflicts** -> [`references/rebase.md`](references/rebase.md) Rebase vs merge, how to pull, who resolves which hunk, conflict guidance, force-with-lease, verification. Stacked-PR restack live in [`references/branches.md`](references/branches.md); read it too when the branch is in a stack.
**Reviewing someone else's PR** -> [`references/reviewing.md`](references/reviewing.md) Procedure: gather context, check out locally, trace the change, deliver a summary and review guide.
**Watch a PR's CI and reviews** -> [`references/watch.md`](references/watch.md) The four verdicts, the three modes (green CI / green and quiet / reviews only), the cheap sub-agent that runs the loop, the stale nudge. Uses `scripts/pr-watch.py`, never a sleep loop; its flags are in `references/watch-flags.md`.
**Stuck CI check with no manual retry** -> [`references/commits.md`, Empty commits](references/commits.md#empty-commits) The last-resort empty commit: when it beats retrying the check, and the zero-file-change guards that keep approvals alive.
Always
**Disclose AI.** Anything posted on GitHub on the user's behalf (PR body, comment, issue, ticket update) carries an **AI footer**. Commit messages carry no footer. The PR-body template lives in [`references/pr-body.md`](references/pr-body.md); the post templates, one per tier of human judgment behind the post (Agent Decided, Human Planned, Human Guided), live in [AI Disclosure](#ai-disclosure) below. Use them as verbatim as possible, do not write from memory.
**Reach for `gh` first.** Every GitHub action goes through the `gh` CLI; the GitHub MCP server is the fallback for what `gh` cannot do.
**Parallelize read-only calls.** Batch independent read-only `git`/`gh` calls (`status`, `diff`, `log`, `gh pr view/diff/checks`) into a single tool call; each sequential read is a roundtrip for nothing. Mutating commands (`commit`, `push`, `rebase`, `gh pr create/edit/merge`) stay sequential.
**Fewer round-trips, smaller payloads.** Batching is the first lever; these are the next four, your call when a one-off is cheaper:
- **One wide fetch, many narrow reads.** Anything you'll consult more than once in a task (PR JSON, `gh stack view --json`, a review-thread query) goes to a temp file once, and each step reads its
slice with `jq`. Re-fetch after anything you did that changes it (push, edit, reply, resolve); or if time passed and you've been idle, a snapshot is not a live view.
- **Ask for an answer, not a payload.** A count or a single field leaves as `--jq '.x'`; a yes/no leaves as an exit code (`git diff --quiet`, `git merge-base --is-ancestor`). JSON you read with your
own eyes is a payload.
- **Same-shape mutations ride one request.** GraphQL aliases: every reply, resolve, or title edit of a round in one `gh api graphql`. Aliases fail independently, so read the per-alias `errors[].path`,
not the exit code.
- **Bodies travel by file.** PR body or GraphQL query to a file, then `--body-file` / `-F query=@file`. (why: shell quoting eats backticks and `$`, and a file stays editable for the next update.)
Hooks that ship beside this skill check PR bodies deterministically, and they refuse a body they cannot read from a file.
*
Read more
name: git description: > Load when planning or about to git commit, branch, push, rebase, resolve a merge conflict, open PR, stack PRs (even when gh-stack drives the stack), or write/update the description of a Pull Request (PR), attach a screenshot or video to a PR, respond to review comments, review a PR, watch/babysit a PR's CI or reviews. Carries the user's git conventions and style you are expected to match. Load as early as possible, the moment git or GitHub work is anywhere in the chat's future. license: MIT argument-hint: "[commit|branch|pr|attach|rebase|review|watch]" metadata: author: sherifabdlnaby version: "0.5.1"
Git
Route first: each action's actual rules live in a `references/` file. Open the matching one before planning or acting; rules like commit grouping and branch naming shape the plan, so reading them late means redoing it. Several actions, several references.
**Versions.** Checked against gh 2.103.3 and gh-stack 0.3.0 on 2026-10-31.
Router
**Branches** (create, name, stack) -> [`references/branches.md`](references/branches.md) Switching branches, naming rules, ticket references, switching with a dirty tree, stacked PRs (conventions here, mechanics via the gh-stack skill), the gh-stack/manual path probe, cascade conflicts and verification, manual restacking fallback (after merge, chain of 3+, mid-stack push), force-pushing.
**Committing** -> [`references/commits.md`](references/commits.md) Pre-staging walk, file confirmation, message style, hook-failure handling, scoping, editor-free squash, empty commits.
**Pull Requests** (open, update) -> [`references/pull-requests.md`](references/pull-requests.md) Pre-flight survey, title format (including the stacked `[n/N]` marker), `gh pr create` flags, post-create lines, finishing PRs after `gh stack submit`, updating a body without clobbering it.
**PR body** (write or rewrite a description) -> [`references/pr-body.md`](references/pr-body.md) Voice for the product and engineer blocks, each block's rule in body order, where a visual sits and when to take a screenshot, receipts and the structure hook, the skeleton, linking, AI footers.
**Attach a screenshot or video** -> [`references/attach.md`](references/attach.md) `--attach` on create/edit/comment, body-file placement, screenshot framing guidance.
**Responding to review comments** (on your own/target PR) -> [`references/review-responses.md`](references/review-responses.md) Classify the reviewer (automated bot/AI tool, an AI-disclosed agent behind a human account, or a human), then fix / push back / escalate; in-thread replies, thread resolution, re-requesting review, batching a round into one GraphQL query and one aliased mutation, where a PR stands.
**Rebasing, merging, pulling, resolving conflicts** -> [`references/rebase.md`](references/rebase.md) Rebase vs merge, how to pull, who resolves which hunk, conflict guidance, force-with-lease, verification. Stacked-PR restack live in [`references/branches.md`](references/branches.md); read it too when the branch is in a stack.
**Reviewing someone else's PR** -> [`references/reviewing.md`](references/reviewing.md) Procedure: gather context, check out locally, trace the change, deliver a summary and review guide.
**Watch a PR's CI and reviews** -> [`references/watch.md`](references/watch.md) The four verdicts, the three modes (green CI / green and quiet / reviews only), the cheap sub-agent that runs the loop, the stale nudge. Uses `scripts/pr-watch.py`, never a sleep loop; its flags are in `references/watch-flags.md`.
**Stuck CI check with no manual retry** -> [`references/commits.md`, Empty commits](references/commits.md#empty-commits) The last-resort empty commit: when it beats retrying the check, and the zero-file-change guards that keep approvals alive.
Always
**Disclose AI.** Anything posted on GitHub on the user's behalf (PR body, comment, issue, ticket update) carries an **AI footer**. Commit messages carry no footer. The PR-body template lives in [`references/pr-body.md`](references/pr-body.md); the post templates, one per tier of human judgment behind the post (Agent Decided, Human Planned, Human Guided), live in [AI Disclosure](#ai-disclosure) below. Use them as verbatim as possible, do not write from memory.
**Reach for `gh` first.** Every GitHub action goes through the `gh` CLI; the GitHub MCP server is the fallback for what `gh` cannot do.
**Parallelize read-only calls.** Batch independent read-only `git`/`gh` calls (`status`, `diff`, `log`, `gh pr view/diff/checks`) into a single tool call; each sequential read is a roundtrip for nothing. Mutating commands (`commit`, `push`, `rebase`, `gh pr create/edit/merge`) stay sequential.
**Fewer round-trips, smaller payloads.** Batching is the first lever; these are the next four, your call when a one-off is cheaper:
- **One wide fetch, many narrow reads.** Anything you'll consult more than once in a task (PR JSON, `gh stack view --json`, a review-thread query) goes to a temp file once, and each step reads its
slice with `jq`. Re-fetch after anything you did that changes it (push, edit, reply, resolve); or if time passed and you've been idle, a snapshot is not a live view.
- **Ask for an answer, not a payload.** A count or a single field leaves as `--jq '.x'`; a yes/no leaves as an exit code (`git diff --quiet`, `git merge-base --is-ancestor`). JSON you read with your
own eyes is a payload.
- **Same-shape mutations ride one request.** GraphQL aliases: every reply, resolve, or title edit of a round in one `gh api graphql`. Aliases fail independently, so read the per-alias `errors[].path`,
not the exit code.
- **Bodies travel by file.** PR body or GraphQL query to a file, then `--body-file` / `-F query=@file`. (why: shell quoting eats backticks and `$`, and a file stays editable for the next update.)
Hooks that ship beside this skill check PR bodies deterministically, and they refuse a body they cannot read from a file.
*
🍣 Hand-rolled AI Skills distilled from my everyday experience. Git & Mise (...and others).
Other skills on skills.
cicd-fy
Use when setting up, shaping, or auditing a project's CI/CD: a build/test/scan pipeline, a release pipeline, or publishing an…
coding
The user's coding and docs conventions and taste. Load FIRST, at the start of any task that touches code or docs.
grilling
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any…
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Questions about git.
- Which coding agents can use git?
- git installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

