Skip to content
analyze-pr-performance logo

Analyze PR Performance

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.

SKILL.md

Full skill instructions

Analyze PR Performance

Analyze code review pipeline performance for a specific PR.

Usage

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

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

# 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

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View