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 skills add karsten-s-nielsen/mad-scientist-skills --skill optimization-auditgit clone --depth 1 https://github.com/karsten-s-nielsen/mad-scientist-skillsWrote 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/karsten-s-nielsen/mad-scientist-skills/optimization-audit)<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.
<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>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.1 | $0.00102 | $0.21550 |
| Opus 5 | $0.00051 | $0.10775 |
| Sonnet 5 | $0.00020 | $0.04310 |
| Haiku 4.5 | $0.00010 | $0.02155 |
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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 1,106 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 |
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.
- templates/algorithm-complexity.md 24 KB
- templates/caching-strategies.md 21 KB
- templates/cloud-cost-optimization.md 23 KB
- templates/concurrency-patterns.md 36 KB
- templates/database-optimization.md 28 KB
- templates/frontend-performance.md 30 KB
- templates/pipeline-efficiency.md 41 KB
- templates/profiling-benchmarking.md 35 KB
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.
- 11d ago First seen · 1,106 lines · 102 tokens per session scan A c7a1f877e9c0
optimization-audit is a skill published in the GitHub repository karsten-s-nielsen/mad-scientist-skills (3 stars, last pushed 12d ago), licensed MIT. It adds 102 tokens to every session and 21,550 once invoked, about $0.0005 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.
Other skills, from other repositories
concept
This skill should be used when the user asks to "create a concept spec", "retrofit a module", "check spec drift", "run drift detection", "design a new module", "wyx concept", or wants to generate, update, or drift-check CONCEPT.md files. Supports retrofit, greenfield, drift detection, and discovery modes.
map
This skill should be used when the user asks to "generate architecture map", "visualize spec relationships", "create ARCHITECTURE.md", "show concept dependencies", "wyx map", or wants a Mermaid graph with dependency matrix and data flow paths derived from all wyx specs.
audit
This skill should be used when the user asks to "audit spec coverage", "find uncovered modules", "scan for missing specs", "check wyx coverage", "get spec TODO list", "wyx audit", "wyx", or wants a prioritized list of wyx skill commands for uncovered modules. Scans for coverage gaps, pipeline/sync candidates, and…
sync
This skill should be used when the user asks to "document sync patterns", "map sync handlers", "create SYNCS.md", "review sync coordination", "wyx sync", or wants to understand how concepts communicate through orchestrated workflows. Produces SYNCS.md coordination maps.
pipeline
This skill should be used when the user asks to "create a pipeline spec", "document data transformations", "document data flow", "specify pipeline invariants", "wyx pipeline", or wants to design, retrofit, or discover data pipelines with quality invariants and boundary ownership. Produces PIPELINE.md specs.
refactor
Automated iterative code refactoring with swarm-orchestrated specialist agents including deep codebase discovery, confidence-scored code review, and security analysis. Use this skill when the user wants to improve existing code quality, clean up messy code, restructure, simplify, reduce tech debt, or perform…