performance

A set of rules for measuring and improving software speed, capacity, memory use, and caching. Profiling means collecting measurements that show where a program spends time or resources.

In plain words
What is it for?
Use it to investigate slow requests, improve response-time targets such as p99 latency, increase throughput, reduce allocations, read profiles, design benchmarks, and tune application, database, CDN, browser, or edge caches.
Why use it?
It prevents optimizing code based on guesses and helps distinguish CPU, memory, input/output, locking, and network problems. It also helps assess whether a cache actually improves results without causing stale data or overload.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/kreek/consult/performance
Any agent
npx skills add kreek/consult --skill performance
Clone the repo
git clone --depth 1 https://github.com/kreek/consult

Made for: Claude Code, Codex.

Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,066 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00019 $0.01066
Opus 5 $0.00010 $0.00533
Sonnet 5 $0.00004 $0.00213
Haiku 4.5 $0.00002 $0.00107

Measured yesterday against content hash 37277e7b91f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

performance 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 yesterday.

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.

agents/.agents/skills/performance/SKILL.md · 99 lines

How it starts

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

Performance

Iron Law

MEASURE BEFORE OPTIMIZING. MEASURE AGAIN BEFORE KEEPING THE CHANGE.

When to Use

  • Diagnosing slowness, optimizing latency/throughput/allocation, reading profiles, designing benchmarks, investigating p99/p99.9, or deciding whether a performance change is worth it.
  • Adding, reviewing, tuning, or debugging caches (application, database, Redis/Memcached, CDN, browser, edge), including stale data, stampedes, hot keys, and miss latency.

When NOT to Use

  • Concurrency correctness without measured slowness; use async-systems.
  • Database query safety without profiling context; use database.
  • HTTP API cache semantics unrelated to storage or performance; use api.

Core Ideas

  1. Name the target metric before changing code.
  2. Use a realistic workload and identical before/after conditions.
  3. Optimize the measured bottleneck, not the code that only looks suspicious.
  4. Tail latency matters; averages hide the slow requests users feel.
  5. CPU, off-CPU, memory, allocation, I/O, lock contention, and network wait are different problems.
  6. Micro-benchmarks prove local mechanics, not end-to-end wins.
  7. Keep complexity only when the measured gain justifies it.
  8. Caches need a source of truth, invalidation trigger, stale tolerance, key contract, stampede protection, and metrics before they are kept.
  9. Cache keys encode every input that changes the value, including freshness, tenant, permissions, locale, and version.
  10. Treat cache contents as sensitive storage when keys or values contain secrets, raw PII, tenant data, or authorization context.

Workflow

  1. Define the metric: p99 latency, throughput, CPU time, allocation rate, memory, or error budget impact. Capture baseline with production-shaped data and concurrency.
  2. Profile to find the dominant bottleneck. If caching is considered, state the value being cached, source of truth, invalidation trigger, stale tolerance, key contract, stampede policy, TTL/jitter, and cache metrics.
  3. Make one change.
  4. Re-measure under the same conditions. Check adjacent regressions: memory, error rate, tail latency, CPU, maintainability.

Read the full file on GitHub · 99 lines

Files

What ships with it

1 file 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. yesterday First seen · 99 lines · 19 tokens per session scan A 37277e7b91f5

Subscribe to this mod's changes

performance is a skill published in the GitHub repository kreek/consult (1 stars, last pushed 6d ago), licensed MIT. It adds 19 tokens to every session and 1,066 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-31.

Related

Other skills, from other repositories

cua-driver

Drive a native GUI app (macOS, Windows, Linux) via the Qwen Cua Driver CLI (default) or MCP server; snapshot its accessibility tree, act through snapshot-bound element tokens, native menu paths, exact window geometry, or pixel coordinates, and verify from fresh state. Use when the user asks you to operate, drive…

QwenLM/qwen-code · 88 tokens

computer-use

Control local desktop applications through Computer Use for tasks that require reading or operating app UI. Prefer purpose-built connectors, APIs, or CLIs when available.

QwenLM/qwen-code · 33 tokens

canvas

Display, present, and render HTML content on connected Otto nodes (Mac app, iOS, Android). Show on device, preview on mobile, push to screen, or navigate to a URL on any connected node. Use for games, visualizations, dashboards, interactive demos, and live-reloading development previews. Supports presenting, hiding…

elizaOS/eliza · 91 tokens

argent-device-interact

Interact with an iOS simulator, Android emulator, or Chromium (CDP) app using argent MCP tools. Use when tapping UI elements, performing gestures, scrolling/swiping, typing text, pressing hardware buttons, launching apps, opening URLs, taking screenshots, waiting for an element to appear or disappear, or checking…

software-mansion/argent · 73 tokens

use-tinyfish

Use TinyFish for web search, fetching URLs, reading pages, current information, source-backed answers, research, docs, pricing/product pages, extraction, scraping, and browser automation. Use whenever the user asks to search, find, look up, research, compare, get information from the web, summarize a URL, fetch page…

tinyfish-io/tinyfish-cookbook · 77 tokens

agent

Default browser automation agent — click, fill forms, navigate, log in, and extract structured data from any website using a natural-language goal, or run the same task across multiple sites in parallel. New users get 600 free automation credits to start; beyond that it draws on your plan's automation credits (unlike…

tinyfish-io/tinyfish-cookbook · 170 tokens