Performance analysis

From event4u-app/agent-config · View interactive version

Performance analysis is an AI agent skill from the GitHub repository event4u-app/agent-config. Performance audit — bottleneck profiling, N+1 query detection, hot-path analysis; explicit request only, not part of regular feature work.

How to use this skill

Skill file

performance-analysis

Mission

Find performance bottlenecks before they affect users. This skill is proactive — it

analyzes code for performance issues, not just responds to "it's slow" reports.

For writing performant code patterns (caching, eager loading, Redis), use the performance skill.

For test suite performance, use test-performance.

When to use

Use this skill when:

Do NOT use when:

Procedure: Performance analysis

1. Identify hotspots

Focus on code paths with high execution frequency or large data volumes:

2. Database query analysis

| Pattern | What to look for |

|---|---|

| N+1 queries | ->load() or relationship access in loops, missing ->with() |

| Missing indexes | WHERE clauses on unindexed columns, slow ORDER BY |

| Full table scans | SELECT * without WHERE, LIKE '%term%' |

| Unnecessary queries | Same query executed multiple times in one request |

| Large result sets | Loading thousands of models when only counts or IDs are needed |

| Missing pagination | ->get() on unbounded queries |

| Suboptimal joins | Multiple queries that should be a single JOIN |

| Transaction scope | Transactions holding locks longer than necessary |

3. Application-level bottlenecks

| Pattern | What to look for |

|---|---|

| Synchronous I/O | HTTP calls, file operations, or API calls in the request cycle |

| Memory bloat | Loading entire collections when chunking would work |

| Redundant computation | Same calculation repeated without caching |

| Missing cache | Data that rarely changes but is queried on every request |

| Stale cache | Cache that is never invalidated or has wrong TTL |

| Serialization overhead | Large models serialized to JSON unnecessarily |

| Loop inefficiency | O(n²) patterns with nested loops or repeated array searches |

4. Queue and job analysis

5. Infrastructure-level checks

Output format

  1. Emit one entry per bottleneck using the field list below; never collapse multiple bottlenecks into a single entry.
  2. Severity, Effort, and Confidence are required for every entry and must use the bounded vocabulary (Low / Medium / High / Critical for severity; confirmed | plausible | unverified for confidence, per docs/contracts/adversarial-review-protocol.md § Confidence).
  3. Close with a Recommended Fix Order ranked by Impact ÷ Effort and capped at 5 items.

For each bottleneck:

Integration with other skills

Gotcha

Do NOT

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.