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