pr-review-assistant

rysweet/amplihack · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/rysweet/amplihack --skill pr-review-assistant
0 commentsdiscussion
summary

Philosophy-aware pull request reviews that go beyond syntax and style to check alignment with amplihack's core development principles. This skill reviews PRs not just for correctness, but for ruthless simplicity, modular architecture, and zero-BS implementation.

skill.md

PR Review Assistant Skill

Purpose

Philosophy-aware pull request reviews that go beyond syntax and style to check alignment with amplihack's core development principles. This skill reviews PRs not just for correctness, but for ruthless simplicity, modular architecture, and zero-BS implementation.

When to Use This Skill

  • PR Code Reviews: Review PRs against amplihack philosophy principles
  • Philosophy Compliance: Check that code embodies ruthless simplicity and brick module design
  • Refactoring Suggestions: Identify over-engineering and suggest concrete simplifications
  • Architecture Verification: Verify modular design and clear contracts
  • Test Coverage: Assess test adequacy for changed functionality
  • Design Assessment: Catch over-engineering before it gets merged

Core Philosophy: What We Review For

1. Ruthless Simplicity

Every line of code must justify its existence. We ask:

  • Can this be simpler? Does each function do one thing well?
  • Is this necessary now? Or is it future-proofing?
  • Are there unnecessary abstractions? Extra layers that don't add value?
  • Can we remove lines? The best code is code that doesn't exist.

2. Modular Architecture (Brick & Studs)

Code should be organized as self-contained modules with clear connections:

  • Brick = Self-contained module with ONE clear responsibility
  • Stud = Public contract (functions, API, data models) others connect to
  • Regeneratable = Can be rebuilt from specification without breaking connections

3. Zero-BS Implementation

No shortcuts, stubs, or technical debt:

  • No TODOs in code = Actually implement or don't include it
  • No NotImplementedError = Except in abstract base classes
  • No mock data = Real functionality from the start
  • No dead code = Remove unused code
  • Every function works = Or it doesn't exist

4. Quality Over Speed

  • Robust implementations = Better than quick fixes
  • Long-term maintainability = Not short-term gains
  • Clear error handling = Errors visible, not swallowed
  • Tested behavior = Verify contracts at module boundaries

Review Process

Step 1: Understand the Changes

Start by understanding what the PR changes:

  1. Read the PR description to understand intent
  2. Identify affected modules and their scope
  3. Note the dependencies changed or added
  4. Understand the problem being solved

Step 2: Check Philosophy Alignment

Review each change against amplihack principles:

Ruthless Simplicity Check

  • Is every line necessary?
  • Are there unnecessary abstractions?
  • Could this be implemented more simply?
  • Is there future-proofing or speculation?
  • Are there duplicate or similar functions?
  • Could conditional logic be simplified?

Module Structure Check

  • Does the change respect module boundaries?
  • Are public contracts clear and documented?
  • Are internal utilities isolated?
  • Does the module have ONE clear responsibility?
  • Are there circular dependencies?

Zero-BS Check

  • Are there TODOs or NotImplementedError calls?
  • Are mock or test data exposed in production code?
  • Is error handling explicit and visible?
  • Are all functions working implementations?
  • Is there dead code or unused variables?

Step 3: Identify Over-Engineering

Look for common over-engineering patterns:

  • Over-abstraction: Base classes, protocols, factories for no clear benefit
  • Generic "frameworks": Building infrastructure for hypothetical needs
  • Premature optimization: Complex algorithms for non-critical paths
  • Configuration complexity: 50-line config when 5-line default would work
  • Future-proofing: "We might need this someday" code
  • Excessive layering: More indirection than necessary
  • Over-parameterization: Functions with 8+ parameters instead of simpler approach

Step 4: Verify Brick Module Structure

If new modules or module changes:

  • Single responsibility? What is the ONE thing this module does?
  • Clear public interface? What's exported and why?
  • Internal isolation? Are utilities contained within module?
  • Dependencies documented? What does it depend on?
  • Tests included? Does spec define test requirements?
  • Examples provided? Is usage clear?
  • Regeneratable? Could this be rebuilt from a specification?

