prompt-optimizer

prompt-optimizer is a skill for Claude Code, Codex from haabe/mycelium. It costs 27 tokens per session (527 once invoked), scanned A, original, MIT.

A tool for testing changes to CLAUDE.md, a file of instructions for an AI coding assistant, against evaluation tasks. It compares a baseline with alternative instruction versions using separate test sets.

In plain words
What is it for?
Use it to record a baseline, test instruction variants, compare pass rates, and review optimization results.
Why use it?
It replaces guesswork about whether instructions improve results. It can show when instructions perform better on test tasks but worse on separate validation tasks, a problem called overfitting.

Skill for Claude CodeCodex

Part of the mycelium plugin — 61 skills, 6 hooks shipped together

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/haabe/mycelium/prompt-optimizer
Any agent
npx skills add haabe/mycelium --skill prompt-optimizer
Clone the repo
git clone --depth 1 https://github.com/haabe/mycelium

Made for: Claude Code, Codex.

Or install mycelium, the plugin that ships this one along with the rest of its 61 skills, 6 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 prompt-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/haabe/mycelium/prompt-optimizer.svg)](https://agentmods.dev/skills/haabe/mycelium/prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/haabe/mycelium/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/haabe/mycelium/prompt-optimizer.svg" alt="Measured on agentmods" 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 527 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.00027 $0.00527
Opus 5 $0.00014 $0.00264
Sonnet 5 $0.00005 $0.00105
Haiku 4.5 $0.00003 $0.00053

Measured 5d ago against content hash b253c400e961, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prompt-optimizer 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 5d 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/mycelium/skills/prompt-optimizer/SKILL.md · 48 lines

What it actually says

Prompt Optimizer

Systematically improve Mycelium instructions through measurement. Adapted from n-trax.

Commands

baseline -- Capture current performance

  1. Run /mycelium:eval-runner run-split optimization — record as optimization scores
  2. Run /mycelium:eval-runner run-split holdout — record as holdout scores
  3. Record both to .claude/optimization/baseline.json: timestamp, CLAUDE.md hash, optimization metrics, holdout metrics, overall and per-category metrics

test <variant> -- Test a variant

  1. Read variant from .claude/optimization/variants/<variant>.md
  2. Apply the CLAUDE.md changes described
  3. Run /mycelium:eval-runner run-split optimization — this is the hill-climbing signal
  4. Run /mycelium:eval-runner run-split holdout — this validates generalization
  5. Store results in .claude/optimization/results/<variant>.json
  6. Compare against baseline. Flag overfitting if optimization improves but holdout degrades.
  7. Do NOT auto-revert -- let user decide

report -- Compare all variants

Generate comparison table with split-aware columns:

| Variant | Opt Pass Rate | Holdout Pass Rate | Delta Opt | Delta Holdout | Overfit? | Decision |

Flag Overfit? = YES when optimization delta is positive but holdout delta is negative.

exemplar <eval-name> -- Capture winning trajectory

After a clean eval win (1 iteration, fast), save the approach to .claude/optimization/exemplars/.

Workflow

  1. Capture baseline
  2. Hypothesize an instruction improvement
  3. Document in variants/ directory
  4. Test the variant
  5. Compare via report
  6. Keep or revert based on data
  7. Capture exemplars from clean wins
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. 5d ago First seen · 48 lines · 27 tokens per session scan A b253c400e961

Subscribe to this mod's changes

prompt-optimizer is a skill published in the GitHub repository haabe/mycelium (45 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 527 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-30.

Related

Other skills, from other repositories

tao-setup

One-time session setup and orchestration map for the TAO skill bank. Run this first when the TAO skills were installed individually (e.g. from a public skills catalog) so the session gets the cross-skill discovery flow, credential checks, and host preflight that the bundled plugin hook would otherwise inject…

NVIDIA-TAO/tao-skill-bank · 97 tokens

tao-list-capabilities

Answer what the TAO Skill Bank plugin can do by generating the response from packaged application, data, model, AutoML, and platform manifests. Use when the user asks "what can TAO Skill Bank do", "list TAO models", "which TAO workflows are available", or "what supports AutoML".

NVIDIA-TAO/tao-skill-bank · 70 tokens

dataset-discovery

Multi-source ML dataset discovery.

LigphiDonk/Oh-my--paper · 10 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

google-cloud-solution-agentic-analytics-spark-knowledge-catalog

Discovers requirements and generates guidance to design and deploy a governed, secure agentic-analytics solution for data that's distributed across Google Cloud, other cloud providers, or on-premises. Data that's outside Google Cloud (such as data from Databricks, Snowflake, Salesforce, SAP, or Oracle systems) is…

google/skills · 138 tokens