agentleFS
timurgaleevtimurgaleev/vibestack/skills/pr-summary/SKILL.md

pr-summary

Skill8 starsChanged 6 months agoMITView on GitHub

Analyze all PR changes and update PR description with accurate summary.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use explain, onboard and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • sunnyclinches44Skill

    explain

    Explains code using real-world analogies and ASCII diagrams

    Also in 3 projects that use this

  • SentrySkill

    onboard

    Onboard a service to sentry-options. Use when integrating a new service, creating schemas, or setting up the multi-repo sentry-options workflow.

    Also in 3 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 14 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If this session was compacted, the copy of this skill in context may be cut off.

    line 7
  2. Very specific:

    Read ${CLAUDE_SKILL_DIR}/SKILL.md from disk and resume at the step you are on.

    line 8
  3. Distinctive:

    Read all changed files before writing the summary

    line 42
  4. Distinctive:

    Do NOT add promotional or attribution footers

    line 46
  5. Distinctive:

    Do NOT add unnecessary lines (Co-Authored-By, Generated with, etc.)

    line 47
  6. Very specific:

    If the existing body contains user-added content, preserve it in a ## Notes section at the bottom.

    line 96
  7. Very specific:

    Read the empty file, then Write the body into the printed PR_BODY_FILE with the Write tool, in the Step 5 format with every section filled …

    line 171
  8. Distinctive:

    Write tool, in the Step 5 format with every section filled from the analysis (omit Breaking Changes when there are none).

    line 172
  9. Distinctive:

    If the PR title is vague (e.g., "update", "fix", "WIP"), suggest a better title:

    line 215
  10. Distinctive:

    Ask user before changing the title

    line 226
  11. Distinctive:

    Do NOT write a summary without reading ALL changed files

    line 230
  12. Distinctive:

    Do NOT rely only on commit messages — verify against actual diff

    line 231
  13. Distinctive:

    Do NOT include changes that don't exist in the PR

    line 232
  14. Distinctive:

    Do NOT use vague descriptions like "various improvements"

    line 233
  15. Distinctive:

    Do NOT overwrite existing PR body without analyzing it first

    line 234
  16. Distinctive:

    Do NOT skip reading file context — diffs alone can be misleading

    line 235
  17. Distinctive:

    Do NOT add information that isn't supported by the code changes

    line 236
  18. Distinctive:

    If you discovered a non-obvious pattern, pitfall, or insight during this session, log it:

    line 242

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

If this session was compacted, the copy of this skill in context may be cut off. Read ${CLAUDE_SKILL_DIR}/SKILL.md from disk and resume at the step you are on.

Preamble

eval "$("${VIBESTACK_HOME:-$HOME/.vibestack}/bin/vibe-slug" 2>/dev/null)" 2>/dev/null || SLUG="unknown"
_LEARN_FILE="${VIBESTACK_HOME:-$HOME/.vibestack}/projects/${SLUG:-unknown}/learnings.jsonl"
if [ -f "$_LEARN_FILE" ]; then
  _LEARN_COUNT=$(wc -l < "$_LEARN_FILE" 2>/dev/null | tr -d ' ')
  echo "LEARNINGS: $_LEARN_COUNT entries loaded"
  if [ "$_LEARN_COUNT" -gt 5 ] 2>/dev/null; then
    "${VIBESTACK_HOME:-$HOME/.vibestack}/bin/vibe-learnings-search" --limit 5 2>/dev/null || true
  fi
else
  echo "LEARNINGS: none yet"
fi

{{include lib/snippets/session-host.md}}

{{include lib/snippets/working-protocols.md}}

{{include lib/snippets/state-protocols.md}}

PR Summary Update

Philosophy

  • Analyze all changes without exception — track all commits included in the PR, not just the latest.
  • Accuracy is essential — do not guess; read the actual diff and code before describing.
  • Write from the reviewer's perspective — explain "why" this change was needed and what impact it has.

Rules

  • Read all changed files before writing the summary
  • Analyze ALL commits in the PR, not just the latest
  • Be precise — do not guess or hallucinate changes
  • Preserve existing PR metadata (labels, assignees, reviewers)
  • Do NOT add promotional or attribution footers
  • Do NOT add unnecessary lines (Co-Authored-By, Generated with, etc.)

Process

Step 1: Identify PR

Determine the PR number from argument or current branch:

# If argument provided, use it directly
PR_NUMBER={argument}

# Otherwise, infer from current branch
gh pr view --json number -q '.number'

Step 2: Gather PR Context

# Get current PR details
gh pr view {PR_NUMBER} --json title,body,baseRefName,headRefName,commits,files

# Get base branch
BASE_BRANCH=$(gh pr view {PR_NUMBER} --json baseRefName -q '.baseRefName')

# View all commits in PR
gh pr view {PR_NUMBER} --json commits -q '.commits[] | "\(.oid[:7]) \(.messageHeadline)"'

# View all changed files with stats
gh pr diff {PR_NUMBER} --stat

