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.
Install
npx skills add https://github.com/NVIDIA/SkillEvaluator/tree/main/src/skillevaluator/tier3/reference_skills/text-analyzer
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install nvidia-skillevaluator@llmmart
git clone https://github.com/NVIDIA/SkillEvaluator.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole nvidia/skillevaluator collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
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
- Read this SKILL.md to understand capabilities.
- Run
scripts/analyze_text.pywith the appropriate arguments. - 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
| Problem | Fix |
|---|---|
FileNotFoundError |
Check the --file path exists |
| Empty output | Ensure --text or --file is provided |
Files (skillevaluator)
-
evals
-
evals.json 1.2 KB
Loading… -
evals2.json 4.5 KB
Loading…
-
-
scripts
-
analyze_text.py 2.5 KB
Loading…
-
-
SKILL.md 1.8 KB
--- name: text-analyzer description: 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. compatibility: Python 3.10+, no external dependencies metadata: author: SkillEvaluator Maintainers <maintainers@example.com> --- # 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 ```bash # 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 | Problem | Fix | |---------|-----| | `FileNotFoundError` | Check the `--file` path exists | | Empty output | Ensure `--text` or `--file` is provided |
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.