Skip to content
Back to skills

Tokencount

ASecurity

Count words, characters, and estimate GPT tokens with readability. Use when tracking length, checking budgets, comparing complexity.

  • 12 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 7, 2026
toolsgobashgit

Works with

  • terminal

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add bytesagain/ai-skills --skill tokencount --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tokencount?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tokencount
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bytesagain-tokencount/badge)](https://www.skillsdirectory.com/skills/bytesagain-tokencount)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: TokenCount
description: "Count words, characters, and estimate GPT tokens with readability. Use when tracking length, checking budgets, comparing complexity."
version: "3.0.0"
author: "BytesAgain"
homepage: https://bytesagain.com
source: https://github.com/bytesagain/ai-skills
tags: ["token","word","count","text","nlp","ai","gpt"]
categories: ["Developer Tools", "Utility"]
---

# TokenCount

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

```bash
# 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
```

Files in this skill

  • SKILL.md1.8 KB
  • scripts/script.sh11.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.