TokenCount
Count words, characters, and estimate GPT tokens with readability. Use when tracking length, checking budgets, comparing complexity.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bytesagain/tokencountTokenCount
A real text and token counter for the terminal. Count words, lines, characters, and sentences. Estimate LLM token usage with cost projections. Analyze word frequency and compare files side by side.
Commands
| Command | Description |
|---|---|
tokencount count <file|text> | Count words, lines, characters, sentences, paragraphs, avg word length, and reading time. Works with files or inline text |
tokencount tokens <file> | Estimate LLM token count using 3 methods (chars÷4, words×1.33, bytes÷3.5), shows cost estimates for GPT-4 class models and context window usage bars |
tokencount freq <file> | Full word frequency analysis — ranked table with counts, percentages, bar chart, and vocabulary richness score |
tokencount top <file> [n] | Show top N most common words (default: 20) |
tokencount diff <file1> <file2> | Compare two files — side-by-side word/line/char/token counts, unique words in each, common vocabulary |
Requirements
- Standard Unix tools:
wc,awk,sort,tr,grep,comm
Examples
# Count everything in a file
tokencount count README.md
# Count inline text
tokencount count "Hello world, this is a test."
# Estimate tokens and costs
tokencount tokens article.txt
# Word frequency analysis
tokencount freq novel.txt
# Top 10 words
tokencount top essay.txt 10
# Compare two drafts
tokencount diff draft-v1.txt draft-v2.txt
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bytesagain-tokencount": {
"enabled": true,
"auto_update": true
}
}
}Tags
Related Skills
designer-intelligence-station
Designer intelligence collection tool. Monitors 46 public sources (AI/hardware/mobile/design), dynamic quality-based filtering v2.1.8, generates structured daily/weekly reports. All data stored locally.
ai-workflow-red-team-lite
对 AI 自动化流程做轻量红队演练,聚焦误用路径、边界失败和数据泄露风险。;use for red-team, ai, workflow workflows;do not use for 输出可直接滥用的攻击脚本, 帮助破坏系统.
soul-weaver
AI Soul Weaver - 12 Curated Celebrity Templates + Custom Generation. Generate OpenClaw agent configurations through dialog or select from 12 world-famous tech & business leaders.
style-cloner
提供1-5篇参考文章 + 原始素材,AI 分析参考文章的风格特征, 将素材改写成同风格的成品文章,输出3个版本供选择,支持强度调节和迭代优化。
project-evaluator
描述一个项目想法,AI 从市场/技术/商业/风险四个维度系统评估, 输出评估报告、竞品速查、MVP建议,帮你决策「值不值得做」。