pr-review-extract-lessons

Analyze completed PR review plans to group recurring mistake patterns.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/Shreeyak/claude-pr-review-plugin --skill pr-review-extract-lessons
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-review-extract-lessons
Source: https://github.com/Shreeyak/claude-pr-review-plugin/tree/main/skills/extract-lessons
Command: npx skills add https://github.com/Shreeyak/claude-pr-review-plugin --skill pr-review-extract-lessons

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill tackles recurring coding mistakes identified in PR reviews by analyzing patterns across multiple PRs and proposing actionable rules for your project's CLAUDE.md, preventing the same errors from happening again without manual tracking.

Core Features & Use Cases

  • Pattern Detection: Groups actionable review threads by root causes like missing error handling or incorrect API usage, filtering for patterns with at least two instances per PR.
  • Candidate Tracking: Accumulates patterns in a dedicated file with a 2-PR threshold before promotion, ensuring rules are based on genuine recurrences rather than one-offs.
  • Rule Proposal: Drafts broad, actionable rules for CLAUDE.md, seeks user approval before any edits, and handles worktree vs. main repo distinctions for persistent storage.
  • Use Case: After completing reviews on several PRs for a Kotlin project, the Skill identifies repeated issues with null checks on hardware resources and proposes a generic rule like "Always null-check return values from methods acquiring hardware resources," which you approve to add to CLAUDE.md for future agent guidance.

Quick Start

Analyze the completed PR review plan in .pr-review/ to extract recurring patterns and propose rules for CLAUDE.md.

Frequently Asked Questions about pr-review-extract-lessons

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract recurring code patterns from GitHub PR reviews?

To extract recurring code patterns from GitHub PR reviews, analyze completed review plans in your .pr-review/ directory to group actionable threads by root causes, filtering for mistake categories with at least two instances per PR. The Skill tracks these patterns as candidates across multiple PRs.

What is the best way to track coding mistakes across multiple pull requests?

Tracking coding mistakes across multiple pull requests is done by accumulating actionable review thread patterns in a dedicated candidate file. The Skill applies a 2-PR promotion threshold, ensuring proposed rules are based on genuine recurrences rather than one-off errors before adding them to your project guidance.

Can I automatically update CLAUDE.md with new coding rules from PR review feedback?

You can update CLAUDE.md with new coding rules from PR review feedback by having the Skill draft broad, actionable rules from recurring patterns. It requires user approval before editing CLAUDE.md and handles worktree detection to ensure rules are written to the main repository.

How are recurring mistake patterns identified before proposing project rules?

Recurring mistake patterns are identified by grouping actionable review threads by root causes, such as missing error handling or incorrect API usage. The Skill filters for categories with at least two threads per PR and requires a 2-PR threshold before promoting a candidate to a proposed project rule.

Does the lesson extraction process work inside a git worktree?

The lesson extraction process works inside a git worktree but requires worktree detection for writing to the main repository. This distinction ensures that proposed rules and candidate tracking files are stored persistently in the main repository rather than isolated worktree environments.

Why does a mistake pattern need to appear in two PRs before becoming a rule?

A mistake pattern needs to appear in two PRs before becoming a rule to prevent one-off errors from cluttering your project guidance. This 2-PR promotion threshold ensures the Skill only proposes broad, actionable rules for CLAUDE.md based on genuine recurrences across multiple reviews.