Skip to content
Agentmart
Submit a tool

smart-pr

Generate or update PR title and description based on branch diffs

Skill by bonzofenix

IndexedMIT
Write a review

Chalk Labs

Need help deploying smart-pr?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

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/bonzofenix-smart-pr

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.

We use your email only for this newsletter. Privacy

About

Generate or update PR title and description based on branch diffs

No 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/smart-pr

What's inside

Skill name
smart-pr
Description
Generate or update PR title and description based on branch diffs
License
MIT
Instructions
198 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • allowed-tools: must be a space-separated string

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Smart PR Generator

This skill automatically generates or updates Pull Request titles and descriptions based on branch diffs. It analyzes code changes and uses AI to create meaningful, well-structured PR content.

## Prerequisites

- **GitHub CLI**: Must be authenticated via `gh auth login`
- **Git Repository**: Must be in a git repository
- **Not on Main Branch**: Must be on a feature/bug/task branch (not main/master)

## Usage

When invoked, this skill will:
1. Verify you're on a feature branch (not main/master)
2. Check if a PR already exists for the current branch
3. Analyze all changes between your branch and the base branch
4. Generate a PR title following conventional commit format
5. Generate a structured PR description with summary, changes, and testing checklist
6. Determine the appropriate PR label based on change type
7. Create a new PR or update the existing PR with generated content and label

## How it Works

### Step 1: Verify Git Context
- Check current branch: `git branch --show-current`
- Ensure not on main/master/develop branch (error if on base branch)
- Determine base branch (try main, then master, then develop)

### Step 2: Check for Existing PR
- Check if PR exists: `gh pr view --json number,title,body`
- Capture PR number if found

### Step 3: Gather Diff Information
- Get changes: `git diff <base>...HEAD` (base is main, master, or develop)
- Get commit history: `git log <base>...HEAD --oneline`
- For diffs over 5000 lines, use `git diff --stat` instead

### Step 4: Analyze Changes
Analyze the diff to understand:
- Which files changed and their purpose
- Nature of changes (feature, fix, refactor, docs, tests)
- Scope (single component vs multiple)
- Commit messages for context

### Step 5: Generate PR Title
**Format**: `<type>: <concise description>`

**Types**:
- `feat`: New feature
- `fix`: Bug fix
- `refactor`: Code refactoring without behavior change
- `docs`: Documentation changes
- `test`: Test additions or modifications
- `chore`: Maintenance tasks (dependencies, configs, etc.)
- `perf`: Performance improvements

**Rules**:
- Maximum 72 characters
- Use imperative mood ("add" not "adds" or "added")
- Be specific and concise
- Focus on what, not how

**Examples**:
- `feat: add autoscaling for CPU metrics`
- `fix: resolve race condition in scaling engine`
- `refactor: simplify event generator aggregation logic`
- `docs: update deployment instructions for MTA`
- `test: add integration tests for scheduler component`

### Step 6: Generate PR Description
**Structure**:
```markdown
## Summary
- High-level bullet point 1 (what problem does this solve?)
- High-level bullet point 2 (what is the approach?)
- High-level bullet point 3 (any important context?)

## Changes
- Key technical change 1 (with file references if relevant)
- Key technical change 2
- Key technical change 3

## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated (if applicable)
- [ ] Manual testing completed
- [ ] Documentation updated (if applicable)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
```

**Description Rules**:
- Focus on "why" not just "what"
- Reference key files/components (e.g., "Updated api/cmd/api/main.go")
- Include testing guidance
- Keep it scannable with bullets and clear sections
- Mention breaking changes or migration steps
- Reference key components/modules in the project

### Step 7: Determine PR Label

Select exactly **one** label for release notes using this priority order:
1. `breaking-change` - Breaking backward compatibility
2. `dependencies` - Primary purpose is dependency updates
3. `bug` - Fixing a bug
4. `enhancement` - New features or improvements
5. `chore` - Maintenance, configs, tooling, or documentation

**Examples**:
- New feature added → `enhancement`
- Fix race condition → `bug`
- Update documentation → `chore`
- Bump dependency versions → `dependencies`
- Change API interface incompatibly → `breaking-change`

### Step 8: Create or Update PR
**If PR exists**:
- Update: `gh pr edit <number> --title "..." --body "..."`
- Add label: `gh pr edit <number> --add-label "<label>"`

From bonzofenix/skills, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Sep 25, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from bonzofenix

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get smart-pr running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying smart-pr?

CallGet help
Cite this page

smart-pr skill. Agent Mart. https://agentmart.dev/skills/bonzofenix-smart-pr (last updated 2026-10-24)