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/xiaowen-jiang/agent-enterprise/performance_optimizationnpx skills add Xiaowen-Jiang/agent-enterprise --skill performance_optimizationgit clone --depth 1 https://github.com/Xiaowen-Jiang/agent-enterpriseWrote 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/xiaowen-jiang/agent-enterprise/performance_optimization)<a href="https://agentmods.dev/skills/xiaowen-jiang/agent-enterprise/performance_optimization"><img src="https://agentmods.dev/badge/skills/xiaowen-jiang/agent-enterprise/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.00488 |
| Opus 5 | $0.00007 | $0.00244 |
| Sonnet 5 | $0.00003 | $0.00098 |
| Haiku 4.5 | $0.00001 | $0.00049 |
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.
What it actually says
Process
- Identify hot paths — Which code runs most frequently or handles the most data?
- Check algorithmic complexity — Look for O(n^2) or worse in loops, searches, sorts
- Database query analysis:
- N+1 queries (loop making individual queries instead of batch)
- Missing indexes on WHERE/JOIN/ORDER BY columns
- SELECT * when only specific columns needed
- Unnecessary subqueries that could be JOINs
- Caching opportunities:
- Repeated expensive computations
- Frequently read, rarely updated data
- API responses that can be cached
- Memory usage — Large objects in memory, memory leaks, unnecessary copies
- I/O optimization — Batch operations, connection pooling, async I/O
- Lazy loading — Defer expensive operations until actually needed
Output Format
## Performance Analysis: [Component/Module]
### Bottlenecks Found (Impact Order)
#### 1. [Bottleneck Title]
- **Location**: file:line
- **Type**: Algorithm / Database / Memory / I/O
- **Current**: O(n^2) nested loop over all users
- **Proposed**: Use a hash map for O(n) lookup
- **Expected Impact**: High / Medium / Low
- **Effort**: Small / Medium / Large
### Quick Wins
- [Changes that are easy to implement with high impact]
### Long-Term Improvements
- [Larger refactors for sustained performance gains]
### Metrics to Track
- [What to measure to verify improvements]
Guidelines
- Profile before optimizing — don't guess where bottlenecks are
- Fix the biggest bottleneck first (Amdahl's law)
- Prefer algorithmic improvements over micro-optimizations
- Consider caching only when data is read-heavy and stale data is acceptable
- Database indexes have write overhead — only add for proven query patterns
- Measure before and after every change
- Don't sacrifice readability for marginal performance gains
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 · 61 lines · 14 tokens per session scan A 5bb0ab7170e0
Performance Optimization is a skill published in the GitHub repository Xiaowen-Jiang/agent-enterprise (52 stars, last pushed 5mo ago), licensed MIT. It adds 14 tokens to every session and 488 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
code-review
Performs thorough code reviews with focus on best practices, security, performance, and maintainability. Use this skill when reviewing pull requests, auditing code quality, or getting feedback on implementations.
compound-engineering
Orchestration layer that coordinates Debt-Sentinel, Red Team Tribunal, and Spec-Lock into unified workflows. Use when you need comprehensive quality assurance with multiple validation stages. Provides safe-edit workflows, CI pipelines, enhancement pipelines, and engineering metrics dashboard.
tsq-product-audit
통합 제품 감사 스킬. 7개 영역(Security, Performance, SEO, Accessibility, UI/UX, Architecture, Functional)을 정량 스코어링으로 평가하고, 6단계 사이클(Plan→Audit→Report→Remediation Plan→Fix→Re-audit)로 운영한다. Use when: Phase gate 전 품질 확인, 보안 감사, 성능 리뷰, 접근성 점검, 릴리스 전 최종 검증, 코드 감사 요청 시.
code-review-and-quality
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.
Code Review Sensei
Expert code reviewer that catches bugs, security issues, performance problems, and design flaws with actionable fix suggestions.
Verification Before Completion
Mandatory empirical verification suite execution before declaring task completion.