cuttlesoft/Token Guard — LLM Token Limit Checker
Count tokens in files using tiktoken and enforce configurable limits
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| patterns | Glob patterns targeting LLM instruction/config files, one per line. Supports ! negation. | yes | **/CLAUDE.md .claude/** **/AGENTS.md .cursorrules .cursor/rules/** .windsurfrules .clinerules .github/copilot-instructions.md .github/prompts/** .github/agents/** prompts/** .prompts/** |
| max_tokens | Token limit threshold | no | 2500 |
| token_limit_mode | "total" (sum of all files) or "per_file" (each file individually) | no | total |
| encoding | Tiktoken encoding: cl100k_base, o200k_base, p50k_base, p50k_edit, r50k_base | no | cl100k_base |
Outputs
| name | description |
|---|---|
| total_tokens | Sum of tokens across all matched files |
| file_count | Number of files processed |
| files_over_limit | Comma-separated paths of files over limit (per_file mode) |