cmd-pr-description
Generate a PR title and description, then commit, create/update the PR on approval
Skill by Olshansk
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/olshansk-cmd-pr-description
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cmd-pr-description
What's inside
- Skill name
cmd-pr-description- Description
- Generate a PR title and description, then commit, create/update the PR on approval
- License
- MIT
- Instructions
- 339 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Quick PR Description <!-- omit in toc --> Generate a concise PR description by analyzing the diff against a base branch. Output the result in a markdown file named `PR_DESCRIPTION.md`. Copy to clipboard: `cat PR_DESCRIPTION.md | pbcopy` - [Determine Scope](#determine-scope) - [Instructions](#instructions) - [1. Determine the base branch](#1-determine-the-base-branch) - [2. Analyze the changes](#2-analyze-the-changes) - [3. Generate the title and description using the format below](#3-generate-the-title-and-description-using-the-format-below) - [4. Ask user to approve, edit, or reject](#4-ask-user-to-approve-edit-or-reject) - [5. On approval: commit, create/update PR](#5-on-approval-commit-createupdate-pr) - [Title Format](#title-format) - [Output Format](#output-format) - [Section Rules](#section-rules) - [tl;dr](#tldr) - [Summary](#summary) - [Feature Diff](#feature-diff) - [Details](#details) - [General Details](#general-details) - [Example Output](#example-output) ## Determine Scope **Default (no scope specified):** diff the current branch against the repo's base branch. Detect the base branch in order — stop at the first success: 1. `gh repo view --json defaultBranchRef -q '.defaultBranchRef.name' 2>/dev/null` 2. `git remote show origin 2>/dev/null | grep "HEAD branch" | cut -d: -f2 | xargs` 3. `git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'` Do **not** assume `main` or `master`. If all methods fail, ask the user. Once resolved, run: ```bash git diff <base>...HEAD -- ":(exclude)*.lock" ":(exclude)package-lock.json" ":(exclude)pnpm-lock.yaml" ":(exclude)package.json" ``` **If the user specifies a scope**, use the corresponding command instead: | Scope | Command | What it covers | |---|---|---| | `unstaged` | `git diff HEAD -- <excludes>` | All uncommitted changes (staged + unstaged) | | `last commit` / `last 1 commit` | `git diff HEAD~1...HEAD -- <excludes>` | Changes in the most recent commit | | `last N commits` | `git diff HEAD~N...HEAD -- <excludes>` | Changes in the last N commits | | `entire repo` | `git ls-files \| grep -vE "\.(lock\|snap)$\|package-lock\.json\|pnpm-lock\.yaml"` | All tracked source files — generate a **codebase overview description** instead of a diff-based PR description | For all diff commands, apply: `-- ":(exclude)*.lock" ":(exclude)package-lock.json" ":(exclude)pnpm-lock.yaml" ":(exclude)package.json"` ## Instructions ### 1. Determine the base branch **If the user passed a branch name as an argument** (e.g. `/cmd-pr-description feature-branch`), use that as `BASE_BRANCH`. Skip auto-detection entirely. **For `entire repo` scope:** skip diff analysis; use `git ls-files` and the repo's README/entry points to generate a codebase overview description. Jump directly to Step 3 with that as your source material. **Otherwise**, use the detection methods in **Determine Scope** above to set `BASE_BRANCH`. **Validation:** Verify `BASE_BRANCH` exists before proceeding: ```bash git rev-parse --verify "$BASE_BRANCH" 2>/dev/null || git rev-parse --verify "origin/$BASE_BRANCH" 2>/dev/null ``` If the branch does not exist locally or on the remote, stop and ask the user to confirm the branch name. ### 2. Analyze the changes ```bash git diff $BASE_BRANCH...HEAD --stat -- ":(exclude)*.lock" ":(exclude)package-lock.json" ":(exclude)pnpm-lock.yaml" ":(exclude)package.json" git log $BASE_BRANCH..HEAD --oneline ``` ### 3. Generate the title and description using the format below Generate both a **PR title** (see [Title Format](#title-format)) and the full description body (see [Output Format](#output-format)). Write the description to `PR_DESCRIPTION.md` and display both the title and description to the user. ### 4. Ask user to approve, edit, or reject Use `AskUserQuestion` to present the generated title and description. Prefix the prompt with an emoji (e.g., `⏳`, `🤔`, or `📝`) and use square-bracketed numeric option labels so the user can reply with `[1]`, `[2]`, or `[3]`: > ⏳ Please review and choose one: > > - **[1] Approve** as-is > - **[2] Request changes** (provide feedback, re-generate) > - **[3] Reject** (stop here) Do NOT proceed to step 5 until the user explicitly approves. ### 5. On approval: commit, create/update PR Once the user approves, execute the following steps in order: **Step 5a — Commit unstaged changes (if any):** ```bash git add -A && git commit -m "<generated title>" ``` If there are no unstaged/staged changes, skip this step. **Step 5b — Push the branch:** ```bash git push -u origin HEAD ``` **Step 5c — Create or update the PR:** Check if a PR already exists for the current branch:
From Olshansk/agent-skills, MIT.
More from Olshansk/agent-skills
- 0.584score
cmd-makefile-improve
Olshansk
Review a repository's Makefile foundation and propose approval-gated improvements to its helpers, templates, tests, and documentation.
SkillBFreshness: B★ 9Claude Code +9 - 0.572score
cmd-makefile
Olshansk
Create or improve Makefiles with minimal complexity.
SkillBFreshness: B★ 9Claude Code +9 - 0.543score
cmd-mermaid-render
Olshansk
Render and display Mermaid diagrams inline in iTerm2 or Ghostty.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-code-what
Olshansk
Catch the user up on what the agent has been doing in the current session with 3-5 ultra-tight bullet points.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-plan-store
Olshansk
Capture the current conversation's plan, decisions, and action items into a structured markdown file in the project's plans/ directory.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-codex-review-unstaged
Olshansk
Get a second opinion on what Claude just implemented from Codex (codex exec headless mode).
SkillCFreshness: C★ 9Claude Code +9 - 0.535score
cmd-done-check
Olshansk
Ask the agent whether it finished everything or has more to do — a lightweight completeness gate for the end of any task
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-agent-persona-set
Olshansk
Prime the agent with a behavioral persona for the conversation
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-conflict-resolver
Olshansk
Resolve merge conflicts systematically with context-aware 3-tier classification and escalation protocol
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-edgecase
Olshansk
Review branch changes for test gaps, logic edge cases, failure modes, and integration risks
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-docs-idiot-proof
Olshansk
Simplify documentation for clarity and scannability with approval-gated edits
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-build-context
Olshansk
Build high-signal PR context for review with diff analysis, risk assessment, and discussion questions
SkillCFreshness: C★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 4, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Olshansk/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Olshansk
- 0.584score
cmd-makefile-improve
Olshansk
Review a repository's Makefile foundation and propose approval-gated improvements to its helpers, templates, tests, and documentation.
SkillBFreshness: B★ 9Claude Code +9 - 0.572score
cmd-makefile
Olshansk
Create or improve Makefiles with minimal complexity.
SkillBFreshness: B★ 9Claude Code +9 - 0.543score
cmd-mermaid-render
Olshansk
Render and display Mermaid diagrams inline in iTerm2 or Ghostty.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-code-what
Olshansk
Catch the user up on what the agent has been doing in the current session with 3-5 ultra-tight bullet points.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-plan-store
Olshansk
Capture the current conversation's plan, decisions, and action items into a structured markdown file in the project's plans/ directory.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-codex-review-unstaged
Olshansk
Get a second opinion on what Claude just implemented from Codex (codex exec headless mode).
SkillCFreshness: C★ 9Claude Code +9
Cite this page
cmd-pr-description skill. Agent Mart. https://agentmart.dev/skills/olshansk-cmd-pr-description (last updated 2026-10-24)