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 skills add chandrudp29/skillhub --skill performance-optimizergit clone --depth 1 https://github.com/chandrudp29/skillhubWrote 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/chandrudp29/skillhub/performance-optimizer)<a href="https://agentmods.dev/skills/chandrudp29/skillhub/performance-optimizer"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/performance-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/chandrudp29/skillhub/performance-optimizer"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/performance-optimizer.svg" alt="Reviewed on agentmods" width="80" 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.00026 | $0.01214 |
| Opus 5.5 | $0.00010 | $0.00486 |
| Sonnet 5.5 | $0.00005 | $0.00243 |
| Haiku 4.5 | $0.00003 | $0.00121 |
Grade A, and why
performance-optimizer 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 3mo 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 — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When to Use
Apply when a system is slow, costs too much, or fails under load. Always measure before optimizing — guessing wastes time.
Core Rules
- Measure first, always. Never optimize without a profiler or benchmark showing the bottleneck
- Fix the biggest bottleneck first — fixing #2 before #1 gives partial gains at best
- Define a target before optimizing: "p99 < 200ms" not "faster"
- After every optimization, re-measure — sometimes fixes have side effects
The Loop
1. Measure → profiler, APM, benchmark (establish baseline)
2. Identify → find the hot path (usually 1-3 functions cause 80%+ of time)
3. Hypothesize → why is this slow? (N+1 query, GIL contention, memory copy, etc.)
4. Fix → smallest change that addresses root cause
5. Verify → re-run benchmark — is it faster? Regressions elsewhere?
6. Repeat → next bottleneck
Python Profiling
# cProfile — CPU profiling
import cProfile, pstats, io
pr = cProfile.Profile()
pr.enable()
# ... code to profile ...
pr.disable()
s = io.StringIO()
ps = pstats.Stats(pr, stream=s).sort_stats('cumulative')
ps.print_stats(20)
print(s.getvalue())
# line_profiler — line-by-line (use @profile decorator)
# pip install line_profiler
# kernprof -l -v script.py
# memory_profiler — memory usage line-by-line
# pip install memory_profiler
# @profile decorator, then: python -m memory_profiler script.py
# py-spy — sampling profiler, zero-code-change, attach to running process
# pip install py-spy
# py-spy top --pid 12345
# py-spy record -o profile.svg --pid 12345
Common Python Bottlenecks
# ❌ String concatenation in loop — O(n²) allocations
result = ""
for item in items:
result += str(item) # new string object each time
# ✓ join — one allocation
result = "".join(str(item) for item in items)
# ❌ Repeated dict/set lookup in hot loop
for item in items:
if item in some_list: # O(n) each time if it's a list
...
# ✓ Convert to set once
lookup = set(some_list) # O(1) lookup
for item in items:
if item in lookup:
...
# ❌ Unnecessary object creation in loop
for i in range(1_000_000):
temp = MyClass(i) # constructor overhead × 1M
# ✓ Reuse or use slots
class MyClass:
__slots__ = ['value'] # ~40% less memory, faster attribute access
# ❌ GIL-bound CPU work in threads
from threading import Thread # threads share GIL — no real parallelism for CPU
# ✓ Use ProcessPoolExecutor for CPU-bound work
from concurrent.futures import ProcessPoolExecutor
with ProcessPoolExecutor() as pool:
results = list(pool.map(cpu_intensive_fn, items))
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.
- 3mo ago First seen · 149 lines · 26 tokens per session scan A c09d8220f25e
performance-optimizer is a skill published in the GitHub repository chandrudp29/skillhub (14 stars, last pushed 5mo ago), licensed MIT. It adds 26 tokens to every session and 1,214 once invoked, about $0.0001 per session on Opus 5.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.
performance-optimizer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| performance-optimizerchandrudp29/skillhub | Skill | 14 | 5mo ago | MIT | A | 26 | Claude Code, Codex |
| performance-optimizerasgarovf/locusai | Skill | 23 | 8mo ago | MIT | A | 36 | Claude Code |
| performance-engineerbuiphucminhtam/forgewright | Skill | 49 | 3d ago | none | A | 50 | Claude Code |
| profilingchaterm/terminal-skills | Skill | 60 | 9mo ago | Apache-2.0 | A | 5 | Claude Code, Codex |
| performance-profilingcamilooscargbaptista/cto-toolkit | Skill | 9 | 8mo ago | MIT | A | 166 | Claude Code |
| performance-expertpersonamanagmentlayer/pcl | Skill | 46 | 1mo ago | Apache-2.0 | A | 48 | Claude Code |
| performance-optimizationjuanmhidalgo/claude-plugins | Skill | 8 | 18d ago | MIT | A | 35 | Claude Code |