# View full diff
gh pr diff {PR_NUMBER}

Step 3: Analyze Existing PR Body

CRITICAL: Check the existing PR body first.

# Get current PR body
EXISTING_BODY=$(gh pr view {PR_NUMBER} --json body -q '.body')

Check for user-added content to preserve:

  • Manual notes or context added by the author
  • Links to related issues, designs, or discussions
  • Sections not generated by this skill (e.g., custom sections)

If the existing body contains user-added content, preserve it in a ## Notes section at the bottom.

Step 4: Deep Analysis

CRITICAL: Do not rely on diff statistics alone — understand the meaning of the changes.

For large PRs (>20 files or >1000 lines changed):

  • Group files by directory/module and analyze each group
  • Focus on structural changes first, then detail changes
  • Summarize at module level, not file level

For each changed file:

  1. Read the full diff — understand what was added, modified, removed
  2. Read the file — understand the full context around the changes
  3. Identify the purpose — why was this file changed?
  4. Assess impact — what depends on this? Could this break anything?

Categorize changes:

CategoryDescription
New FeatureNew functionality added
Bug FixExisting behavior corrected
RefactorCode restructured without behavior change
PerformanceOptimization improvements
DocumentationDocs, comments, README updates
TestTest additions or modifications
ConfigurationConfig, CI/CD, build changes
DependencyPackage additions, updates, removals
Breaking ChangeChanges that break existing API/behavior

Deliberation questions:

  • What is the single purpose of this PR?
  • Are there breaking changes for consumers?
  • What edge cases might be affected?
  • Are there any risks or known limitations?

Step 5: Craft PR Summary

Before writing, articulate:

  1. What problem does this PR solve? (Summary)
  2. What specific changes were made and why? (Changes)
  3. Are there any breaking changes? (Breaking Changes)
  4. How should a reviewer verify this works? (Test Plan)

PR body format:

## Summary
- Brief description of what and WHY

## Changes
- Change 1: why this was needed
- Change 2: why this was needed

## Breaking Changes
- (if any) Description of breaking change and migration path

## Test Plan
- [ ] How to verify changes work
- [ ] Edge cases to test

Step 6: Update PR Description

The body quotes commit messages, diff content and the existing PR text, so it never appears in shell source — not in a quoted argument, and not in a heredoc either: a line equal to the terminator ends the heredoc and everything after it runs as shell. Create a private file for it:

PR_BODY_FILE=$(mktemp "${TMPDIR:-/tmp}/vibe-pr-summary-XXXXXXXX")
echo "PR_BODY_FILE: $PR_BODY_FILE"

Read the empty file, then Write the body into the printed PR_BODY_FILE with the Write tool, in the Step 5 format with every section filled from the analysis (omit Breaking Changes when there are none). Then publish that file, substituting the printed path and the PR number:

PR_BODY_FILE='<PR_BODY_FILE>'
[ -s "$PR_BODY_FILE" ] || { echo "ABORT: $PR_BODY_FILE is empty — write the body with the Write tool first" >&2; exit 1; }
gh pr edit {PR_NUMBER} --body-file "$PR_BODY_FILE" && rm -f "$PR_BODY_FILE"

Step 7: Verify Update

# Confirm PR was updated
gh pr view {PR_NUMBER} --json title,body -q '.body'

Step 8: Report Summary

## PR Summary Updated

**PR**: #{PR_NUMBER}
**Title**: {title}
**Base**: {base_branch} ← {head_branch}

### Analysis
- Total commits: {N}
- Files changed: {N}
- Lines added: +{N}
- Lines removed: -{N}

### Categories
- feat: {N} changes
- fix: {N} changes
- refactor: {N} changes
- ...

PR description updated successfully.

Title Update

If the PR title is vague (e.g., "update", "fix", "WIP"), suggest a better title:

gh pr edit {PR_NUMBER} --title "<type>(<scope>): <subject>"

Note: PR title optionally uses scope. Commit messages use <type>: <subject> format without scope.

Only suggest title changes when:

  • Title is clearly vague or inaccurate
  • Title doesn't reflect the actual changes
  • Ask user before changing the title

Anti-Patterns

  • Do NOT write a summary without reading ALL changed files
  • Do NOT rely only on commit messages — verify against actual diff
  • Do NOT include changes that don't exist in the PR
  • Do NOT use vague descriptions like "various improvements"
  • Do NOT overwrite existing PR body without analyzing it first
  • Do NOT skip reading file context — diffs alone can be misleading
  • Do NOT add information that isn't supported by the code changes

Capture Learnings

If you discovered a non-obvious pattern, pitfall, or insight during this session, log it:

"${VIBESTACK_HOME:-$HOME/.vibestack}/bin/vibe-learnings-log" '{"skill":"pr-summary","type":"TYPE","key":"SHORT_KEY","insight":"DESCRIPTION","confidence":N,"source":"SOURCE","files":["path/to/relevant/file"]}'

Types: pattern, pitfall, preference, architecture, operational.

Only log genuine discoveries.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.