analyze-pr

Pull request analysis and review for Flutter projects. Use when analyzing PRs, reviewing changes, or preparing PR feedback. Triggers on PR, pull request, merge request, diff, changes.

⭐36stars🔀72forks📁View on GitHub🕐Updated Jan 7, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill automates the pull request analysis and code review process specifically for Flutter projects. It streamlines the evaluation of code changes by checking for Clean Architecture compliance, Riverpod state management patterns, security vulnerabilities, and performance optimizations. By leveraging Git and GitHub CLI tools, it provides developers with structured, actionable feedback and comprehensive summaries to ensure high-quality merges and maintain project standards.

Use Cases

  • Automated Flutter PR Audits: Quickly analyze incoming pull requests to identify architectural violations, missing tests, or improper state management before a human review.
  • Security and Performance Screening: Conduct deep-dive checks on diffs to detect hardcoded secrets, SQL injection risks, and inefficient widget rebuilds in Flutter applications.
  • Standardized Feedback Generation: Use the built-in PR feedback template to provide consistent, professional, and constructive comments on merge requests.
  • Technical Debt Prevention: Ensure all new code follows project-specific patterns, such as proper i18n implementation in ARB files and adherence to dependency injection rules.
  • Context-Aware Change Analysis: Use Git commands to compare branches and understand the full context of changes, including commit history and impact on existing features.
nameanalyze-pr
descriptionPull request analysis and review for Flutter projects. Use when analyzing PRs, reviewing changes, or preparing PR feedback. Triggers on PR, pull request, merge request, diff, changes.
allowed-toolsRead, Grep, Glob, Bash(git:*), Bash(gh:*)

Pull Request Analysis

PR Review Process

1. Understand the Context

  • Read PR title and description
  • Check linked issues/tickets
  • Understand the goal of the changes

2. Review File Changes

# List changed files
git diff --name-only main...HEAD

# View changes with context
git diff main...HEAD

# Check specific file changes
git diff main...HEAD -- path/to/file.dart

3. Check Code Quality

Architecture

  • Clean Architecture layers respected
  • No layer violations
  • Proper dependency injection

State Management

  • Riverpod patterns followed
  • AsyncValue properly handled
  • Provider types appropriate

Testing

  • Tests added for new code
  • Existing tests pass
  • Edge cases covered

4. Security Review

  • No secrets in code
  • Input validation present
  • No SQL injection risks
  • Proper auth checks

5. Performance Review

  • No N+1 queries
  • Proper pagination
  • Image optimization
  • Widget rebuild minimized

PR Feedback Template

## Summary
[Brief summary of the changes reviewed]

## What's Good
- [Positive aspects of the implementation]

## Suggestions
- [ ] [Actionable improvement suggestions]

## Questions
- [Clarifying questions about the implementation]

## Testing
- [ ] Verified locally
- [ ] Tests pass
- [ ] Edge cases considered

Common PR Issues

Issue Recommendation
Large PR (>500 lines) Split into smaller PRs
Missing tests Request test coverage
No PR description Ask for context
Breaking changes Ensure migration path
Missing i18n Add translations to all ARB files

Git Commands for Review

# View commit history
git log main...HEAD --oneline

# Check for merge conflicts
git merge-base main HEAD

# View stats
git diff --stat main...HEAD

# Interactive review with gh
gh pr view --web
gh pr diff

Approval Criteria

Must Have

  • All tests pass
  • No analyzer warnings
  • Code follows project patterns
  • Changes match PR description

Nice to Have

  • Documentation updated
  • Performance considered
  • Edge cases handled