context-budget
できること
AIをどれくらい使えるか、残りの「予算(バジェット)」を把握するためのツールです。現在の使用状況を確認したり、設定の詳しい分析を行ったりできますが、依頼されたときにだけ実行します。
使う場面
- ✓AIをあとどれくらい使えるか、残りの「余裕」を知りたいとき。
- ✓インストールされているものと、それが占めている容量の概要を知りたいとき。
- ✓AIの設定について、より詳しい分析が必要なとき。
スキルのリンク
https://github.com/affaan-m/ECC/blob/main/skills/context-budget/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“現在のコンテキストバジェットはどれくらいですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIプログラムの特定のコマンドを使って、リアルタイムの使用状況を確認します。より詳しい分析を依頼された場合は、すべてを読み込まずに設定ファイルを確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Context Budget
Use the provider's native meter for live session usage. Keep the separate, estimated installation audit behind an explicit opt-in.
Default: Live Context
Treat an invocation with no audit request as a live-context request. This includes requests for the current window, remaining capacity, headroom, token usage, or a context breakdown.
For this default path:
- Do not call or use tools.
- Do not scan or read files.
- Do not run shell commands, provider CLIs, debug logging, or MCP discovery.
- Reply with only the native command and one short explanation.
Route by the active harness:
| Harness | Native command | Guidance |
|---|---|---|
| Codex CLI | /status |
Shows current token usage and remaining context capacity. Use /statusline and enable Context stats plus Token counters for a persistent footer meter. |
| Codex app | /status |
Shows current thread context usage and rate limits. |
| Claude Code | /context |
Shows the live context breakdown. Use /context all for expanded items. |
| Other or unknown | None verified | State that ECC cannot read live provider state and ask which harness is active. |
These commands are documented in the Codex command reference and Claude Code command reference.
A skill cannot invoke a TUI slash command on the user's behalf. Never replace the native command with an estimated scan and never infer an audit request from phrases such as “context is heavy” or “how much is left.”
Explicit Static Audit
Run an installation/configuration audit only when the user explicitly says
--audit, “audit installed components,” or equivalent unambiguous wording.
--verbose changes report detail; it does not opt into an audit by itself.
If the audit scope is ambiguous, ask for the harness and installation root before reading anything. Keep every audit bounded and read-only:
- Inspect only the named plugin/install root and the named harness's known configuration files.
- Never recursively enumerate the workspace root, home directory, provider cache, transcripts, debug logs, or unrelated worktrees.
- Never launch a provider CLI, MCP server, or debug session to count tools.
- Cap inventory output at 50 entries per component class. Summarize the rest.
- Do not write temporary logs or copy configuration content into the report.
Audit only the component metadata relevant to eager discovery:
- agent and skill descriptions;
- command descriptions when the harness discovers them eagerly;
- always-loaded instruction files in the explicitly named scope;
- configured MCP tool schemas when an existing bounded manifest exposes them.
Full skill, agent, command, and rule bodies are generally on-demand content. Report their disk size separately from estimated eager overhead instead of adding every body to the session baseline.
Audit Output
Return a compact report containing:
- harness and exact paths inspected;
- estimated eager/discovery overhead by component class;
- installed counts and the heaviest metadata entries;
- assumptions, unavailable measurements, and up to three optimizations.
Every calculated token number is an estimate of static configuration overhead, not live session context. Do not claim that an estimate is provider-reported, current, exact, or evidence of realized savings. Direct the user back to the native live-context command for current usage.
Optional Selected-Record Diagnostic
Inspect a persisted record only when the user explicitly selects that file for this diagnostic. This is separate from the default live-context request and the installation audit.
For a local file diagnostic, explicitly select a stable, regular JSONL file or a snapshot you intend to inspect. Replace the example path below; this does not find or reconnect a session. The snippet prints aggregate byte counts only. It reads one line at a time, so memory use depends on the largest record; avoid very large records and actively growing files.
python3 - "/path/to/selected-session.jsonl" <<'EOF'
import json
import sys
total = attachment = other = unclassified = 0
try:
with open(sys.argv[1], "rb") as source:
for raw in source:
size = len(raw)
total += size
try:
record = json.loads(raw.decode("utf-8"))
except (UnicodeDecodeError, json.JSONDecodeError):
…
よくある質問
AIを使いすぎているかどうかは、どうすればわかりますか?
「トークンの使用量はどれくらいですか?」や「残りの容量はどれくらいですか?」と尋ねると、現在の状況を確認できます。
「インストール監査」とは何ですか?
インストールされている構成要素と、その設定を詳しく点検することです。より多くのリソースを使うため、明示的に依頼されたときにだけ実行されます。
特定のファイルを確認するようAIに頼むことはできますか?
いいえ。このツールは、個々のファイルではなく、AI全体の使用状況と設定に焦点を当てています。
詳細
作者による元の説明
Routes live context checks to the native Codex or Claude Code meter without scanning files, and performs a bounded static component audit only when explicitly requested. Use for context-budget requests about remaining capacity or installed context overhead.
repo: affaan-m/ECC
人気
- GitHubのスター
- 280k
- ランキング
- #285
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
accessibility
280kエージェントが誰にとっても使いやすいインターフェースを作れるように手助けします。目が見えない方や身体の動きに制限のある方など、障害のある人にとってもWebサイトやアプリが正しく動くようにします。
agent-architecture-audit
280kエージェントがすべて正しく動いているかを確認できるようにします。AIシステムの問題を見つけて修正し、期待どおりに動くようにします。
agent-eval
280kエージェントが異なるAIコーディングツールを比較できるようにします。特定のタスクにおいて、どれがより速く、安く、信頼性が高いかを測定します。
agent-harness-construction
280kエージェントがタスクの進め方をよりよく理解できるようにします。エージェントが使うツールや指示を最適化し、成功する可能性を高めます。
似ているスキル
knowledge-automation
394kナレッジボールトに新しいコンテンツを定期的に取り込む繰り返しジョブを設定し、そのジョブが動いていることを確認するようエージェントを支援します。
knowledge-source-ingest
394kチャットチャンネル、フィード、メールボックスからの新しい項目でナレッジボールトを最新に保ち、すでに取り込んだものは再び追加しないようエージェントを支援します。
watchers
260kRSSフィード、JSONのエンドポイント、またはGitHubの活動を定期的に監視し、前回の確認以降に新しくなった項目だけを報告するようエージェントを支援します。