word-counter

word-counter is a skill for Claude Code from Moosphan/word-counter-skill. It costs 67 tokens per session (492 once invoked), scanned A, original, MIT.

A reproducible tool for counting words and characters in Chinese, English, or mixed-language text.

In plain words
What is it for?
Measuring the length of articles, essays, books, chapters, outlines, transcripts, or pasted text.
Why use it?
It replaces approximate counts with a stable result based on a selected counting method.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Measuring the length of articles, essays, books, chapters, outlines, transcripts, or pasted text.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/moosphan/word-counter-skill/word-counter
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Moosphan/word-counter-skill --skill word-counter
Clone the repo
git clone --depth 1 https://github.com/Moosphan/word-counter-skill

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for word-counter

README.md
[![agentmods](https://agentmods.dev/badge/skills/moosphan/word-counter-skill/word-counter/github.svg)](https://agentmods.dev/skills/moosphan/word-counter-skill/word-counter)
Your own site
<a href="https://agentmods.dev/skills/moosphan/word-counter-skill/word-counter"><img src="https://agentmods.dev/badge/skills/moosphan/word-counter-skill/word-counter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for word-counter

Your own site · 80×15
<a href="https://agentmods.dev/skills/moosphan/word-counter-skill/word-counter"><img src="https://agentmods.dev/badge/skills/moosphan/word-counter-skill/word-counter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 492 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.00492
Opus 5 $0.00034 $0.00246
Sonnet 5 $0.00013 $0.00098
Haiku 4.5 $0.00007 $0.00049

Measured 11d ago against content hash ac9cdaa68505, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

word-counter scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/word_counter.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/claude/.claude/skills/word-counter/SKILL.md · 57 lines

What it actually says

Word Counter

Use the bundled script to produce a reproducible count instead of estimating from the model.

If the user asks in Chinese, run the script with --locale zh so the report is returned in Chinese. If the user asks in English, use --locale en. Only use --details when the user explicitly asks for detailed statistics.

Pick A Profile

  • Use zh for Chinese-style content counting.
  • Use en for English-style word counting.
  • Use mixed for one total across Chinese and English text.

If the user is ambiguous, run mixed first and mention the zh and en alternatives.

Run The Script

For pasted content:

python3 "$HOME/.claude/skills/word-counter/scripts/word_counter.py" --profile mixed --locale en --format markdown --text "Hello world from OpenAI"

For a file:

python3 "$HOME/.claude/skills/word-counter/scripts/word_counter.py" --profile zh --locale zh --format markdown ./chapter-01.txt

Return A Clear Summary

Return this compact Markdown structure. Use the English example as the default format reference:

# Word Count Result

- Selected profile: `mixed` (Mixed-language count)
- Selected total: `1234`
- Applied formula: `mixed_count = cjk_chars + english_words + number_tokens + other_words`

| Metric | Value |
| --- | ---: |
| Chinese count | 1300 |
| English words | 45 |
| Mixed total | 1234 |
| Line count | 12 |
| Paragraph count | 4 |

For Chinese replies, use the same compact structure with Chinese labels. Do not show CJK characters, English words, or Number tokens unless the user explicitly asks for detailed statistics, in which case run with --details.

For rules and examples, read references/counting-rules.md.

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 57 lines · 67 tokens per session scan A ac9cdaa68505

Subscribe to this mod's changes

word-counter is a skill published in the GitHub repository Moosphan/word-counter-skill (1 stars, last pushed 3mo ago), licensed MIT. It adds 67 tokens to every session and 492 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

skill-curator

A Chinese-language evaluator for deciding whether developer tools and agent resources are suitable for a curated collection. It checks real repositories, installation paths, activity, duplicates, and security boundaries using evidence.

laolaoshiren/claude-code-skills-zh · 75 tokens

git-workflow

A guide for handling Git repository work safely, including status checks, branches, commits, pushes, pull requests, and rebasing. Git is a version-control system that records code changes and coordinates work between developers.

laolaoshiren/claude-code-skills-zh · 73 tokens

i18n-helper

A helper for adding internationalization, which lets software show different languages and regional text. It finds user-visible text written directly in code and moves it into language files.

laolaoshiren/claude-code-skills-zh · 33 tokens

review-plan

Review a plan by running internal reviews and a peer review in parallel and returning combined findings. Use when the user asks to "review my plan", "check my plan", "critique my plan", or wants feedback on a plan.

tobihagemann/turbo · 50 tokens

reply-to-pr-threads

Draft, confirm, and post replies to GitHub PR review threads. Handles per-category reply formatting, re-fetches thread resolution state so auto-resolved threads are skipped, and posts via GraphQL. Use when the user asks to "reply to PR threads", "post PR thread replies", or "draft PR reply messages".

tobihagemann/turbo · 71 tokens

answer-reviewer-questions

For each reviewer question on a PR, recall implementation reasoning and compose a raw answer. Use when the user asks to "answer reviewer questions", "draft answers to PR questions", or "explain reviewer questions".

tobihagemann/turbo · 48 tokens