Step 5: Check Test Coverage

Adequate testing is crucial:

  • Contract verification: Tests verify public interface behavior
  • Edge cases covered: Null, empty, boundary conditions tested
  • Error paths tested: Exceptions raised when expected
  • Integration tested: Module connections verified
  • Coverage adequate: 85%+ for changed code

Step 6: Provide Constructive Feedback

When suggesting changes:

  1. Be specific: Reference file:line numbers
  2. Explain why: What principle is violated?
  3. Suggest how: Provide concrete examples
  4. Be respectful: Focus on code, not person
  5. Acknowledge good work: Recognize what's done well

Concrete Review Checklist

Ruthless Simplicity

  • Every function has single clear purpose
  • No unnecessary abstraction layers
  • No future-proofing or speculation
  • No duplicate logic or functions
  • Conditional logic is straightforward
  • Variable names are clear and self-documenting
  • Function signatures aren't over-parameterized

Modular Architecture

  • Module has ONE clear responsibility
  • Public interface is minimal and clear
  • Internal utilities properly isolated
  • Dependencies are explicit
  • No circular dependencies
  • Clear contracts at boundaries
  • Module can be understood independently

Zero-BS Implementation

  • No TODOs, NotImplementedError, or stubs
  • No mock/test data in production code
  • No dead code or unused imports
  • Error handling is explicit and visible
  • All functions have working implementations
  • No swallowed exceptions
  • Clear logging/error messages for debugging

Test Coverage

  • Public interface is tested
  • Edge cases covered
  • Error conditions tested
  • Integration points verified
  • Coverage adequate (85%+)
  • Tests verify contract, not implementation

Documentation

  • Docstrings are clear and complete
  • Public interface documented
  • Examples provided for new features
  • Module README updated if needed
  • Type hints present and accurate

Example Reviews

Example 1: Identifying Over-Engineering

PR: Add user permission checking to API

Code Changed:

class PermissionValidator:
    def __init__(self):
        self.cache = {}

    def validate(self, user, resource):
        if user in self.cache:
            return self.cache[user]

        result = self._complex_validation(user, resource)
        self.cache[user] = result
        return result

    def _complex_validation(self, user, resource):
        # Complex business logic...
        pass

Review Comment:

FILE: permissions.py (lines 10-25)

This over-engineers the permission checking with caching that may not be needed.
The caching layer adds complexity without proven benefit:

1. Cache can become stale if user permissions change
2. Unclear when/if cache should be invalidated
3. In-memory cache doesn't scale across processes
4. Permission checks are usually not in hot paths

SUGGESTION - Start simpler:
```python
def check_permission(user, resource):
    """Check if user can access resource."""
    # Direct implementation
    return user.has_access_to(resource)

If caching is needed later, add it when profiling shows it helps.

This aligns with ruthless simplicity: don't add complexity until proven necessary.


### Example 2: Identifying Lack of Regeneration Documentation

**PR**: Add new authentication module

**Code Changed**: New file `~/.amplihack/.claude/tools/auth/auth.py`

**Review Comment**:

FILE: .claude/tools/auth/ (new module)

Good: Module has clear responsibilities (JWT validation, token refresh). Issue: Missing specification documentation for module regeneration.

Brick Philosophy Requirement: Modules should be regeneratable from spec.

ACTION NEEDED:

  1. Create Specs/authentication.md with:
    • Clear purpose and scope
    • Public interface (exported functions)
    • Dependencies listed
    • Test requirements
    • Usage examples

This enables future rebuilding if requirements change.

See .claude/skills/pr-review-assistant/ for specification template.


### Example 3: Identifying Zero-BS Issues

**PR**: Add data processing pipeline

**Code Changed**:
```python
def process_data(data):
    """Process data through pipeline."""
    # TODO: Add error handling
    result = validate(data)
    if not result:
        return None  # swallowed error

    # TODO: Implement caching
    return transform(result)

Review Comment:

FILE: pipeline.py (lines 5-15)

Zero-BS Issues Found:

1. LINE 6: TODO comments - implement or remove
   - "Add error handling" - Either add it now or create issue
   - "Implement caching" - Not needed yet; add if profiling shows benefit

