← Back to Skills Marketplace
putixiaosheng

prompt-token-analyzer

by putixiaosheng · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
263
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install prompt-token-analyzer
Description
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...
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install prompt-token-analyzer
  3. After installation, invoke the skill by name or use /prompt-token-analyzer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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`.
Metadata
Slug prompt-token-analyzer
Version 1.0.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 263 downloads so far.

How do I install prompt-token-analyzer?

Run "/install prompt-token-analyzer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is prompt-token-analyzer free?

Yes, prompt-token-analyzer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does prompt-token-analyzer support?

prompt-token-analyzer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created prompt-token-analyzer?

It is built and maintained by putixiaosheng (@putixiaosheng); the current version is v1.0.1.

💬 Comments