Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

tool-prompt-optimization

Skill by can1357

Audits the description prompts that an AI agent reads to learn its built-in tools. It measures how much of each prompt can be inferred from the tool's JSON schema and name, so redundant lines can be pruned with evidence.

  • Score 94
  • 40k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install tool-prompt-optimization

Built from the published package, never by AI.

git clone --depth 1 https://github.com/can1357/oh-my-pi /tmp/oh-my-pi && mkdir -p ~/.claude/skills && cp -r /tmp/oh-my-pi/.omp/skills/tool-prompt-optimization ~/.claude/skills/tool-prompt-optimization

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install tool-prompt-optimization in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill helps maintain the description prompts an AI agent reads to learn its built-in tools, the .md files under prompts/tools/. It measures how much of a prompt can be rebuilt from the tool's JSON parameter schema and name, so redundant lines can be pruned with evidence. Probe scripts send the prediction task to a panel of models.

It also sets authoring rules for what belongs in a tool prompt and what stays in code. Prompts should cover when to choose a tool, input shape, output shape and real failure anti-patterns, while engine internals, recovery logic and performance tuning stay out. The source says every cut line needs a git blame review before deletion.

Written from the project's SKILL.md and checked against it.

What it can do

  • Schema overlap probePredicts a prompt body from the tool name, JSON schema and a blank outline, using a model panel.
  • Builtin probeInstantiates a live built-in tool and compares its real prompt with the predicted text.
  • Summary ablationThe --no-summary option tests whether content survives when the summary line is blank.
  • Prune classificationSorts prompt lines into prune candidates and load-bearing lines that should be kept.
  • Authoring rulesGuidance on what a tool prompt should teach an agent and what should stay in code.
  • Prompt anatomyA six-part structure for tool prompts: purpose, input grammar, examples, failures, anti-patterns and critical recap.

What you need

  • Bun runtime
  • API keys for the default panel: FIREWORKS_API_KEY, ANTHROPIC_API_KEY and OPENAI_API_KEY
  • Git history for reviewing deletions

Try asking

  • Audit the read tool prompt for lines its JSON schema already covers.
  • Run the builtin probe on the ast_grep tool with --show.
  • Review my new tool prompt against the authoring rules.

Good to know

  • The default panel needs keys for three providers unless --model overrides it.
  • The builtin shortcut is set up for this repository's tools.
  • Tools that need a missing CLI may fail to construct and need manual inputs.
  • A single sample is noise, and inferability alone is never enough to delete a line.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .omp/skills/tool-prompt-optimization/SKILL.md, .omp/skills/tool-prompt-optimization/scripts/probe-builtin.ts, .omp/skills/tool-prompt-optimization/scripts/probe.ts. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md7 KB
  • scripts/probe-builtin.ts6 KB
  • scripts/probe.ts8 KB

Alternatives to tool-prompt-optimization

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

tool-prompt-optimization: common questions

Does this skill delete tool prompt lines automatically?

No. The source says inferability is necessary but never sufficient, and each cut line must be checked with git blame and its commit or issue history first.

Which models does the probe use by default?

The default panel is fireworks/kimi-k2.7-code, anthropic/claude-opus-4-8 and openai/gpt-5.5, with three samples each. The --model option overrides the panel.

What belongs in a tool prompt?

Guidance on when to choose the tool, input shape, agent-owned failures and anti-patterns. Engine internals, recovery heuristics and performance tuning belong in code.

How do I install tool-prompt-optimization?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is tool-prompt-optimization free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is tool-prompt-optimization safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to tool-prompt-optimization?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

tool-prompt-optimization Install

Add to stack

Loading.