
Pr Review
Teach agents and reviewers how to leave PR comments that explain intent and constraints instead of narrating obvious code.
Overview
pr-review is an agent skill most often used in Ship (also Build, Operate) that guides effective PR and code comments by explaining why—not what—the code does.
Install
npx skills add https://github.com/athola/claude-night-market --skill pr-reviewWhat is this skill?
- Why-not-what philosophy with a four-type value table (why, what, context, obvious)
- Explicit require-comment scenarios: non-obvious behavior, business logic, performance tradeoffs, workarounds, algorithms
- Skip-comment guidance tied to self-explanatory naming, CRUD patterns, and standard library usage
- Actionable reviewer lens for edge cases, TODO context, and API or rate-limit documentation
- Four comment value types in the core philosophy table
- Six scenarios that require comments
- Four scenarios where comments are not required
Adoption & trust: 1 installs on skills.sh; 304 GitHub stars; 0/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
AI and human reviewers flood PRs with obvious “what” comments that add noise instead of the context and decisions the next reader actually needs.
Who is it for?
Solo builders using agents to review diffs who want consistent, lightweight comment standards before merge.
Skip if: Teams that only need automated lint/format gates with no narrative review, or repos where comments are banned by policy.
When should I use this skill?
Reviewing or authoring pull requests where comment quality and signal-to-noise ratio matter.
What do I get? / Deliverables
Review feedback and suggested comments prioritize high-value why, context, and constraint notes so merges stay faster and knowledge transfers stick.
- PR review notes ranked by comment value
- Suggested inline comments focused on why and context
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Pull request review is the canonical moment to enforce comment quality, even though the same rules apply whenever code is written or revised. The skill is framed as PR review guidance—ideal shelf under Ship → review alongside other quality gates before merge.
Where it fits
Ask the agent to critique a PR diff and only suggest comments where behavior, business rules, or API limits need explanation.
While implementing retry logic, have the agent propose a single comment documenting exponential backoff for transient failures.
Review a complex UI state handler and flag missing context comments on non-obvious edge cases.
Hotfix branch review where TODO comments must cite the tracking issue and expected removal conditions.
How it compares
Use as comment-quality doctrine on top of generic linters—not a substitute for static analysis or security scanners.
Common Questions / FAQ
Who is pr-review for?
Indie developers and small teams who run AI-assisted or human pull request reviews and want comments that explain decisions, limits, and workarounds instead of duplicating the diff.
When should I use pr-review?
During Ship review on every meaningful PR; while building when the agent authors tricky logic; and during Operate iterate when documenting fixes, edge cases, or temporary workarounds in changed files.
Is pr-review safe to install?
It is procedural review guidance with no shell or network behavior by itself; check the Security Audits panel on this Prism page before enabling any bundled repo tooling.
SKILL.md
READMESKILL.md - Pr Review
# Code Comment Quality Guidelines Guidance on when and how to write effective code comments that add value without bloat. ## Core Philosophy: Why, Not What Good comments explain **why** code exists, not **what** it does. The code already shows what it does. | Comment Type | Value | Example | |--------------|-------|---------| | **Why** | High | "Use exponential backoff to handle transient API failures" | | **What** | Low | "Loop through the array" | | **Context** | High | "AWS Lambda has 15-min timeout, so max 3 retries" | | **Obvious** | Negative | "Increment counter by 1" | ## When Comments Are Warranted ### Require Comments For | Scenario | Reason | Example | |----------|--------|---------| | **Non-obvious behavior** | Future readers will wonder why | Edge case handling | | **Business logic decisions** | Domain knowledge not in code | "Tax calculated per 2024 regulations" | | **Performance optimizations** | Why this approach over simpler one | "O(1) lookup vs O(n) iteration" | | **Workarounds** | Temporary fixes need context | "TODO: Remove after #123 fixed" | | **Algorithm complexity** | Complex logic needs explanation | Mathematical formulas | | **External constraints** | Dependencies, APIs, limits | "API rate limit: 100 req/min" | ### Don't Require Comments For | Scenario | Alternative | |----------|-------------| | Self-explanatory code | Good naming | | Simple CRUD operations | Patterns speak | | Well-named functions | Function name = documentation | | Standard patterns | Convention over comment | ## Examples ### Good Comments (Explain Why) ```python def retry_with_backoff(max_attempts=3): """Retry with exponential backoff for transient failures. AWS Lambda has a 15-minute timeout, so max_attempts=3 prevents exceeding this limit with our 1s/2s/4s backoff strategy. """ ... # Use set for O(1) membership testing instead of list O(n) # Critical for processing 100k+ items in batch jobs seen_ids = set() ``` ### Bad Comments (Explain What - Avoid These) ```python # Bad: Restates code i = 0 # Set i to 0 # Bad: Obvious from code if user_input == "": # Check if user_input is empty string return DEFAULT_VALUE # Bad: Redundant docstring def add(a, b): """Add two numbers and return the result.""" return a + b ``` ## Anti-Patterns ### Over-Commenting (Bloat) **Problem**: Too many comments obscure code and become maintenance burden. **Symptoms**: - Comment-to-code ratio > 1:3 - Comments on every line - Comments restating variable names **Solution**: Improve code clarity instead. Better names, smaller functions. ### Stale Comments (Out of Sync) **Problem**: Comments that don't match current code behavior are worse than no comments. **Symptoms**: - Function behavior changed, comment didn't - TODO comments for completed work - References to deleted code **Solution**: Update comments with code changes. Delete outdated TODOs. ### Commented-Out Code **Problem**: Dead code clutters codebase and confuses readers. **Solution**: Delete it. Git preserves history. ## Docstring Conventions ### When Required - Public functions/methods - Classes with non-obvious purpose - Modules with significant complexity ### Format (Python) ```python def process_order(order: Order, apply_discount: bool = False) -> Receipt: """Process an order and generate a receipt. Validates inventory, applies pricing rules, and records transaction. Args: order: The order to process. apply_discount: Whether to apply member discount (default: False). Returns: Receipt with itemized charges and total. Raises: InsufficientStockError: If any item is out of stock. PaymentFailedError: If payment processing fails. """ ``` ### Format (TypeScript) ```typescript /** * Process an order and generate a receipt. * * Validates inventory, applies pricing rules, and records transaction. * * @param order - The order to process * @param applyDiscount - Wh