Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/ariegoldkin/ai-agent-hub/performance-optimizationnpx skills add ArieGoldkin/ai-agent-hub --skill performance-optimizationgit clone --depth 1 https://github.com/ArieGoldkin/ai-agent-hubWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ariegoldkin/ai-agent-hub/performance-optimization)<a href="https://agentmods.dev/skills/ariegoldkin/ai-agent-hub/performance-optimization"><img src="https://agentmods.dev/badge/skills/ariegoldkin/ai-agent-hub/performance-optimization.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00014 | $0.01251 |
| Opus 5 | $0.00007 | $0.00626 |
| Sonnet 5 | $0.00003 | $0.00250 |
| Haiku 4.5 | $0.00001 | $0.00125 |
Grade A, and why
Performance Optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Performance Optimization Skill
Comprehensive frameworks for analyzing and optimizing application performance across the entire stack.
When to Use
- Application feels slow or unresponsive
- Database queries taking too long
- Frontend bundle size too large
- API response times exceed targets
- Core Web Vitals need improvement
- Preparing for scale or high traffic
Performance Targets
Core Web Vitals (Frontend)
| Metric | Good | Needs Work |
|---|---|---|
| LCP (Largest Contentful Paint) | < 2.5s | < 4s |
| INP (Interaction to Next Paint) | < 200ms | < 500ms |
| CLS (Cumulative Layout Shift) | < 0.1 | < 0.25 |
| TTFB (Time to First Byte) | < 200ms | < 600ms |
Backend Targets
| Operation | Target |
|---|---|
| Simple reads | < 100ms |
| Complex queries | < 500ms |
| Write operations | < 200ms |
| Index lookups | < 10ms |
Bottleneck Categories
| Category | Symptoms | Tools |
|---|---|---|
| Network | High TTFB, slow loading | Network tab, WebPageTest |
| Database | Slow queries, pool exhaustion | EXPLAIN ANALYZE, pg_stat_statements |
| CPU | High usage, slow compute | Profiler, flame graphs |
| Memory | Leaks, GC pauses | Heap snapshots |
| Rendering | Layout thrashing | React DevTools, Performance tab |
Database Optimization
Key Patterns
- Add Missing Indexes - Turn
Seq ScanintoIndex Scan - Fix N+1 Queries - Use JOINs or
includeinstead of loops - Cursor Pagination - Never load all records
- Connection Pooling - Manage connection lifecycle
Quick Diagnostics
-- Find slow queries (PostgreSQL)
SELECT query, calls, mean_time / 1000 as mean_seconds
FROM pg_stat_statements ORDER BY total_time DESC LIMIT 10;
-- Verify index usage
EXPLAIN ANALYZE SELECT * FROM orders WHERE user_id = 123;
See
templates/database-optimization.tsfor N+1 fixes and pagination patterns
Caching Strategy
Cache Hierarchy
L1: In-Memory (LRU, memoization) - fastest
L2: Distributed (Redis/Memcached) - shared
L3: CDN (edge, static assets) - global
L4: Database (materialized views) - fallback
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 174 lines · 14 tokens per session scan A 2edaad1efc50
Performance Optimization is a skill published in the GitHub repository ArieGoldkin/ai-agent-hub (11 stars, last pushed 9mo ago), licensed MIT. It adds 14 tokens to every session and 1,251 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
performance-optimizer
Profile, diagnose, and fix performance bottlenecks in applications. Use when optimizing slow queries, reducing load times, improving runtime performance, or reducing memory usage.
performance-optimization
Optimizes application performance. Use when performance requirements exist, when you suspect performance regressions, or when Core Web Vitals or load times need improvement. Use when profiling reveals bottlenecks that need fixing.
performance-engineer
!cat skills/shared/protocols/ux-protocol.md 2>/dev/null || true !cat .production-grade.yaml 2>/dev/null || echo "No config — using defaults".
performance-optimizer
Systematic performance profiling and optimization for Python and web backends — measure first, fix second, verify the fix.
performance-profiling
Performance Profiling & Optimization: Helps diagnose and fix performance issues including memory leaks, CPU bottlenecks, slow queries, high latency, and throughput problems. Covers profiling tools, flame graphs, load testing, caching strategies, and optimization techniques for Node.js, Java, Flutter, and web…
performance-optimization
Profiling, optimization techniques, and performance best practices.