AugmentClaude

text-analyzer

Analyze text content and produce statistics including word count, line count, character count, most frequent words, and readability metrics. Works on any plain text input provided inline or from a file path.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up β€” so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/text-analyzer-nvidia/ β€” the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β€” they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description β€” no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the β€œWhat this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Analyze text content and produce statistics including word count, line count, character count, most frequent words, and readability metrics. Works on any plain text input provided inline or from a file path.

What this skill does

Text Analyzer

Analyze text and produce structured statistics.

Purpose

Provide quick text analytics β€” word counts, line counts, character counts, top frequent words, average word length, and sentence count β€” for any plain-text input.

Agent Instructions

  1. Read this SKILL.md to understand capabilities.
  2. Run scripts/analyze_text.py with the appropriate arguments.
  3. Return the analysis results to the user.

Examples

Usage

# Analyze inline text
python scripts/analyze_text.py --text "Your text content here"

# Analyze a file
python scripts/analyze_text.py --file /path/to/file.txt

# JSON output (default is human-readable)
python scripts/analyze_text.py --text "Hello world" --json

Output

The script prints a structured report with:

  • Word count β€” total words
  • Line count β€” total lines
  • Character count β€” total characters (including whitespace)
  • Sentence count β€” estimated sentence count
  • Average word length β€” mean characters per word
  • Top 5 words β€” most frequent words and their counts

Limitations

  • Sentence detection uses simple period/question/exclamation splitting; may be inaccurate for abbreviations (e.g., "U.S.A.").
  • Non-UTF-8 files will be read with errors replaced.

Troubleshooting

ProblemFix
FileNotFoundErrorCheck the --file path exists
Empty outputEnsure --text or --file is provided

Related skills