Wordcount

Word Count

duthaho ee27326 563 B Updated

File contents

Word Count

Count the words in a file the user specifies.

Procedure

  1. Identify the file path the user mentioned. If no path is given, ask for one — do not guess.
  2. Read the file with the Read tool.
  3. Split the content on whitespace. A "word" is a non-empty token between whitespace runs.
  4. 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>.

duthaho/claude-in-action/tree/main/10-plugins/lab-03-publish-to-marketplace/starter/marketplace/plugins/quote-of-the-day/skills/wordcount commit ee27326efd

Frequently asked questions

npx skillmds@latest add duthaho/wordcount-2