Skip to content

mturac/pluginpool-pr-storyteller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hero

pr-storyteller

Stop writing PR descriptions from a blank cursor. Generate a real one in seconds.

License: MIT Python 3.8+ Claude Code Plugin Tests: 6 passing

TL;DR: /pr-storyteller → PR title + summary + test plan, drafted from your actual commits and diff.

Why this exists

PR descriptions decay the moment they leave the author's keyboard. The reviewer skims, the author forgets to update later, and three months in nobody knows why the PR landed. pr-storyteller gives you a draft grounded in the commit history and the diff against your base branch — Claude then writes the prose, you tweak, you ship.

Install (Claude Code)

git clone https://github.com/mturac/pluginpool-pr-storyteller ~/.claude/plugins/pr-storyteller

Restart Claude Code; the slash command /pr-storyteller appears.

Quick start

/pr-storyteller

Or invoke the helper directly:

python3 scripts/story.py
python3 scripts/story.py --base develop

Flags

Flag Default Description
--base main (falls back to master) Base branch to diff against

Example output (JSON)

{
  "commits": [
    {"hash": "abc1234", "subject": "feat(auth): rotate refresh tokens"},
    {"hash": "def5678", "subject": "test(auth): cover stale-token replay"}
  ],
  "files_changed": [
    {"path": "src/auth/refresh.py", "additions": 84, "deletions": 12},
    {"path": "tests/test_refresh.py", "additions": 41, "deletions": 0}
  ],
  "suggested_title": "feat(auth): rotate refresh tokens"
}

Claude turns that into:

### Summary
- Rotate the refresh-token secret on every successful refresh
- Reject stale refresh tokens that have already been redeemed

### Changes
- `src/auth/refresh.py` — token rotation + replay rejection
- `tests/test_refresh.py` — coverage for the replay path

### Test plan
- [ ] Successful login → both access and refresh tokens issued
- [ ] Reuse a refresh token → 401 + token family invalidated
- [ ] Clock skew tolerance still passes

How it works

  1. Reads git log <base>..HEAD for commits (hash + subject).
  2. Reads git diff --stat <base>..HEAD for changed files + additions/deletions.
  3. Suggests a title from the latest commit subject.
  4. Claude composes a real PR body from that scaffold.

Limitations

  • Doesn't fetch from the remote — make sure your local <base> is current.
  • Handles empty diffs and non-git directories gracefully (returns empty JSON).
  • Binary files surface via git diff --numstat and are reported with - for additions/deletions.

Examples

Step-by-step walkthroughs with real input fixtures and the helper's actual output live in examples/. Three or four scenarios per plugin — from the happy path to the edge cases the test suite guards.

Part of the pluginpool family

Ten focused Claude Code plugins for everyday productivity: commit-narrator · pr-storyteller · test-gap · deps-doctor · env-lint · secret-guard · standup-gen · todo-harvest · flaky-detector · changelog-forge

License

MIT — see LICENSE. Contributions welcome.

About

Group conventional commits into a CHANGELOG section with semver bump suggestion.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors