Performance Optimization

Performance Optimization is a skill for Claude Code, Codex from Xiaowen-Jiang/agent-enterprise. It costs 14 tokens per session (488 once invoked), scanned A, original, MIT.

A method for finding code that uses too much time, memory, database work, or input/output and recommending specific improvements.

In plain words
What is it for?
Use it to inspect frequently run code, analyze algorithm and query costs, find caching or lazy-loading opportunities, and rank optimizations by impact and effort.
Why use it?
It exposes common causes of slow software, such as repeated database queries, inefficient loops, missing indexes, unnecessary copies, and avoidable waiting.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect frequently run code, analyze algorithm and query costs, find caching or lazy-loading opportunities, and rank optimizations by impact and effort.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaowen-jiang/agent-enterprise/performance_optimization
Install

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.

Any agent
npx skills add Xiaowen-Jiang/agent-enterprise --skill performance_optimization
Clone the repo
git clone --depth 1 https://github.com/Xiaowen-Jiang/agent-enterprise

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for Performance Optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaowen-jiang/agent-enterprise/performance_optimization/github.svg)](https://agentmods.dev/skills/xiaowen-jiang/agent-enterprise/performance_optimization)
Your own site
<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/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.

agentmods 80×15 button for Performance Optimization

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 488 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.00488
Opus 5.5 $0.00006 $0.00195
Sonnet 5.5 $0.00003 $0.00098
Haiku 4.5 $0.00001 $0.00049

Measured 1mo ago against content hash 5bb0ab7170e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

agent_enterprise/skills_data/performance_optimization/SKILL.md · 61 lines

What it actually says

Process

  1. Identify hot paths — Which code runs most frequently or handles the most data?
  2. Check algorithmic complexity — Look for O(n^2) or worse in loops, searches, sorts
  3. 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
  4. Caching opportunities:
    • Repeated expensive computations
    • Frequently read, rarely updated data
    • API responses that can be cached
  5. Memory usage — Large objects in memory, memory leaks, unnecessary copies
  6. I/O optimization — Batch operations, connection pooling, async I/O
  7. 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
Changes

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.

  1. 1mo ago First seen · 61 lines · 14 tokens per session scan A 5bb0ab7170e0

Subscribe to this mod's changes

Performance Optimization is a skill published in the GitHub repository Xiaowen-Jiang/agent-enterprise (52 stars, last pushed 6mo ago), licensed MIT. It adds 14 tokens to every session and 488 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.

Related

Other skills, from other repositories

Verification & Quality Assurance

Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.

ruvnet/RuView · 36 tokens

ai-agent-evaluation-benchmarking

Autonomous AI agent benchmark evaluation register: task completion rates, planning accuracy, tool invocation precision, and cost benchmarks.

sickn33/agentic-awesome-skills · 31 tokens

ce-debug

Diagnosis loop for bugs and failing behavior. Use when asked to debug or fix failing or slow behavior.

EveryInc/compound-engineering-plugin · 23 tokens

ce-sweep

Sweep configured feedback sources (Slack, GitHub Issues; email experimental) for new items: acknowledge at source, analyze recordings, verify fixes merged to main, and emit an lfg-ready plan. First run sets up sources; supports mode:non-interactive for scheduled runs.

EveryInc/compound-engineering-plugin · 62 tokens

ce-riffrec-feedback-analysis

Analyze recorded product feedback into evidence for bugs and requirements. Use when a Riffrec capture or other screen, voice, or notes artifact needs interpretation. Use for Riffrec setup, capture, or sharing help when no recording exists yet.

EveryInc/compound-engineering-plugin · 55 tokens

hotpath_init_grafana

Build a Grafana dashboard JSON for a Rust project profiled with hotpath. Writes the dashboard file with context-aware panels (SQL and HTTP time per route, N+1 detection, memory and time per request, channel queues, lock contention, Tokio workers, per-thread CPU and allocations, profiling overhead) limited to what the…

pawurb/hotpath-rs · 109 tokens