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.
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-optimizationRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install tool-prompt-optimization in Claude Code
git clone --depth 1 https://github.com/can1357/oh-my-pi /tmp/oh-my-pi && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/oh-my-pi/.omp/skills/tool-prompt-optimization ~/.gemini/antigravity-cli/skills/tool-prompt-optimizationAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install tool-prompt-optimization in Antigravity CLI
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
ANo 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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
