tool-prompt-optimization

tool-prompt-optimization is a skill for Claude Code, Codex from can1357/oh-my-pi. It costs 0 tokens per session (1,680 once invoked), scanned A, original, MIT.

A skill for improving the instructions an AI agent reads about its built-in tools. It compares those instructions with each tool's JSON input schema to find repeated information.

In plain words
What is it for?
Use it to inspect tool prompts, run overlap tests, and revise tool documentation while preserving important behavior and failure rules.
Why use it?
It helps reduce prompt size without removing rules the agent needs. Tests with language models provide evidence about which details can be shortened or must remain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to inspect tool prompts, run overlap tests, and revise tool documentation while preserving important behavior and failure rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/can1357/oh-my-pi/tool-prompt-optimization
About the project

Oh My Pi is a coding agent with an integrated development environment, command-line interface, tools, language-server operations, and debugger operations. It is used by developers who want an AI coding assistant that can read and edit projects, work with models from multiple providers, and interact with development tools. The catalogue add-ons extend its agent workflows with skills, commands, agents, plugins, MCP, and instructions.

can1357/oh-my-pi · 30,281 stars · on GitHub · omp.sh

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 can1357/oh-my-pi --skill tool-prompt-optimization
Clone the repo
git clone --depth 1 https://github.com/can1357/oh-my-pi

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 tool-prompt-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/can1357/oh-my-pi/tool-prompt-optimization/github.svg)](https://agentmods.dev/skills/can1357/oh-my-pi/tool-prompt-optimization)
Your own site
<a href="https://agentmods.dev/skills/can1357/oh-my-pi/tool-prompt-optimization"><img src="https://agentmods.dev/badge/skills/can1357/oh-my-pi/tool-prompt-optimization/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 tool-prompt-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/can1357/oh-my-pi/tool-prompt-optimization"><img src="https://agentmods.dev/badge/skills/can1357/oh-my-pi/tool-prompt-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,680 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00000 $0.01680
Opus 5 $0.00000 $0.00840
Sonnet 5 $0.00000 $0.00336
Haiku 4.5 $0.00000 $0.00168

Measured 10d ago against content hash 1f051cd83e81, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

tool-prompt-optimization scanned grade A with 1 finding 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 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/probe-builtin.ts, scripts/probe.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `read.md`: every covered source — file/dir/archive/sqlite/PDF/URL — prevents `cat`/`curl`/`tar`; omit chunker, binary sniffer, cache layer.
.omp/skills/tool-prompt-optimization/SKILL.md · 117 lines

How it starts

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

Tool Prompt Optimization

Prompt/schema overlap: content reconstructible from (name, JSON schema, blank outline) is a prune candidate, never an automatic delete. Probe this overlap for evidence, not vibes: predict the prompt body from those inputs. Reliably recovered lines: candidates; no-model recovery: load-bearing — keep.

Run probe

scripts/probe.ts: @oh-my-pi/pi-ai completeSimple; production-matching model/auth/provider behavior.

bun .omp/skills/tool-prompt-optimization/scripts/probe.ts \
  --schema <file|json> --template <file|text> --name <tool_name>
  • Required: --schema, --template — file path or inline value.
  • No --model: panel fireworks/kimi-k2.7-code, anthropic/claude-opus-4-8, openai/gpt-5.5 × --samples (default 3); requires FIREWORKS_API_KEY / ANTHROPIC_API_KEY / OPENAI_API_KEY.
  • --model p/id,p/id: override panel. Tune: --samples N, --max-tokens, --json.
  • Programmatic: import { probe } from "./scripts/probe.ts"{ prompt, results: [{ model, samples: [{ text, stopReason, usage, error }] }] }.

Builtin shortcut — preferred for this repo

scripts/probe-builtin.ts instantiates the live tool; gets exact toolWireSchema, tool.description, and derived outline:

bun .omp/skills/tool-prompt-optimization/scripts/probe-builtin.ts --tool <name> [--no-summary] [--show]
  • --show: resolved schema, derived outline, real prompt; exits without API calls. Inspect before spending tokens.
  • --no-summary: direct summary-line-blank ablation.
  • --samples / --model / --max-tokens / --json: panel passthrough. Output ends with real prompt for in-place diff.
  • Factory-map bypasses settings allowlist: gated irc, github, … resolve. Construction availability gate (e.g. missing gh CLI) → manual inputs.

Inputs

Schema: wire schema the model sees, never hand-sketch. Arktype:

import { arkToWireSchema } from "@oh-my-pi/pi-ai"; // or toolWireSchema(tool)
JSON.stringify(arkToWireSchema(toolSchema), null, 2);

Read the full file on GitHub · 117 lines

Files

What ships with it

2 files 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. 10d ago First seen · 117 lines · 0 tokens per session scan A 1f051cd83e81

Subscribe to this mod's changes

tool-prompt-optimization is a skill published in the GitHub repository can1357/oh-my-pi (30,281 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,680 tokens. A static security scan graded it A with 1 finding (makes network calls). 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

histolab

Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.

synthetic-sciences/openscience · 62 tokens

pyhealth

Comprehensive healthcare AI toolkit for developing, testing, and deploying machine learning models with clinical data. This skill should be used when working with electronic health records (EHR), clinical prediction tasks (mortality, readmission, drug recommendation), medical coding systems (ICD, NDC, ATC)…

synthetic-sciences/openscience · 109 tokens

deepchem

Molecular ML with diverse featurizers and pre-built datasets. Use for property prediction (ADMET, toxicity) with traditional ML or GNNs when you want extensive featurization options and MoleculeNet benchmarks. Best for quick experiments with pre-trained models, diverse molecular representations. For graph-first…

synthetic-sciences/openscience · 78 tokens

shap

Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing…

synthetic-sciences/openscience · 109 tokens

torch-geometric

Graph Neural Networks (PyG). Node/graph classification, link prediction, GCN, GAT, GraphSAGE, heterogeneous graphs, molecular property prediction, for geometric deep learning.

synthetic-sciences/openscience · 41 tokens

zarr-python

Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.

synthetic-sciences/openscience · 42 tokens