# Manage Pull Requests

Handles staging, PR descriptions and branches across the Git and GitHub lifecycle.

- Repository: https://github.com/google-gemini/gemini-cli (108651 stars)
- Category: Git and review
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add google-gemini/gemini-cli --skill prs -g -a claude-code -y`
Codex: `npx skills add google-gemini/gemini-cli --skill prs -g -a codex -y`
Cursor: `npx skills add google-gemini/gemini-cli --skill prs -g -a cursor -y`
Gemini CLI: `npx skills add google-gemini/gemini-cli --skill prs -g -a gemini-cli -y`

## Description

Expertise in managing the Git and GitHub Pull Request lifecycle, including staging changes, generating PR descriptions, and branch management.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Skill: GitHub PR & Git Management

## Goal

Standardize how the Gemini CLI Bot stages its changes, generates Pull Request
descriptions, and manages the lifecycle of both new and existing PRs.

## Staging & Patch Preparation (MANDATORY)

If you are proposing fixes and PR creation is enabled (per the System Directive):

1.  **Surgical Changes**: Only propose a **single improvement or fix per PR**.
    - **No Bundling**: You are STRICTLY FORBIDDEN from bundling unrelated
      changes. Changes are unrelated if they address different root causes.
    - **Examples**: Do not combine a script fix with a documentation update, an
      unrelated refactor, or a metrics script update. Metrics and fixes MUST
      be in separate PRs.
2.  **Generate PR Description**: Use the `write_file` tool to create
    `pr-description.md`.
    - **Title**: The very first line MUST be a concise, conventional title.
    - **Body**: The rest should be the markdown body explaining the change, why
      it is recommended, and the expected impact.
3.  **Stage Fixes**: You MUST explicitly stage your fixes using the
    `git add <files>` command.
4.  **Internal File Protection (CRITICAL)**: You are STRICTLY FORBIDDEN from
    staging internal bot management files. If they are accidentally staged, you
    MUST unstage them using `git reset <file>`.
    - **NEVER STAGE**: `pr-description.md`, `lessons-learned.md`,
      `branch-name.txt`, `pr-comment.md`, `pr-number.txt`, `issue-comment.md`, or
      anything in `history/`.

## Unblocking & PR Updates (Recovery)

If you are continuing work on an existing Task or responding to a comment on an
existing bot PR:

The rest: https://github.com/google-gemini/gemini-cli/blob/HEAD/tools/gemini-cli-bot/.gemini/skills/prs/SKILL.md
