performance-concurrency-advisor

Diagnose performance bottlenecks in Kotlin Spring services using metrics, traces, and SQL plans.

14|1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/Kotlin/kotlin-backend-agent-skills --skill performance-concurrency-advisor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-concurrency-advisor
Source: https://github.com/Kotlin/kotlin-backend-agent-skills/tree/main/.agents/skills/performance-concurrency-advisor
Command: npx skills add https://github.com/Kotlin/kotlin-backend-agent-skills --skill performance-concurrency-advisor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze and improve performance, throughput, latency, and concurrency behavior in Kotlin plus Spring services using real evidence from metrics, traces, SQL, thread or heap signals, and code paths. Use when endpoints are slow, pools saturate, coroutines or reactive flows block unexpectedly, N+1 or contention appears, or caching and parallelism decisions need precise, non-generic guidance.

Core Features & Use Cases

  • Evidence-driven bottleneck localization across layers: database query count and latency, connection pool contention, downstream HTTP or messaging latency, thread pool starvation, event-loop blocking, and cache misses or invalidation churn.
  • Actionable, minimal-change recommendations with explicit tradeoffs and verification steps, guided by measured evidence.
  • Use Case: When a Kotlin Spring service under load shows tail latency spikes, this skill identifies the true bottleneck and proposes the smallest high-leverage change with a clear validation plan.

Quick Start

Provide a set of runtime metrics and traces for your Kotlin Spring service and let the analyzer identify bottlenecks and propose the smallest high-leverage change.

Frequently Asked Questions about performance-concurrency-advisor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose slow endpoint responses in a Kotlin Spring service?

Diagnose slow endpoint responses by analyzing runtime metrics, traces, and SQL explain plans to localize the performance bottleneck. The advisor evaluates connection pool contention, downstream HTTP latency, and thread pool starvation to identify the true cause of latency spikes.

Why do coroutines block unexpectedly in my Spring reactive flows?

Coroutines block unexpectedly in Spring reactive flows due to event-loop blocking or thread pool starvation. Analyzing thread and heap signals alongside recent code changes reveals where blocking operations occur, enabling you to apply minimal changes that restore asynchronous execution.

What is the best way to find N+1 query issues causing cache contention?

Finding N+1 query issues causing cache contention requires examining SQL explain plans and trace data to measure query counts and cache miss rates. Evidence-driven localization isolates the exact database access pattern, guiding minimal-change recommendations for optimal caching and parallelism.

Can I use runtime metrics to fix connection pool saturation in Kotlin?

Use runtime metrics to fix connection pool saturation in Kotlin by measuring pool contention and downstream latency. The analysis identifies saturated pools using real signals, then proposes the smallest high-leverage change with explicit tradeoffs and a verification plan.

How to verify a recommended performance change in a Spring service?

Verify a recommended performance change in a Spring service by following the provided validation plan. The advisor outputs explicit verification steps alongside the recommended change and tradeoffs, ensuring the minimal fix is validated against measured metrics and traces.