Token导航 LogoToken导航TokenDH.com
AI 工具敏感数据github未标认证来源可访问clear审计提醒

pr-review-assistant公关审查助理

Agent Skill

pr-review-assistant 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,562

周安装

192

GitHub Stars

55

下载量

1,597
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pr-review-assistant(公关审查助理)
来源仓库:https://github.com/rysweet/amplihack
仓库路径:skills/pr-review-assistant
安装命令:
npx skills add https://github.com/rysweet/amplihack --skill pr-review-assistant
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

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

简介

pr-review-assistant 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

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:

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:

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:

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:

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> -b "Review comment here"
# Or for specific file reviews:
gh pr diff <PR-NUMBER> | grep "^---" | head -1
# Then post review with specific file:line references

Review Workflow

  1. Fetch PR details: Get PR number, branch, changed files
  2. Analyze changes: Run review against philosophy
  3. Generate feedback: Compile specific, actionable comments
  4. Post review: Create GitHub review with all comments
  5. Summary: Post overall assessment

Common Over-Engineering Patterns to Catch

Pattern 1: Configuration Complexity

# OVER-ENGINEERED: 50-line config class
class ConfigManager:
    def __init__(self, env_file, schema_file, validators):
        self.config = load_yaml(env_file)
        self.schema = load_json(schema_file)
        self.validators = validators
        # 40 more lines...

# SIMPLE: 5 lines
config = yaml.safe_load(open('.env.yaml'))

Pattern 2: Factory Pattern When Not Needed

# OVER-ENGINEERED: Factory for single implementation
class ValidationFactory:
    def create_validator(self, type):
        if type == "email":
            return EmailValidator()
        # ... more types

# SIMPLE: Direct function
def validate_email(email):
    return "@" in email and "." in email

Pattern 3: Generic Base Classes for One Use

# OVER-ENGINEERED: Base class never subclassed
class BaseRepository(ABC):
    @abstractmethod
    def find(self, id): pass
    # ... 20 abstract methods

class UserRepository(BaseRepository):
    # Forced to implement all abstract methods
    # But only uses 3 of them

# SIMPLE: Direct class
class UserRepository:
    def find(self, id):
        return self.db.query(User).get(id)

Pattern 4: Premature Optimization

# OVER-ENGINEERED: Complex caching for cache that's not needed
cache = LRUCache(maxsize=1000)
stats = CacheStats()
lock = threading.Lock()
# ... complex logic

# SIMPLE: None - profile first, optimize if needed
result = function(args)

Key Questions to Ask

When reviewing, ask these questions:

  1. Can this be simpler? If yes, why isn't it?
  2. Is this necessary now? Or is it future-proofing?
  3. What's the ONE thing this does? If there are many things, split it.
  4. Who will use this? Is the interface clear for them?
  5. What can go wrong? Are errors handled explicitly?
  6. Is this testable? Can the contract be verified?
  7. Will this need to change? Is it flexible without over-engineering?
  8. Could this be deleted? Better than could it be refactored?
  9. Does this follow our patterns? Or is it unique?
  10. Am I confident this works? Or is it speculative?

Success Criteria

A successful PR review using this skill:

  • Reviews code against amplihack philosophy, not just style
  • Identifies over-engineering with concrete suggestions
  • Verifies module structure and brick design
  • Checks test coverage adequacy
  • Provides specific file:line references
  • Offers concrete, actionable suggestions
  • Recognizes and acknowledges good design
  • Posts comprehensive GitHub review comments
  • Helps team learn and improve

Output

The skill produces:

  1. Philosophy Compliance Report

- Ruthless Simplicity check - Modular Architecture check - Zero-BS Implementation check - Test Coverage assessment - Overall assessment

  1. Specific Recommendations

- Over-engineering identified with examples - Simplification suggestions with code - Module structure feedback - Test gaps to address

  1. GitHub Comments (optional)

- Detailed review with file:line references - Inline code suggestions - Summary of findings - Constructive, respectful tone

Philosophy References

All reviews anchor in these documents:

  • ~/.amplihack/.claude/context/PHILOSOPHY.md - Core development philosophy
  • ~/.amplihack/.claude/context/PATTERNS.md - Approved patterns and anti-patterns
  • Specs/ - Module specifications for architecture verification
  • ~/.amplihack/.claude/context/DISCOVERIES.md - Known issues and solutions

Tips for Effective Reviews

  1. Be Specific: Reference exact lines and code
  2. Explain Why: What principle is violated and why it matters
  3. Suggest How: Provide concrete code examples
  4. Respect Constraints: Some complexity may be necessary
  5. Acknowledge Good Work: Praise what's done well
  6. Ask Questions: "Have you considered?" invites discussion
  7. Learn Together: Reviews are teaching opportunities
  8. Iterate: Suggest improvements, don't demand perfection
  9. Consider Context: External constraints matter
  10. Stay Focused: Review philosophy alignment, not personal style

Related Skills and Workflows

  • Module Spec Generator: Creates specifications for regeneratable modules
  • Builder Agent: Implements code from specifications
  • Reviewer Agent: Philosophy compliance verification
  • Tester Agent: Test generation and validation
  • Document-Driven Development: Uses specs as source of truth

Feedback and Evolution

This skill should evolve based on usage:

  • What patterns do we keep finding?
  • What suggestions lead to better code?
  • What philosophy principles are most violated?
  • How can we catch issues earlier?

Document learnings in ~/.amplihack/.claude/context/DISCOVERIES.md.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.89%
按下载量换算477

OpenCode

22.2%
按下载量换算355

Antigravity

16.15%
按下载量换算258

Gemini CLI

12.96%
按下载量换算207

windsurf

8.95%
按下载量换算143

Cursor

3.26%
按下载量换算52

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills