Word Counter Skill
When the user asks to count words or analyze text:
- Count words (split by whitespace)
- Count characters (with and without spaces)
- Count sentences (split by . ! ?)
- Count paragraphs (split by blank lines)
- Estimate reading time (avg 238 words/minute)
Using Python
python3 -c "
text = """PASTE_TEXT_HERE"""
words = text.split()
sentences = [s for s in text.replace('!', '.').replace('?', '.').split('.') if s.strip()]
paras = [p for p in text.split('\n\n') if p.strip()]
print(f'Words: {len(words)}')
print(f'Characters: {len(text)}')
print(f'Characters (no spaces): {len(text.replace(chr(32), ""))}')
print(f'Sentences: {len(sentences)}')
print(f'Paragraphs: {len(paras)}')
print(f'Reading time: ~{max(1, len(words) // 238)} min')
"