Tool Budget Auditのロゴ

Tool Budget Audit

組織
MiniMax-AI
tool-budget-audit

Audit how much context an agent's tools consume, through tool definitions and tool results, and decide whether to trim the catalog, add tool search, or add programmatic tool calling. Use when an agent has many tools or MCP servers, picks the wrong tools, or burns context on tool output.

概要

公開者MiniMax-AI
リポジトリmcode-stack
スキル名tool-budget-audit
スター
464
フォーク
36
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    MiniMax-AIがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Tool Budget Audit」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/MiniMax-AI/mcode-stack/tree/main/stacks/ronny/skills/tool-budget-audit
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MiniMax-AI/mcode-stack.git /tmp/mcode-stack
mkdir -p .claude/skills
cp -r /tmp/mcode-stack/stacks/ronny/skills/tool-budget-audit .claude/skills/tool-budget-audit
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでTool Budget Auditを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にTool Budget Auditを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Tool Budget Auditは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Tool Budget Audit

Tools cost context in two ways, plus one side effect:

  • Definitions. Every tool's name, description and parameter schema sits in context whether or not it is used this turn.
  • Intermediate results. Every call puts its full output back into the conversation, and every round trip is another full model request.
  • Side effect: wrong picks. Similar names and vague descriptions make the model choose the wrong tool or pass wrong arguments.

Tool search mainly saves the first cost. Programmatic tool calling (the model writes a small program that calls tools) mainly saves the second.

Companion to MCode Engineering Notes 02, "Too many tools will eat your context". Plain-text checklist: checklists/tool-budget.md.

1. Measure first

Work from the target project's code and real requests, not from guesses:

  1. List every tool exposed to the model, grouped by source (built-in, each MCP server, plugins).
  2. Estimate the token size of each tool definition with a tokenizer and sum it. Say which tokenizer you used; it is a relative measure.
  3. For one or two representative tasks, record how many tool calls were made, how many model requests that caused, and how large the tool results were.
  4. Note which tools are used almost every turn and which are rarely used.

Report the numbers you measured. If you cannot measure something, say so instead of estimating.

2. Step 0 - subtract

  • Merge by user intent. Do not map APIs one to one. "List issues", "filter issues by label" and "filter by author" can be one tool with parameters.
  • Make names and descriptions distinguishable. Two tools whose descriptions read alike will be confused. State the return format.
  • Group. Put tools into namespaces by domain, keeping each group small.
  • Decide what stays resident. Read, edit, search and run-command style tools used nearly every turn should always be loaded.

3. Step 1 - deferred loading and tool search

Consider it when there are many tools and most are rarely used.

  • Keep core high-frequency tools resident; make low-frequency tools searchable.
  • If a search miss means a tool "does not exist", check descriptions again: vague descriptions break recall.
  • Test tool search recall on your own tool set. Results on clean benchmarks do not transfer to messy real catalogs.
  • Tools whose catalog must be fetched over the network every turn can slow the first token. Consider keeping them resident instead.
  • When debugging, check what the model had actually seen at that moment, not just what the request listed.

4. Step 2 - programmatic tool calling

Consider it when there is a lot of data to filter or aggregate, three or more dependent calls, or batch operations that could run in parallel.

  • Actually move tools into the program. Offering a code tool next to all the normal tools tends to go unused.
  • Keep at top level: tools that interact with the user, change session state, need their result read before deciding the next step (tool search, loading a skill), browser and publishing tools, and spawning subagents.
  • Calls from inside the program must go through the same validation, hooks, permission prompts and UI as direct calls.
  • Tool failures should return an error result, not throw, so one failure does not discard the whole program.
  • Prefer structured tool output so the program can pick the fields it needs. A program that returns raw output saves nothing.
  • Search the codebase for logic keyed on tool names (reminders, counters, analytics). It silently stops firing once a tool moves into the program.

5. Decide

BottleneckFirst move
Too many or too similar toolsSubtract, merge, rename, group
Definitions take too much contextTool search
Results take too much context, too many round tripsProgrammatic tool calling
Arguments often wrongBetter descriptions and examples

The steps stack. A clean catalog makes tool search work; working tool search makes programmatic calling work. Run an end-to-end eval before and after each step and look at score, request count and tokens together (see harness-experiment).

Output

A short report: measured numbers, the main bottleneck, the recommended next step with concrete tool names, and what to measure afterwards.

よくある質問

AIスキル「Tool Budget Audit」では何ができますか?

Audit how much context an agent's tools consume, through tool definitions and tool results, and decide whether to trim the catalog, add tool search, or add programmatic tool calling. Use when an agent has many tools or MCP servers, picks the wrong tools, or burns context on tool output.

TypingMindでTool Budget Auditを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Tool Budget Auditはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにTool Budget Auditをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/MiniMax-AI/mcode-stack/tree/main/stacks/ronny/skills/tool-budget-auditを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Tool Budget Auditを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Tool Budget Auditで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもTool Budget Auditを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Tool Budget Audit」は無料ですか?

はい。MiniMax-AIがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