Stateful GitHub PR review scraper for AI agent workflows. Filter noise, cache seen comments, deliver signal.
Built with grimoire-wizard for interactive CLI prompts.
AI agents re-reading the same resolved comments, outdated threads, and bot spam on every loop — wasting tokens and losing context. pr-prism solves this with two commands: scrape only what's new, then resolve what's been addressed.
AI coding agents loop on PR review comments — re-reading the same resolved threads, outdated feedback, and bot noise on every iteration. This wastes tokens and loses context fast.
pr-prism solves this with two focused commands: scrape only what's new since the last run, then auto-resolve threads that have been addressed. Your agent gets clean signal, not stale noise.
- Node.js ≥ 20
- gh CLI authenticated (
gh auth login)
One-time use (no install):
npx pr-prism pr-review -- 42Global install:
npm install -g pr-prismLocal to your project:
npm install --save-dev pr-prismpr-review # list open PRs, pick interactively
pr-review 42 # process PR #42 directly
pr-review <url> # process by full GitHub PR URLOn first run, automatically appends output patterns to your .gitignore.
pr-resolve 42 # resolve all threads from last scrape
pr-resolve 42 --auto # smart resolve: addressed threads only
pr-resolve 42 --auto --dry-run # preview what would be resolved
pr-resolve 42 --auto --tag-agents # resolve + tag agents for re-review
pr-resolve 42 --tag-agents --comment "msg" # custom message
pr-resolve 42 --unresolve # re-open resolved threads--auto detection signals:
isOutdated— GitHub detected the commented lines were changed- Suggestion applied —
```suggestionblock content found in current file at HEAD
Skips threads with no signal. Posts a summary comment on the PR.
1. pr-review 42
→ pr-reviews/new-<timestamp>.md (new comments only)
2. Agent reads markdown, implements fixes, commits, pushes
3. pr-resolve 42 --auto --tag-agents
→ Auto-resolves addressed threads
→ Posts: "Auto-resolved 6/8 threads. 2 remain."
→ Tags agents for re-review
4. Repeat — only new replies appear
| File | Description |
|---|---|
pr-reviews/new-<timestamp>.md |
New actionable comments since last run |
pr-reviews/.scraped-ids.json |
Persistent ID cache — commit this |
pr-reviews/.threads-<pr>.json |
Thread IDs for pr-resolve |
Copy .pr-prism.example.json to .pr-prism.json in your repo root:
{
"agentMentions": ["cubic-dev-ai", "coderabbitai"]
}agentMentions — GitHub handles (without @) tagged in the post-resolve comment. Defaults to ["cubic-dev-ai"].
| Signal | Behaviour |
|---|---|
| Already-seen comment ID | Silently skipped |
| Resolved thread | Skipped + cached |
Bot author ([bot], KNOWN_BOTS) |
Skipped + cached |
| Outdated thread | Shown with ⚠️ OUTDATED warning |
| Social sharing links | Stripped from body |
```suggestion blocks |
Rendered as diff |
Thanks to all the amazing contributors who have helped make this project better! 🎉
PRs and issues welcome. Fork the repo, create a feature branch, and open a pull request.
MIT