analyze-pr-performance

Analyze code review pipeline performance for a specific PR. Use when investigating slow PRs, identifying bottlenecks, or debugging performance issues in code reviews.

16 stars

Best use case

analyze-pr-performance is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Analyze code review pipeline performance for a specific PR. Use when investigating slow PRs, identifying bottlenecks, or debugging performance issues in code reviews.

Teams using analyze-pr-performance should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/analyze-pr-performance/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/analyze-pr-performance/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/analyze-pr-performance/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How analyze-pr-performance Compares

Feature / Agentanalyze-pr-performanceStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Analyze code review pipeline performance for a specific PR. Use when investigating slow PRs, identifying bottlenecks, or debugging performance issues in code reviews.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Analyze PR Performance

Analyze code review pipeline performance for a specific PR.

## Usage

Run the analyze-pr-performance CLI script with the provided arguments:

```bash
npx ts-node scripts/analyze-pr-performance.cli.ts $ARGUMENTS
```

## Arguments

- `prNumber` (required): The PR number to analyze
- `orgId` (required): The organization ID

## Options

- `--days=N`: Number of days to search back (default: 7)
- `--legacy`: Also search in legacy collection (observability_logs)
- `--env=PATH`: Path to .env file (e.g., `--env=.env.prod`)

## Examples

```bash
# Analyze performance for PR #558 in production
/analyze-pr-performance 558 04bd288b-595a-4ee1-87cd-8bbbdc312b3c --env=.env.prod

# Analyze with extended date range
/analyze-pr-performance 723 97442318-9d2a-496b-a0d2-b45fb --days=14 --env=.env.prod

# Analyze with legacy logs included
/analyze-pr-performance 701 97442318-9d2a-496b-a0d2-b45fb --legacy --env=.env.prod
```

## What it analyzes

1. **Pipeline identification**: Finds the pipelineId and correlationId for the PR

2. **Stage times**: Shows duration of each pipeline stage:
   - ValidateNewCommitsStage
   - ResolveConfigStage
   - FetchChangedFilesStage
   - PRLevelReviewStage
   - FileAnalysisStage
   - CreateFileCommentsStage
   - UpdateCommentsAndGenerateSummaryStage
   - And all other stages...

3. **LLM calls**: Details of each LLM operation:
   - Operation name (analyzeCodeWithAI, selectReviewMode, kodyRulesAnalyzeCodeWithAI, etc.)
   - Duration
   - Model used
   - Token counts (input/output)

4. **Summary metrics**:
   - Total pipeline duration
   - Total LLM calls count
   - Total tokens (input/output)
   - Slow calls count (> 60s)
   - Models used

5. **Bottlenecks**: Highlights stages and LLM calls taking > 60 seconds

6. **Pipeline status**: Whether the pipeline completed, failed, or is unknown

## Output

The script outputs:
- Pipeline and correlation IDs
- Organization and repository info
- Stage times table with duration and percentage of total
- LLM calls table with model, tokens, and duration
- Summary metrics
- Bottleneck list (stages and LLM calls > 60s)
- Final pipeline status

## How to Respond

- Identify the slowest stages and explain why they might be slow
- Look for LLM calls that are taking too long (> 2 minutes is concerning)
- Check if multiple slow LLM calls are running sequentially vs in parallel
- Note any patterns (e.g., all selectReviewMode calls are slow = possible model issue)
- Suggest potential optimizations if bottlenecks are clear
- If FileAnalysisStage is slow, it's usually due to many files or large files being analyzed
- If PRLevelReviewStage is slow, check the KodyRules and PR-level analysis calls
- Compare token counts to durations - high tokens with proportional time is expected, low tokens with high time indicates API latency issues
- Report the pipeline status and check if it completed successfully

Related Skills

analyze-rust-optimizations

16
from diegosouzapw/awesome-omni-skill

This skill performs thorough analysis of Rust libraries to find optimization opportunities. It should be used when reviewing Rust code for performance improvements, memory efficiency, or when profiling indicates bottlenecks. Focuses on runtime performance and memory usage through dynamic profiling tools and static code analysis.

analyze-project-architecture

16
from diegosouzapw/awesome-omni-skill

LLM-based architectural analysis that transforms raw project data into meaningful structure

analyze

16
from diegosouzapw/awesome-omni-skill

Deep analysis and investigation

analyze-m1-module-for-migration

16
from diegosouzapw/awesome-omni-skill

Systematically analyze a Magento 1 module to determine its purpose, usage, and migration requirements for Magento 2. Use when you need to decide whether to migrate a M1 module, find alternatives, or skip it.

analyze-function

16
from diegosouzapw/awesome-omni-skill

Deep line-by-line analysis of a function or method. Explains what each line does, why it's written that way, performance implications, edge cases, and design patterns. Use when user says "analyze-function", "analyze {function}", "deep dive on {function}", or "explain {function} line by line".

analyze-friction

16
from diegosouzapw/awesome-omni-skill

Orchestrate 3-stage friction analysis workflow across conversations. Extracts raw friction, abstracts patterns, and presents for approval. Use when user wants to analyze conversation history for improvement opportunities.

analyze-codebase

16
from diegosouzapw/awesome-omni-skill

Analyze a codebase to generate a comprehensive architecture and structure report. Use when user wants to understand a codebase, explore project structure, or generate analysis.

analyze-code

16
from diegosouzapw/awesome-omni-skill

Deep code analysis using consultant agent. Identifies technical debt, risks, and improvement opportunities.

analyze-code-structure

16
from diegosouzapw/awesome-omni-skill

Examine code organization and identify structural patterns. Use when reviewing module design.

analyze-architecture

16
from diegosouzapw/awesome-omni-skill

Comprehensive brownfield architecture analysis for existing codebases. Discovers structure, identifies patterns, assesses quality, calculates production readiness, and provides actionable recommendations. Use when analyzing existing codebases to understand architecture, assess quality, or prepare for modernization.

acc-analyze-solid-violations

16
from diegosouzapw/awesome-omni-skill

Analyzes PHP codebase for SOLID principle violations. Detects God classes (SRP), type switches (OCP), broken contracts (LSP), fat interfaces (ISP), and concrete dependencies (DIP). Generates actionable reports with severity levels and remediation recommendations.

30-analyze-impact-150

16
from diegosouzapw/awesome-omni-skill

[30] ANALYZE. Understand how changes impact the system — what's the core, what's affected, what depends on what. Use when planning changes, analyzing systems, debugging issues, or anytime you need to see the full picture of cause and effect. Triggers on "what's affected", "impact analysis", "dependencies", "scope mapping", or when you need to understand ripple effects.