optimization-audit

optimization-audit is a skill for Claude Code from karsten-s-nielsen/mad-scientist-skills. It costs 102 tokens per session (24,517 once invoked), scanned A, original, MIT.

A review of how efficiently a system uses time, memory, storage, and other resources. It can plan performance for a system that has not been built yet or inspect existing code and infrastructure for slow or wasteful patterns.

In plain words
What is it for?
Use it to plan capacity and scaling, review data access, find bottlenecks, check existing systems before release, and identify performance problems in code and infrastructure.
Why use it?
It helps locate causes of slow software, such as inefficient algorithms, repeated database queries, missing caching, or poor handling of simultaneous work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Part of the mad-scientist-skills plugin — 11 skills, 4 commands shipped together

Good fit Use it to plan capacity and scaling, review data access, find bottlenecks, check existing systems before release, and identify performance problems in code and infrastructure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/karsten-s-nielsen/mad-scientist-skills/optimization-audit
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 karsten-s-nielsen/mad-scientist-skills --skill optimization-audit
Clone the repo
git clone --depth 1 https://github.com/karsten-s-nielsen/mad-scientist-skills

Made for: Claude Code.

Or install mad-scientist-skills, the plugin that ships this one along with the rest of its 11 skills, 4 commands.

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 optimization-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/karsten-s-nielsen/mad-scientist-skills/optimization-audit/github.svg)](https://agentmods.dev/skills/karsten-s-nielsen/mad-scientist-skills/optimization-audit)
Your own site
<a href="https://agentmods.dev/skills/karsten-s-nielsen/mad-scientist-skills/optimization-audit"><img src="https://agentmods.dev/badge/skills/karsten-s-nielsen/mad-scientist-skills/optimization-audit/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 optimization-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/karsten-s-nielsen/mad-scientist-skills/optimization-audit"><img src="https://agentmods.dev/badge/skills/karsten-s-nielsen/mad-scientist-skills/optimization-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 24,517 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.00102 $0.24517
Opus 5.5 $0.00041 $0.09807
Sonnet 5.5 $0.00020 $0.04903
Haiku 4.5 $0.00010 $0.02452

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

Security

Grade A, and why

optimization-audit 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.

plugins/mad-scientist-skills/skills/optimization-audit/SKILL.md · 1,191 lines

How it starts

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

Optimization Audit

A comprehensive optimization skill with two modes and a single tier:

Modes:

  • Planning (before code exists) — performance strategy, capacity planning, scaling architecture, data access design
  • Audit (on existing code) — scanning for performance anti-patterns, inefficient algorithms, N+1 queries, missing caching, concurrency issues, and resource waste

Single tier: Unlike the security and observability audits, optimization tools are overwhelmingly free/open-source (profilers, EXPLAIN, load testers, linters). Enterprise APM platforms are already covered by the observability-audit skill, so a Standard/Enterprise split would duplicate coverage.

Core question: "Is this system using resources efficiently?"

When to use this skill

  • When the user says "optimization audit", "performance review", "find bottlenecks", "optimize this", "check efficiency", or "resource audit"
  • Before designing a new system (planning mode) — to define performance strategy, capacity planning, and scaling architecture early
  • On an existing codebase (audit mode) — to find and fix performance anti-patterns and resource waste
  • Before a production deployment — to validate performance posture
  • After adding new services, data pipelines, or performance-sensitive features
  • When investigating production performance incidents or cost overruns

Mode detection

Determine which mode to operate in based on the project state:

Signal Mode Rationale
User says "design for performance", "plan scaling", "capacity planning" Planning Architecture-level performance strategy
User says "audit", "optimize", "find bottlenecks", "performance review" Audit Code and infrastructure scanning
No source code exists yet (only docs, diagrams, RFCs) Planning Nothing to profile — design the strategy
Source code and/or infrastructure files exist Audit Concrete artifacts to analyze
Both code and a request to "plan performance" Both Run planning phases on architecture, audit phases on code

Read the full file on GitHub · 1,191 lines

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 Changed · +85 lines 6ec338699aff
  2. 1mo ago Changed 3b8ab594054e
  3. 2mo ago First seen · 1,106 lines · 102 tokens per session scan A c7a1f877e9c0

Subscribe to this mod's changes

optimization-audit is a skill published in the GitHub repository karsten-s-nielsen/mad-scientist-skills (3 stars, last pushed 1mo ago), licensed MIT. It adds 102 tokens to every session and 24,517 once invoked, about $0.0004 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-31.

Related

optimization-audit compared with skills from other repositories

optimization-audit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
optimization-auditkarsten-s-nielsen/mad-scientist-skillsSkill31mo agoMITA102Claude Code
mapjlifyio/wyxSkill329d agoMITA60Claude Code
conceptjlifyio/wyxSkill329d agoMITA73Claude Code
auditjlifyio/wyxSkill329d agoMITA81Claude Code
pipelinejlifyio/wyxSkill329d agoMITA66Claude Code
syncjlifyio/wyxSkill329d agoMITA58Claude Code
refactorzircote-plugins/refactorSkill25mo agoMITA112Claude Code