suggest-performance-fix_skill

This skill identifies performance bottlenecks in code and suggests senior level optimizations to significantly speed up critical paths.
  • Python

2

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill kjgarza/marketplace-claude --skill suggest-performance-fix

  • SKILL.md10.2 KB

Overview

This skill identifies performance issues and bottlenecks in code and suggests optimizations a senior developer would recommend. It focuses on clear anti-patterns like N+1 queries, inefficient algorithms, missing indexes, and excessive I/O or memory usage. The goal is to provide measurable, prioritized fixes with estimated impact and effort. Use it to get actionable, testable improvements rather than speculative micro-optimizations.

How this skill works

The skill scans code and queries for known anti-patterns, measures or estimates complexity (Big O), and matches hotspots to performance categories: algorithmic, database, memory, I/O, frontend/API, and concurrency. It estimates impact and effort, generates concrete fixes (code examples, query changes, indexing suggestions, batching or streaming strategies), and prioritizes them by expected improvement. Where runtime measurements are absent it provides theoretical analysis and asks for profiling data when needed.

When to use it

  • User asks why a request or operation is slow or degrading under load
  • Code contains obvious anti-patterns (N+1 queries, nested loops, bubble sort)
  • Working on performance-critical paths or high-traffic endpoints
  • Profiling reveals hotspots or unexpected resource usage
  • Large data processing, bulk DB operations, or heavy I/O detected

Best practices

  • Measure before and after each change: profile latency, CPU, memory and DB metrics
  • Prioritize fixes by impact vs effort; fix high-impact, low-effort issues first
  • Prefer algorithmic and query-level fixes over premature micro-optimizations
  • Batch I/O and DB calls, use streaming for large payloads, and add indexes where read patterns justify them
  • Cache expensive but stable results and avoid deep cloning or large in-memory datasets
  • Verify fixes under realistic load and add monitoring to catch regressions

Example use cases

  • Detect and fix an N+1 query by converting loops of per-row queries into a single JOIN or IN query with grouping
  • Replace an O(n²) custom sort with a built-in O(n log n) sort or push sorting to the database
  • Recommend and estimate benefit of adding an index for a frequently filtered column
  • Suggest batching or streaming for large file processing to reduce memory pressure
  • Identify missing connection pooling or prepared statements to reduce DB latency under concurrency

FAQ

Provide profiling output (CPU, flamegraphs, DB EXPLAIN plans, latency histograms). The skill will map hotspots to fixes or ask targeted follow-ups.

Will the skill suggest micro-optimizations like inlining or bit-level tweaks?

No. It focuses on high-impact changes (algorithms, queries, I/O, memory, concurrency) and avoids premature micro-optimizations unless they are proven bottlenecks.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational