agentsclimarketplace

Token count

Skill smcllns/skills/token-count

A collection of skills I use regularly

Install
npx -y skills add smcllns/skills --skill token-count

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when you need a free, accurate token count across Anthropic/Gemini/OpenAI for prompt budgeting, skill sizing, or annotating file references. Returns per-vendor counts and a range string.

SKILL.md

1.0 KB, 229 tokens by cl100k_base, as published. Nobody here has run it

Token count

Call all three server-side count endpoints (no inference, free), then return a structured result.

  • AnthropicPOST https://api.anthropic.com/v1/messages/count_tokens (x-api-key)
  • GeminiPOST https://generativelanguage.googleapis.com/v1beta/models/{model}:countTokens (API key)
  • OpenAIPOST https://api.openai.com/v1/responses/input_tokens (Bearer)

Tokenizer is vendor-fixed; model only selects family. Use any current model per vendor (e.g. claude-sonnet-4-6, gemini-2.5-flash, gpt-5).

Output

Return a JSON object:

{
  "counts": { "anthropic": 1234, "gemini": 1200, "openai": 1300 },
  "range": "1,200–1,300 tokens"
}
  • range — smallest–largest, comma-formatted, suffixed tokens

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.