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/svngoku/coding-agents-skills/performance-optimizationnpx skills add svngoku/coding-agents-skills --skill performance-optimizationgit clone --depth 1 https://github.com/svngoku/coding-agents-skillsWhat 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.00175 | $0.03490 |
| Opus 5 | $0.00088 | $0.01745 |
| Sonnet 5 | $0.00035 | $0.00698 |
| Haiku 4.5 | $0.00017 | $0.00349 |
Grade A, and why
performance-optimization scanned grade A with 1 finding 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 3d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
| High TTFB | Slow backend or no CDN | `curl -w` timing breakdown | How it starts
The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Performance Optimization
Most "slow" problems are diagnosed by guesswork. This skill replaces guessing with a measure-first workflow: profile, fix minimally, re-measure against a budget. Covers backend (database, caching, concurrency), frontend (bundles, images, rendering), network (CDN, compression, HTTP), and memory, with concrete tools and before/after examples.
Quick Reference
| Topic | Reference |
|---|---|
| Profiling tools per runtime and reading flame graphs | profiling-tools.md |
| EXPLAIN, index design, N+1 fixes, caching, pooling | backend-optimization.md |
| Bundles, images, React rendering, Core Web Vitals | frontend-performance.md |
Core Workflow
1. Measure First
Never optimize before you can answer: "how do I know it got faster?"
- Reproduce — get a repeatable trigger (endpoint, page, script, load profile).
- Baseline — record current latency distribution, throughput, and resource usage.
- Budget — set an explicit target (e.g., p95 < 200 ms, initial JS < 170 KB gzipped).
- Profile — find where time actually goes (CPU, I/O wait, dependency latency, GC).
- Hypothesize — one bottleneck, one predicted fix, one measurable effect.
- Fix minimally — the smallest change that tests the hypothesis.
- Re-measure — same tool, load, and environment; keep the fix only if it moves the metric.
2. The Triage Loop (symptom → cause)
| Symptom | Likely cause | Quick check |
|---|---|---|
| High p95 but healthy p50 | Queueing, GC pauses, one slow dependency | Percentile breakdown; GC logs; sample slow requests |
| Slow only under load | Contention, pool exhaustion, saturation | Load test at increasing concurrency; watch pool waits |
| Slow in prod, fast locally | Cold cache, missing index on prod-size data | EXPLAIN on prod data; cache hit ratio |
| ORM makes dozens of queries | N+1 lazy loading | Log query counts; enable ORM query logging |
| High CPU | CPU-bound loop, regex, serialization | cProfile / py-spy dump |
| Memory grows monotonically | Leak or unbounded cache | Heap snapshots; cache size/capacity audit |
| Slow page load, fast API | Render-blocking JS/CSS, oversized images | Lighthouse waterfall; DevTools Network |
| High TTFB | Slow backend or no CDN | curl -w timing breakdown |
What ships with it
9 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.
- eval.yaml 1.4 KB
- fixtures/slow.py 2.0 KB runs code
- graders/check.py 11 KB runs code
- instructions/optimize-orders-endpoint.md 2.2 KB
- references/backend-optimization.md 4.4 KB
- references/frontend-performance.md 4.0 KB
- references/profiling-tools.md 4.2 KB
- rubrics/quality.md 2.1 KB
- solutions/reference-optimize-orders-endpoint 4.3 KB
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.
- 3d ago First seen · 299 lines · 175 tokens per session scan A 0ccc15dd66e9
performance-optimization is a skill published in the GitHub repository svngoku/coding-agents-skills (9 stars, last pushed 20d ago), licensed MIT. It adds 175 tokens to every session and 3,490 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
skill-authoring
Author SKILL.md skills: frontmatter, validator limits, structure.
iflytek-hyper-tts
Use when user asks to synthesize speech, convert text to audio, or read text aloud. 讯飞超拟人语音合成 - 支持文本转语音、语音合成(发音人/语速/语调/音量/输出格式)。大模型语音合成技能。语音合成, 文字转语音, 超拟人, TTS.
iflytek-voiceclone-tts
Use when user asks to clone a voice, train a custom voice model, or synthesize speech with a cloned voice. iFlytek Voice Clone tts(声音复刻) — train a custom voice model from audio samples and synthesize speech with the cloned voice. Supports the full workflow: get training text → create task → upload audio → submit…
iflytek-pdf-image-ocr
AI-powered OCR service for images and PDF documents using iFlytek's advanced recognition APIs.
iflytek-translate
Translate text using iFlytek's Machine Translation API (机器翻译). Supports 70+ language pairs.
iflytek-contract-intelligence-review
Use when user asks to review contracts, detect contract risks, or perform compliance checks. 合同智能审核 - 对合同扫描件、图片合同、双语合同进行完整审核。 覆盖 OCR 识别、条款分析、风险检测、合规校对、翻译摘要全流程。 适用于法务审核、采购合同审查、供应链合规检查等场景。 关键词:合同审核、风险检测、条款分析、合规校对、contract review、risk detection。.