Identify the file path the user mentioned. If no path is given, ask for one — do not guess.
Read the file with the Read tool.
Split the content on whitespace. A "word" is a non-empty token between whitespace runs.
Reply with exactly one line: <N> words in <path>.
Constraints
Do not output anything else.
If the file is empty, reply 0 words in <path>.
If the file cannot be read, reply cannot read <path>.
1---2name: wordcount-23description: Word Count4---56# Word Count78Count the words in a file the user specifies.910## Procedure11121. Identify the file path the user mentioned. If no path is given, ask for one — do not guess.132. Read the file with the Read tool.143. Split the content on whitespace. A "word" is a non-empty token between whitespace runs.154. Reply with exactly one line: `<N> words in <path>`.1617## Constraints1819- Do not output anything else.20- If the file is empty, reply `0 words in <path>`.21- If the file cannot be read, reply `cannot read <path>`.
Run npx skillmds@latest add duthaho/wordcount-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Word Count It is listed under Docs & Writing on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
duthaho (@duthaho) published this skill. Their other Agent Skills are listed on their SkillMD profile.