AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Performance Optimization

skill-developersglobal-ai-agent-skills-performance-optimization · by DevelopersGlobal

Measure first, optimize second. Data-driven performance improvements with before/after benchmarks and production validation.

No reviews yet
0 installs
39 views
0.0% view→install

Install

$ agentstack add skill-developersglobal-ai-agent-skills-performance-optimization

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-developersglobal-ai-agent-skills-performance-optimization)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Performance Optimization? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Overview

Premature optimization is the root of all evil. But ignoring performance until it's a crisis is equally harmful. This skill enforces data-driven optimization: profile first, optimize the bottleneck, measure the improvement.

When to Use

  • When performance issues are reported in production
  • Before optimizing any code (to ensure you're optimizing the right thing)
  • When reviewing changes that touch performance-sensitive paths

Process

Step 1: Measure the Baseline

  1. Reproduce the performance issue reliably.
  2. Measure current performance: latency p50/p95/p99, throughput, memory, CPU.
  3. Profile to find the actual bottleneck — not where you think it is.
  4. Write the performance test you'll use to validate improvement.

Verify: You have concrete baseline numbers, not gut feelings.

Step 2: Identify the Real Bottleneck

  1. Use profiling tools: flame graphs, CPU profiles, memory profiles.
  2. Find the top 3 hotspots by actual execution time (not lines of code).
  3. The bottleneck is rarely where you expect it to be. Trust the data.

Verify: Bottleneck identified by profiling data, not assumption.

Step 3: Optimize Only the Bottleneck

  1. Fix only the profiled bottleneck — nothing else.
  2. Common optimizations by type:
  • CPU: Algorithmic improvement (O(n²) → O(n log n)), caching, batching
  • Memory: Streaming instead of buffering, object pooling, lazy loading
  • I/O: Connection pooling, N+1 query elimination, caching, async/parallel calls
  • AI: Prompt caching, batch inference, smaller models for simpler tasks

Verify: Change targets the profiled bottleneck, not speculative improvements.

Step 4: Measure the Improvement

  1. Run the same performance test from Step 1.
  2. Compare before vs. after metrics.
  3. If improvement < 20%: the optimization may not be worth the complexity.

Verify: Improvement measured with the same test harness as baseline.

Common Rationalizations (and Rebuttals)

| Excuse | Rebuttal | |--------|----------| | "I know where the bottleneck is" | You're probably wrong. Profile first. | | "This is clearly slow" | "Clearly slow" rarely matches profiler output. Measure. | | "We'll optimize later" | If it's slow enough to mention, it's slow enough to measure now. |

Verification

  • [ ] Baseline metrics captured before any optimization
  • [ ] Bottleneck identified by profiler (not assumption)
  • [ ] Optimization targets only the profiled bottleneck
  • [ ] Improvement measured with same test harness
  • [ ] Before/after numbers documented

References

  • [references/performance-checklist.md](../../references/performance-checklist.md)
  • [observability skill](../observability/SKILL.md)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.