describing-prs

Generate a PR description for the current branch. Writes Markdown to .git/magit/posts/new-pullreq for use with magit-forge.

9 stars

Best use case

describing-prs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate a PR description for the current branch. Writes Markdown to .git/magit/posts/new-pullreq for use with magit-forge.

Teams using describing-prs should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/describing-prs/SKILL.md --create-dirs "https://raw.githubusercontent.com/aspiers/ai-config/main/.agents/skills/describing-prs/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/describing-prs/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How describing-prs Compares

Feature / Agentdescribing-prsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate a PR description for the current branch. Writes Markdown to .git/magit/posts/new-pullreq for use with magit-forge.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# PR Description Generator

Generate a well-structured PR description for the current feature branch.

## When to Use This Skill

Use this skill when:

- Preparing to create a pull request
- Needing a PR description for the current branch
- Integrating with magit-forge for PR creation

## Process

1. **Determine the base branch**

   Run the helper script to find the base branch:

   ```bash
   BASE=$(~/.agents/skills/describing-prs/scripts/find-merge-base.py)
   ```

   The script outputs a branch name (e.g., `origin/main`) that represents
   the base branch for comparison. It handles cases where you branched
   from another feature branch, not just main/master.

   **Options**:
   - `--fetch`: Fetch latest remote refs before determining base branch
   - `--debug`: Show how the base branch is determined

   **Strategy** (implemented in the script):
   - Try `@{upstream}` first (the current branch's configured upstream)
   - Try `origin/HEAD` (the remote's default branch)
   - Fall back to common defaults: `origin/main`, `origin/master`, `origin/develop`
   - If neither works, find the closest remote branch by commit distance

2. **Gather context about the branch**

   Using the base branch found above:

   ```bash
   git branch --show-current
   git log --oneline <base-branch>..HEAD
   git diff --no-ext-diff <base-branch>..HEAD --stat
   git diff --no-ext-diff <base-branch>..HEAD
   ```

3. **Analyze the changes**

   - Identify the purpose of the changes
   - Group related commits by theme
   - Note any breaking changes or important considerations

4. **Generate the PR description**

   Write a Markdown file with:

   - **Title**: A concise summary (will be used as PR title)
   - **Summary**: 2-3 sentences explaining the overall purpose
   - **Changes**: Bullet points of key modifications
   - **Testing**: How the changes were tested (if applicable)
   - **Notes**: Any reviewer notes, breaking changes, or follow-up items

5. **Write to the output file**

   Create the directory and write the description:
   ```bash
   mkdir -p .git/magit/posts
   ```

   Write Markdown content to `.git/magit/posts/new-pullreq`

## Output Format

The generated file should follow this structure:

```markdown
# <PR Title>

## Summary

<Brief explanation of what this PR accomplishes and why>

## Changes

- <Key change 1>
- <Key change 2>
- ...

## Testing

<How changes were tested, or "N/A" if not applicable>

## Notes

<Any additional context for reviewers, breaking changes, or follow-up work>
```

## Formatting Guidelines

- Wrap all symbols, variables, function names, file paths, and code references
  in backticks (e.g., `myFunction`, `CONFIG_VALUE`, `src/utils.ts`)
- Use fenced code blocks for multi-line code snippets
- Keep bullet points concise and scannable

## Important Notes

- The file path `.git/magit/posts/new-pullreq` is used by magit-forge
- Always overwrite the existing file if present
- Keep the description concise but informative
- Focus on the "why" more than the "what" (the diff shows the "what")

Related Skills

xlsx-to-csv

9
from aspiers/ai-config

Convert XLSX spreadsheets (single or multi-sheet) to CSV files you can read and grep. Use whenever you need to process an .xlsx report from Xero, Cryptio, bank exports, or any tool that delivers spreadsheet output.

xero-mcp

9
from aspiers/ai-config

Use the Xero MCP server — obtain/refresh OAuth2 bearer tokens, troubleshoot authentication, and pick up other operational notes for working with Xero MCP tools. Use when Xero MCP tools fail with authentication errors, when the bearer token has expired (tokens last ~30 min), before starting any Xero workflow, or for general guidance on Xero MCP usage.

xero-browser

9
from aspiers/ai-config

General Xero browser automation notes. Use when automating any Xero page with agent-browser — covers non-standard UI patterns, waiting, and dropdown menus.

test-running

9
from aspiers/ai-config

Run tests according to repository guidelines. Use after linting passes, before staging changes.

task-orchestration

9
from aspiers/ai-config

Orchestrate the complete development workflow for implementing sub-tasks from a task list. Use for end-to-end feature implementation with quality controls.

task-implementation

9
from aspiers/ai-config

Implement a single sub-task from a task list. Use when working on feature development with existing task lists.

task-generation

9
from aspiers/ai-config

Generate a detailed task list from a PRP. Use after a PRP is created and ready for implementation planning.

subagent-authoring

9
from aspiers/ai-config

Create subagent definitions for Claude Code and OpenCode that delegate to skills. Use when creating new subagents or refactoring existing ones to follow the delegation pattern.

slow-command-running

9
from aspiers/ai-config

Pipe long running commands through tee(1) to allow watching output and repeated analyses without rerunning

skill-authoring

9
from aspiers/ai-config

Create and maintain Claude Code skills following Anthropic best practices. Use when building new skills, refactoring existing ones, or ensuring skills follow official guidelines for structure, naming, progressive disclosure, and testing.

safe-rm

9
from aspiers/ai-config

Safely delete files / directories without asking for permission

prp-generation

9
from aspiers/ai-config

Generate a Product Requirements Prompt (PRP) from a feature description. Use when starting work on a new feature.