Token Counter

Counts tokens in documentation to ensure compliance with AI context window limits. Reports token counts per page, identifies oversized content. Use when measuring documentation token counts for AEO compliance.

Spirizeon Updated

File contents

Token Counter Skill

Counts tokens in documentation.

When to Use This Skill

  • Measure token counts
  • Verify pages within limits
  • Identify oversized content

Token Limits

Page Type Recommended Maximum
Quick Start < 15,000 20,000
API Reference < 25,000 30,000
Conceptual Guide < 20,000 25,000
llms.txt < 5,000 10,000

Usage

# Count tokens in URL
python3 scripts/token_counter.py https://example.com/docs/quickstart

# Check against limits
python3 scripts/token_counter.py https://example.com/docs/api --check-limits

# JSON output
python3 scripts/token_counter.py https://example.com/docs --json

Spirizeon/agentic-aeo-skills/tree/main/.claude/skills/token-counter commit 3afad8c74e

Frequently asked questions

npx skillmds@latest add spirizeon/token-counter