← 返回 Skills 市场
putixiaosheng

prompt-token-analyzer

作者 putixiaosheng · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
263
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install prompt-token-analyzer
功能描述
A Node.js CLI tool that analyzes prompt token usage using a GPT-compatible tokenizer. Helps agents estimate prompt size, debug context overflow, and optimize...
安全使用建议
This skill is coherent for a simple prompt-token CLI, but be cautious before running the install steps. Installing an unvetted npm package globally can run code during install; prefer to: (1) inspect the npm package (or its source) before installing, (2) install locally or use npx instead of npm -g, (3) avoid sudo when possible (or install into a user-writable bin directory), or (4) run the tool inside a disposable container/VM. If you do install globally, review the package's postinstall scripts and repository first.
功能分析
Type: OpenClaw Skill Name: prompt-token-analyzer Version: 1.0.1 The Prompt Token Analyzer is a legitimate utility for estimating LLM token usage. The skill instructions in SKILL.md guide the agent to install the 'gpt-tokenizer' package and create a local CLI tool that calculates token counts from text or files. The script logic is transparent, lacks any network or exfiltration capabilities, and its use of sudo for installation is a standard procedure for global CLI tools.
能力评估
Purpose & Capability
Name, description, and required binaries (node, npm) match the presented behavior: installing an npm tokenizer and creating a small Node CLI to count tokens. No unrelated credentials or resources are requested.
Instruction Scope
SKILL.md only instructs installing gpt-tokenizer, creating a local CLI script that reads user-supplied files or text and prints token counts/cost estimates. It does not instruct reading other system files, sending data to external endpoints, or harvesting credentials. It does instruct moving the script into /usr/local/bin (requires sudo).
Install Mechanism
There is no platform-controlled install spec; the doc tells the user to run npm install -g gpt-tokenizer. Installing arbitrary global npm packages can execute package lifecycle scripts (postinstall) and run code on your machine. The instructions also suggest placing a script into /usr/local/bin with sudo, giving the tool a persistent system-wide location.
Credentials
No environment variables, credentials, or config paths are requested. The requested access (node/npm and ability to write to /usr/local/bin) is proportionate to a CLI tool.
Persistence & Privilege
Skill is not always-enabled and does not request elevated platform privileges, but the manual installation puts a persistent executable in the system PATH and requires sudo to move it there. That is expected for a CLI but increases impact if the installed package is malicious.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install prompt-token-analyzer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /prompt-token-analyzer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Revised and clarified documentation for better readability and structure. - Improved sections for installation, quick start, and troubleshooting. - Simplified explanations of use cases and benefits. - Removed redundant instructions and streamlined CLI setup steps. - Added guidance for reporting and resolving issues.
v1.0.0
- Initial release of Prompt Token Analyzer CLI tool. - Analyze token usage in prompt files or direct text using GPT-compatible tokenization. - Provides character count, token count, average characters per token, and a sample cost estimate. - Useful for debugging prompt size, estimating LLM costs, and optimizing RAG pipelines. - Compatible with OpenAI-style `gpt-tokenizer`.
元数据
Slug prompt-token-analyzer
版本 1.0.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

prompt-token-analyzer 是什么?

A Node.js CLI tool that analyzes prompt token usage using a GPT-compatible tokenizer. Helps agents estimate prompt size, debug context overflow, and optimize... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 263 次。

如何安装 prompt-token-analyzer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install prompt-token-analyzer」即可一键安装,无需额外配置。

prompt-token-analyzer 是免费的吗?

是的,prompt-token-analyzer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

prompt-token-analyzer 支持哪些平台?

prompt-token-analyzer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 prompt-token-analyzer?

由 putixiaosheng(@putixiaosheng)开发并维护,当前版本 v1.0.1。

💬 留言讨论