optimize

optimize is a skill for Claude Code, Codex from MadAppGang/claude-code. It costs 57 tokens per session (4,941 once invoked), scanned A, original, MIT.

On-demand performance and optimization analysis. Use when identifying bottlenecks, improving build times, reducing bundle size, or optimizing code performance. Trigger keywords - "optimize", "performance", "bottleneck", "bundle size", "build time", "speed up".

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/madappgang/claude-code/optimize
Any agent
npx skills add MadAppGang/claude-code --skill optimize
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/claude-code

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 optimize

README.md
[![agentmods](https://agentmods.dev/badge/skills/madappgang/claude-code/optimize.svg)](https://agentmods.dev/skills/madappgang/claude-code/optimize)
Your own site
<a href="https://agentmods.dev/skills/madappgang/claude-code/optimize"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/optimize.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,941 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00057 $0.04941
Opus 5 $0.00028 $0.02471
Sonnet 5 $0.00011 $0.00988
Haiku 4.5 $0.00006 $0.00494

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

Security

Grade A, and why

optimize 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 today.

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/dev/skills/optimize/SKILL.md · 858 lines

How it starts

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

Optimize Skill

Overview

The optimize skill provides comprehensive on-demand performance and optimization analysis for your codebase. It identifies bottlenecks, slow builds, large bundles, inefficient code patterns, and opportunities for performance improvements across all supported technology stacks.

When to Use:

  • Performance issues and slow response times
  • Large bundle sizes and slow page loads
  • Long build and compile times
  • High memory usage
  • Database query optimization
  • API endpoint performance tuning
  • CI/CD pipeline optimization

Technology Coverage:

  • React/TypeScript/JavaScript (Vite, Webpack, Rollup)
  • Go applications (build time, runtime performance)
  • Rust projects (compile time, binary size)
  • Python codebases (runtime optimization)
  • Full-stack applications
  • Database queries (SQL, ORM)

Optimization Categories

1. Build Performance

What Gets Analyzed:

  • Build duration and bottlenecks
  • Dependency resolution time
  • TypeScript compilation speed
  • Asset processing (images, fonts)
  • Code splitting effectiveness
  • Cache utilization

Common Issues:

  • Unnecessary re-builds of unchanged code
  • Large dependency trees
  • Inefficient TypeScript configuration
  • Missing build caching
  • Redundant asset processing

Optimization Targets:

  • Reduce build time by 30-50%
  • Enable incremental builds
  • Optimize dependency resolution
  • Improve cache hit rates

2. Bundle Size

What Gets Measured:

  • Total bundle size (uncompressed/gzipped)
  • Individual chunk sizes
  • Duplicate dependencies
  • Tree-shaking effectiveness
  • Unused code in bundles
  • Third-party library sizes

Bundle Analysis:

Bundle Size Breakdown:
├── vendor.js: 847 KB (312 KB gzipped)
│   ├── react-dom: 142 KB
│   ├── lodash: 71 KB (should use lodash-es)
│   ├── moment: 67 KB (consider date-fns)
│   └── ...
├── main.js: 234 KB (89 KB gzipped)
└── [lazy chunks]: 156 KB total

Optimization Goals:

  • Keep initial bundle under 200 KB (gzipped)
  • Lazy load non-critical code
  • Remove duplicate dependencies
  • Use lighter alternatives

Read the full file on GitHub · 858 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. today First seen · 858 lines · 57 tokens per session scan A 4fae6f5b918c

Subscribe to this mod's changes

optimize is a skill published in the GitHub repository MadAppGang/claude-code (279 stars, last pushed 5mo ago), licensed MIT. It adds 57 tokens to every session and 4,941 once invoked, about $0.0003 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-09-03.