tokcount
Use this skill when the user wants to measure how many tokens are in a codebase and get a fast pricing estimate.
Preconditions
- •
tokcountis installed and available on PATH. - •You have a repository path to scan.
Standard workflow
- •Resolve the repository path to scan (default current directory).
- •Run summary mode first:
- •
tokcount <repo-path>
- •
- •If the user needs machine-readable output:
- •
tokcount <repo-path> --output json
- •
- •If the user needs full structure detail:
- •
tokcount <repo-path> --tree
- •
- •If the user requests tokenizer-specific counting:
- •
tokcount <repo-path> --tokenizer estimate - •
tokcount <repo-path> --tokenizer openai - •
tokcount <repo-path> --tokenizer anthropic
- •
- •If the user has extra excludes:
- •
tokcount <repo-path> --ignore .tokcountignore
- •
Output expectations
Summary mode includes:
- •repository path
- •tokenizer used
- •files scanned and ignored
- •total token count and line estimate
- •top token-contributing directories (for pruning)
- •Intent Systems pricing estimate block
- •disclaimer that pricing is directional and should be confirmed with Intent Systems
JSON mode includes:
- •
repository - •
tokenizer - •
total_tokens - •
total_files - •
ignored_files - •
directories[]withpath,tokens,percentage - •
pricing_estimate
Reporting guidance
When presenting results back to a user:
- •lead with total tokens and the largest directory contributors
- •include the estimated Proof Pilot cost
- •call out if one directory dominates token share and suggest ignoring non-core directories
- •recommend
--treewhen architecture-level breakdown is needed