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 darellchua2/opencode-config-template --skill performance-optimization-skillgit clone --depth 1 https://github.com/darellchua2/opencode-config-templateWrote 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/darellchua2/opencode-config-template/performance-optimization-skill)<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/performance-optimization-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/performance-optimization-skill.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.00039 | $0.04248 |
| Opus 5 | $0.00019 | $0.02124 |
| Sonnet 5 | $0.00008 | $0.00850 |
| Haiku 4.5 | $0.00004 | $0.00425 |
Grade C, and why
performance-optimization-skill scanned grade C 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 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
When protocol is enabled, this skill defaults to `Iterations: 10` (sufficient for typical single-pass workflows). Override with `Iterations: N` for specific tasks. Safety blocks: `.env`, `node_modules/`, `rm -rf`, `git p How it starts
The opening of the file, as written. The whole thing — 565 lines — stays where its author put it; the contents beside it link to each section on GitHub.
What I do
I help you identify and resolve performance bottlenecks across the full stack:
- Profiling: CPU, memory, and I/O profiling for Python and Node.js
- Caching: Redis, memoization, HTTP caching, and CDN strategies
- Bundle Optimization: JavaScript bundle analysis and reduction
- Lazy Loading: Code splitting and on-demand resource loading
- Database Query Optimization: N+1 detection, query analysis, indexing
- Memory Leaks: Detection and resolution patterns
When to use me
Use this skill when:
- Investigating slow API responses or page loads
- Setting up caching layers (Redis, memoization)
- Analyzing and reducing JavaScript bundle size
- Detecting and fixing N+1 query problems
- Profiling CPU or memory usage
- Implementing lazy loading or code splitting
- Optimizing database query performance
- Diagnosing memory leaks in long-running processes
Related Skills
- database-migration-skill: Handles schema lifecycle (creating indexes in migrations). This skill handles runtime query optimization and profiling.
- frontend-design-skill: UI creation. This skill handles rendering performance optimization.
- docker-containerization-skill: Container resource limits and configuration.
Step 1: Profiling
Python (cProfile)
python -m cProfile -s cumtime app.py
python -m cProfile -o profile.stats app.py
import cProfile
import pstats
def profile_function(func, *args):
profiler = cProfile.Profile()
result = profiler.runcall(func, *args)
stats = pstats.Stats(profiler)
stats.sort_stats('cumulative')
stats.print_stats(20)
return result
Python (line_profiler)
from line_profiler import profile
@profile
def slow_function(data):
result = []
for item in data:
processed = expensive_operation(item)
result.append(processed)
return result
Node.js
node --prof app.js
node --prof-process isolate-*.log > profile.txt
NODE_OPTIONS="--inspect" node app.js
# Open chrome://inspect → CPU Profile
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 · 565 lines · 39 tokens per session scan C 345e897556e5
performance-optimization-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 39 tokens to every session and 4,248 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
om-data-model-design
Design or change standalone module entities, relations, encryption maps, migrations, snapshots, locking, and atomic writes. Use for "add entity", "database model", "migration", "encrypt this field", "optimistic locking", "model danych", or persistence bugs.
qdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high', 'OOM crash', 'queries are slow', 'latency spike', or 'search was fast now it's slow'. Also use when performance degrades without obvious config changes.
performance
Use when optimizing application performance — caching strategies, eager loading, query optimization, Redis patterns, or background job design.
kora-aop-caching
Kora caching via compile-time AOP — @Cacheable/@CachePut/@CacheInvalidate over Caffeine (in-process) or Redis (distributed). Use when adding caching, choosing Caffeine vs Redis, or fixing "required keyPrefix" graph errors.
perf-engineering
A guide to finding and fixing slow code, excessive memory use, slow startup, repeated database queries, and inefficient caching.
stale-derived-state
Diagnose a change that does not take effect until a reload, a logout or a navigation away and back, because a cache or a piece of derived state has no invalidation hook on write. Use when a save appears to work but the screen keeps showing the old value. Names the Crumbtrail queries that prove the write landed, and…