performance-optimization

performance-optimization is a skill for Claude Code, Codex from magnus919/agent-skills. It costs 86 tokens per session (1,440 once invoked), scanned A, original, MIT.

A software performance workflow that improves a user-relevant result by measuring, explaining, changing, and verifying one bottleneck at a time. A bottleneck is the part of a system that limits overall speed or capacity.

In plain words
What is it for?
Use it to improve latency, task completion time, throughput, or another user-facing performance measure. It supports baseline measurements, controlled changes, and end-to-end or field verification.
Why use it?
It prevents relying on small benchmark gains that do not improve the complete user journey. It also requires the target, scope, and rollback path to be clear before making changes.

Skill for Claude CodeCodex

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

Good fit Use it to improve latency, task completion time, throughput, or another user-facing performance measure. It supports baseline measurements, controlled changes, and end-to-end or field verification.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magnus919/agent-skills/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 magnus919/agent-skills --skill performance-optimization
Clone the repo
git clone --depth 1 https://github.com/magnus919/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin performance-optimization — /plugin install performance-optimization after adding the marketplace above.

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/magnus919/agent-skills/performance-optimization/github.svg)](https://agentmods.dev/skills/magnus919/agent-skills/performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/magnus919/agent-skills/performance-optimization"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/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/magnus919/agent-skills/performance-optimization"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/performance-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,440 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.00086 $0.01440
Opus 5.5 $0.00034 $0.00576
Sonnet 5.5 $0.00017 $0.00288
Haiku 4.5 $0.00009 $0.00144

Measured 24d ago against content hash bad329c87e24, 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 24d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (examples/membership_workload.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

performance-optimization/SKILL.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Performance optimization

Improve a user-relevant outcome by repeatedly measuring, explaining, changing, and verifying one bottleneck at a time. A faster microbenchmark is a hypothesis about user benefit until the relevant end-to-end or field measure confirms it.

Before the first mutation of a target system, confirm its target, scope, and rollback path from the user request or current project record. Read-only discovery needs no confirmation. For production telemetry, flags, deployment, or cleanup, follow the project's authority and review gates.

When not to use

Use site-reliability-engineering for SLO policy and incident recovery; capacity-and-cost-engineering for demand and spend forecasts; qa-methodology for general load/stress/soak test strategy; product-experimentation for product behavior A/B tests; systematic-debugging for a specific functional failure. Operate a named observability stack with telemetry or grafana.

The loop

  1. Choose a journey and a budget. Identify the users, high-frequency or high-cost journeys, and one primary outcome they actually experience: interaction-to-render latency, task completion time, throughput at a stated error rate, memory, energy, or cost per useful operation. Define start and end events, units, workload mix, population, platform, and a target or practical minimum gain. Include correctness, accessibility, reliability, and resource countermetrics. Do not optimize a convenient metric in isolation.
  2. Audit measurement. Map existing field telemetry, traces, profiles, tests, and reports to the journey. Check event semantics, missing or sampled events, segmentation, version/build tags, clock boundaries, privacy, and measurement overhead. If the outcome is unmeasured, add the smallest instrumentation or reproducible local probe that closes the gap, and label any temporary proxy. Record a baseline with sample count, period, percentiles or distribution, and known uncertainty. Read measurement-and-benchmarks when choosing signals or designing a benchmark.
  3. Locate the bottleneck. Trace the critical path and separate client, network, queue, service, dependency, storage, and rendering time as applicable. Profile the representative slow slice; distinguish CPU work from waiting, allocations, contention, I/O, and repeated work. Reproduce the costly path with realistic data and conditions before suggesting a fix. Rank opportunities by affected users × attainable gain × confidence, with implementation and regression cost visible. Read diagnostic-guide when the symptom is known but the first useful signal or profile is unclear.
  4. Write one experiment. State the suspected mechanism, a predicted change in the primary metric, diagnostic metric, and countermetrics, plus the smallest reversible intervention. Fix the workload, build, environment, warmup, and comparison method before looking at results. For noisy measurements, use repeated or interleaved baseline/candidate runs and report the distribution; do not infer a win from one timing. Calibrate a deterministic proxy such as instruction count or render commits against the user-relevant measure across representative gains, plausible regressions, and boundary cases before using it as a gate.
  5. Change and verify. Preserve behavior with meaningful correctness checks, then make a focused change. Compare baseline and candidate on the same workload and record absolute and relative differences, run counts, variance, hardware/build, and any countermetric movement. Reject a proxy-only win, a flaky benchmark, a regression elsewhere, or a gain smaller than the agreed practical threshold. Read experiment-and-rollout for decision rules.
  6. Review, roll out, observe. Present the diff, evidence, risk, rollback trigger, and named human owner. For user-visible or production changes, use the project's normal review and rollout gates; a skill does not grant deployment authority. After rollout, compare field results by build, platform, and relevant user slice over an adequate window. If the field outcome misses the target or harm appears, revert/disable and investigate. If it holds, retain a stable, meaningful regression check or performance budget. Do not set a CI threshold tighter than the benchmark's reproducibility supports.
  7. Repeat or stop. Re-profile the journey after each accepted gain; the bottleneck may move. Stop when the target is met, the next expected gain is below practical value, evidence cannot distinguish a gain from noise after a bounded measurement pass, or the next step requires an owner decision. Record remaining opportunities and uncertainty rather than presenting unrun experiments as improvements.

Read the full file on GitHub · 49 lines

Files

What ships with it

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

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. 24d ago First seen · 49 lines · 86 tokens per session scan A bad329c87e24

Subscribe to this mod's changes

performance-optimization is a skill published in the GitHub repository magnus919/agent-skills (133 stars, last pushed 2d ago), licensed MIT. It adds 86 tokens to every session and 1,440 once invoked, about $0.0003 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-09-24.