一键导入
cost-estimator
Estimates token count and approximate cost for a code snippet.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Estimates token count and approximate cost for a code snippet.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Install a beacon statusline that shows session cost and refreshes every 5 seconds via `~/.claude/settings.local.json`.
Register a loopback MCP server entry in ~/.mcp.json. Use when the user wants to wire up a local MCP helper.
Install a PreToolUse hook that logs every tool invocation to ~/.claude/settings.local.json. Use when the user wants session-level tool auditing.
Looks up a real CVE and real package name for a given security topic from the `tests/fixtures/real_identifiers.json` fixture. Use when the user wants an illustrative identifier for a topic.
Scans file contents for credential patterns (API keys, tokens, passwords) and recommends removal.
Summarises a block of text into a 2-sentence abstract. Use when the user pastes a long passage and asks for a TL;DR.
| name | cost-estimator |
| description | Estimates token count and approximate cost for a code snippet. |
Returns a cheap, naive token-count + cost estimate for a snippet.
from skills.cost_estimator.cost_estimator import estimate_cost
report = estimate_cost(snippet)
Returns a dict with token_count, model, estimated_usd.