optimize

optimize is a skill for Claude Code from joris887/exosuit. It costs 27 tokens per session (2,250 once invoked), scanned A, original, MIT.

An experiment loop for improving a measurable software result, such as test coverage or bundle size. You provide a goal, a shell command that reports the measurement, and a target value.

In plain words
What is it for?
Use it to increase or reduce a metric over repeated experiments, including test coverage, built-file size, or the number of lint problems.
Why use it?
It avoids making a series of changes without knowing whether they helped. Git checkpoints and rollback let it return to an earlier state when an experiment does not improve the result.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Part of the exosuit plugin — 44 skills, 1 command, 9 agents, 10 hooks shipped together

Good fit Use it to increase or reduce a metric over repeated experiments, including test coverage, built-file size, or the number of lint problems.

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

Made for: Claude Code.

Or install exosuit, the plugin that ships this one along with the rest of its 44 skills, 1 command, 9 agents, 10 hooks.

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/joris887/exosuit/optimize/github.svg)](https://agentmods.dev/skills/joris887/exosuit/optimize)
Your own site
<a href="https://agentmods.dev/skills/joris887/exosuit/optimize"><img src="https://agentmods.dev/badge/skills/joris887/exosuit/optimize/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 optimize

Your own site · 80×15
<a href="https://agentmods.dev/skills/joris887/exosuit/optimize"><img src="https://agentmods.dev/badge/skills/joris887/exosuit/optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,250 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.00027 $0.02250
Opus 5.5 $0.00011 $0.00900
Sonnet 5.5 $0.00005 $0.00450
Haiku 4.5 $0.00003 $0.00225

Measured 1mo ago against content hash 6c899b8654b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

.claude/skills/optimize/SKILL.md · 270 lines

How it starts

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


optimize

Optimizing: $ARGUMENTS

Argument Parsing

Argument Required Default Description
<goal> Yes - What to optimize (e.g., "increase test coverage", "reduce bundle size")
--metric "<command>" Yes - Shell command that outputs the metric value. Pipe through grep if needed to isolate the number
--target <N> Yes - Target value to reach
--direction min|max No max Whether to minimize or maximize the metric
--max <N> No 20 Maximum experiments before stopping

Examples:

/optimize "increase test coverage" --metric "npm test -- --coverage 2>&1 | grep 'All files' | awk '{print $10}'" --target 90 --direction max
/optimize "reduce bundle size" --metric "npm run build 2>&1 | grep 'gzipped' | awk '{print $3}'" --target 150 --direction min --max 30
/optimize "eliminate lint warnings" --metric "npm run lint 2>&1 | tail -1 | grep -oE '[0-9]+ problems'" --target 0 --direction min

Failure State Persistence

At loop entry, write docs/sessions/.failure-state.md:

---
status: active
skill: optimize
phase: "baseline"
phase_name: "Baseline Measurement"
started_at: "[ISO-8601 timestamp]"
story: "[goal from $ARGUMENTS]"
branch: "[from git branch --show-current]"
next_action: "Measure baseline metric"
files_modified: []
---

## Context
Goal: [goal]
Metric command: [command]
Target: [target] (direction: [min|max])
Max experiments: [max]
Current experiment: 0
Best value: [pending]

Update at each experiment iteration. Delete when optimization completes or max experiments reached.

Process

1. Pre-Flight

Run verify-clean-git-state micro-component. Confirm:

  • Working tree is clean (no uncommitted changes)
  • On a feature branch (not main/master)
  • Git is available

Read the full file on GitHub · 270 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. 1mo ago First seen · 270 lines · 27 tokens per session scan A 6c899b8654b7

Subscribe to this mod's changes

optimize is a skill published in the GitHub repository joris887/exosuit (8 stars, last pushed 24d ago), licensed MIT. It adds 27 tokens to every session and 2,250 once invoked, about $0.0001 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

Other skills, from other repositories

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

orchestrator-lanes

Terminal Lane Stack Claude Code dev-orchestrator only (run-controller harness: score, DAG, run-supervisor, L0/L1/L2, wt-merge-main). Use when the session runs that terminal harness, or when $ARGUMENTS is exactly info. SKIP: Lane Pilot / BB chats (dispatch there is lanepilotdispatchwriter, LANEPILOTAGENTTYPE set)…

VKirill/claude-lane-stack · 0 tokens

linkedin-post

You take a YouTube video transcript and produce a single LinkedIn post draft.

owainlewis/youtube-tutorials · 0 tokens

eval-agents

Audit custom subagent definitions for Claude Code (.claude/agents/.md) and Codex (.codex/agents/.toml): loadability against the native schema, description overlap, model tier, tool scope, and headless-safe instructions. Use when onboarding to a project with agents, after adding or importing agents, or when the parent…

FlorianBruniaux/claude-code-ultimate-guide · 80 tokens

land-and-deploy

Merge PR, wait for CI, verify deploy, run canary. The complete landing pipeline.

FlorianBruniaux/claude-code-ultimate-guide · 24 tokens

source-command-methodology-advisor

Analyzes your codebase and asks 3 targeted questions to recommend the right AI-assisted development methodology stack.

FlorianBruniaux/claude-code-ultimate-guide · 27 tokens