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/vignesh2027/ai-agent-skills/performance-optimizationnpx skills add vignesh2027/AI-AGENT-SKILLS --skill performance-optimizationgit clone --depth 1 https://github.com/vignesh2027/AI-AGENT-SKILLSWrote 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/vignesh2027/ai-agent-skills/performance-optimization)<a href="https://agentmods.dev/skills/vignesh2027/ai-agent-skills/performance-optimization"><img src="https://agentmods.dev/badge/skills/vignesh2027/ai-agent-skills/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.1 | $0.00014 | $0.00649 |
| Opus 5 | $0.00007 | $0.00324 |
| Sonnet 5 | $0.00003 | $0.00130 |
| Haiku 4.5 | $0.00001 | $0.00065 |
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 5d 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 — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
Performance optimization without profiling is guessing. This skill enforces: measure first, optimize the bottleneck, measure again. It prevents wasted effort on non-bottlenecks and ensures optimizations don't regress correctness.
When to Use
- When performance doesn't meet SLO
- Before any "performance improvement" PR
- When a feature is slow and the cause is unknown
- As part of the
/reviewworkflow for latency-sensitive paths
Process
Step 1: Measure the baseline
Before touching any code, record: current p50/p95/p99 latency, throughput, error rate under representative load. Without a baseline, you can't prove improvement.
Step 2: Profile to find the bottleneck
Run a profiler, not your intuition:
- CPU-bound: CPU profiler (flamegraph)
- Memory-bound: heap profiler, allocation profiler
- I/O-bound: database query analyzer, network profiler
- Web frontend: Chrome DevTools Performance tab, Lighthouse
The bottleneck is almost never where you think it is.
Step 3: Identify the worst offender
The single slowest operation in the critical path. Fix that first. Do not optimize non-bottlenecks.
Step 4: Write a benchmark before optimizing
Create a benchmark that isolates the bottleneck and can be run repeatedly. This is your before/after comparison.
Step 5: Optimize
Common patterns:
- Database: add missing indexes, eliminate N+1 queries, batch reads, use projections (don't SELECT *)
- Memory: streaming vs loading, lazy evaluation, object pooling
- CPU: algorithmic improvement, caching, memoization
- Network: batching, compression, HTTP/2, CDN, edge caching
- Frontend: code splitting, lazy loading, virtual scrolling, image optimization
Step 6: Measure the improvement
Run the benchmark before and after. Calculate: % improvement in p99, % reduction in resource usage. If the improvement is not measurable, the optimization was not worth the complexity.
Step 7: Verify correctness
Run the full test suite. Performance optimizations frequently introduce bugs.
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.
- 5d ago First seen · 71 lines · 14 tokens per session scan A 090ae5d1cf89
performance-optimization is a skill published in the GitHub repository vignesh2027/AI-AGENT-SKILLS (2 stars, last pushed 7d ago), licensed MIT. It adds 14 tokens to every session and 649 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-31.
Other skills, from other repositories
writing
将共享历史中的已验证事实和计算结果整理成符合受众、格式与长度约束的成稿。.
feishu
Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.
interview
Ask one useful structured question at a time only when material product/implementation choices are genuinely missing; remember answers and produce a brief/spec. Discoverable facts should be investigated instead of asked.
mcp-scripting
Write mcpScript JavaScript for discovering, inspecting, and calling MCP tools.
subagent-driven-development
Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
322-frameworks-spring-boot-testing-integration-tests
Use when you need to write or improve integration tests — including Testcontainers with @ServiceConnection, @DataJdbcTest persistence slices, TestRestTemplate or MockMvcTester for HTTP, data isolation, and container lifecycle management for Spring Boot 4.0.x. This should trigger for requests such as Review Java code…