2. LINE 10: Swallowed error
   - validate() likely raised exception, but returns None
   - Make error explicit: raise ValueError("Invalid data")
   - Or catch and re-raise with context

3. LINE 8: Silent failures
   - If None is returned, caller doesn't know why
   - Either raise exception or return Result type

SUGGESTION:
```python
def process_data(data):
    """Process data through pipeline.

    Raises:
        ValueError: If data validation fails
    """
    result = validate(data)  # Raises if invalid
    return transform(result)

All code is production-ready, no TODOs.


### Example 4: Identifying Missing Tests

**PR**: Add user role management

**Code Changed**: New class `RoleManager` in user module

**Review Comment**:

FILE: user.py (lines 50-100)

New functionality added without adequate tests.

ISSUE: RoleManager public interface not tested

  • add_role(user, role) - add success case
  • remove_role(user, role) - add success case
  • get_roles(user) - test empty, single, multiple
  • is_admin(user) - test true/false cases

EDGE CASES MISSING:

  • duplicate role assignment (should be idempotent)
  • removing non-existent role (should not error)
  • get_roles on user with no roles (should return empty)

CONTRACT VERIFICATION:

  • Functions accept documented types
  • Return types match documentation
  • Exceptions raised as documented

ADD: tests/test_role_manager.py with 85%+ coverage


### Example 5: Recognizing Good Design

**PR**: Add simplified config loader

**Code Changed**:
```python
def load_config(path):
    """Load YAML config from file.

    Args:
        path: Path to config file

    Returns:
        dict: Parsed config

    Raises:
        FileNotFoundError: If file doesn't exist
        ValueError: If YAML is invalid
    """
    with open(path) as f:
        try:
            return yaml.safe_load(f)
        except yaml.YAMLError as e:
            raise ValueError(f"Invalid YAML: {e}") from e

Review Comment:

EXCELLENT - This is exactly the simplicity we want:

✅ Single responsibility: Load and parse YAML
✅ Clear error handling: Explicit exceptions with context
✅ No TODOs or stubs: Production ready
✅ Complete documentation: Clear args, returns, exceptions
✅ No over-engineering: Direct implementation
✅ Testable: Clear behavior to verify

This is a model example of ruthless simplicity.

Feedback Template

When commenting on PRs, use this structure:

**FILE**: path/to/file.py (lines X-Y)

**ISSUE**: [Principle violated - Simplicity/Modularity/Zero-BS/Tests/Docs]

**WHAT**: [Describe what's in the code]

**WHY IT'S PROBLEMATIC**: [How it violates amplihack principles]

**SUGGESTION**: [Concrete code example or approach]

**REFERENCE**: [Link to relevant philosophy, principle, or example]

Integration with GitHub

Posting Review Comments

The skill can post review comments to GitHub PRs using:

gh pr comment <PR-NUMBER
how to use pr-review-assistant

How to use pr-review-assistant on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add pr-review-assistant
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/rysweet/amplihack --skill pr-review-assistant

The skills CLI fetches pr-review-assistant from GitHub repository rysweet/amplihack and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/pr-review-assistant

Reload or restart Cursor to activate pr-review-assistant. Access the skill through slash commands (e.g., /pr-review-assistant) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.574 reviews
  • Mateo Abebe· Dec 24, 2024

    I recommend pr-review-assistant for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Isabella Sharma· Dec 16, 2024

    pr-review-assistant reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ganesh Mohane· Dec 12, 2024

    pr-review-assistant is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Sophia White· Dec 12, 2024

    Keeps context tight: pr-review-assistant is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Omar Sethi· Dec 12, 2024

    pr-review-assistant is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Shikha Mishra· Dec 8, 2024

    We added pr-review-assistant from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Valentina Bansal· Nov 15, 2024

    pr-review-assistant fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Sophia Iyer· Nov 7, 2024

    Registry listing for pr-review-assistant matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Sakshi Patil· Nov 3, 2024

    Keeps context tight: pr-review-assistant is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Sophia Srinivasan· Nov 3, 2024

    pr-review-assistant is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

showing 1-10 of 74

1 / 8