Sample Text Processor
Reference BASIC-tier skill used as a fixture by skill-tester.
How to use it
Claude Code
- Run the line below. It pulls the whole folder into
~/.claude/skills/sample-skill, including the files SKILL.md points to. - Describe your job in plain words. Claude Code follows the skill from there.
npx degit alirezarezvani/claude-skills/engineering/skills/skill-tester/assets/sample-skill#main ~/.claude/skills/sample-skillFor one project only, change the path to .claude/skills/sample-skill. This skill also uses skill_validator.py, script_tester.py, text_processor.py, document.txt, results.json, transformed.txt — copying SKILL.md alone won't be enough. See the folder on GitHub.
Claude (web or desktop app)
- On this page open ⋯ → Download .md.
- Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
- Pick the file and Save. Claude shows the name and description and runs a security scan.
- Check the skill is switched on.
- Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
- ChatGPT: make a Project and paste it into Instructions.
- Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Source of Sample Text Processor
Show the full text163 lines
| name | description |
|---|---|
| sample-text-processor | Reference BASIC-tier skill used as a fixture by skill-tester. Counts words and characters and applies basic text transformations. Use when validating skill-tester itself or when you need a minimal, known-good skill layout to copy. Not a production skill. |
Sample Text Processor
This file is the fixture skill_validator.py and script_tester.py run against. It is deliberately minimal. Keep its frontmatter valid YAML and limited to the fields Claude Code reads: anything else here gets copied into new skills by authors treating it as a template.
Tier: BASIC. Dependencies: none, Python standard library only.
Description
The Sample Text Processor is a simple skill designed to demonstrate the basic structure and functionality expected in the claude-skills ecosystem. This skill provides fundamental text processing capabilities including word counting, character analysis, and basic text transformations.
This skill serves as a reference implementation for BASIC tier requirements and can be used as a template for creating new skills. It demonstrates proper file structure, documentation standards, and implementation patterns that align with ecosystem best practices.
The skill processes text files and provides statistics and transformations in both human-readable and JSON formats, showcasing the dual output requirement for skills in the claude-skills repository.
Features
Core Functionality
- Word Count Analysis: Count total words, unique words, and word frequency
- Character Statistics: Analyze character count, line count, and special characters
- Text Transformations: Convert text to uppercase, lowercase, or title case
- File Processing: Process single text files or batch process directories
- Dual Output Formats: Generate results in both JSON and human-readable formats
Technical Features
- Command-line interface with comprehensive argument parsing
- Error handling for common file and processing issues
- Progress reporting for batch operations
- Configurable output formatting and verbosity levels
- Cross-platform compatibility with standard library only dependencies
Usage
Basic Text Analysis
python text_processor.py analyze document.txt
python text_processor.py analyze document.txt --output results.json
Text Transformation
python text_processor.py transform document.txt --mode uppercase
python text_processor.py transform document.txt --mode title --output transformed.txt
Batch Processing
python text_processor.py batch text_files/ --output results/
python text_processor.py batch text_files/ --format json --output batch_results.json
Examples
Example 1: Basic Word Count
$ python text_processor.py analyze sample.txt
=== TEXT ANALYSIS RESULTS ===
File: sample.txt
Total words: 150
Unique words: 85
Total characters: 750
Lines: 12
Most frequent word: "the" (8 occurrences)
Example 2: JSON Output
$ python text_processor.py analyze sample.txt --format json
{
"file": "sample.txt",
"statistics": {
"total_words": 150,
"unique_words": 85,
"total_characters": 750,
"lines": 12,
"most_frequent": {
"word": "the",
"count": 8
}
}
}
Example 3: Text Transformation
$ python text_processor.py transform sample.txt --mode title
Original: "hello world from the text processor"
Transformed: "Hello World From The Text Processor"
Installation
This skill requires only Python 3.7 or later with the standard library. No external dependencies are required.
- Clone or download the skill directory
- Navigate to the scripts directory
- Run the text processor directly with Python
cd scripts/
python text_processor.py --help
Configuration
The text processor supports various configuration options through command-line arguments:
--format: Output format (json, text)--verbose: Enable verbose output and progress reporting--output: Specify output file or directory--encoding: Specify text file encoding (default: utf-8)
Architecture
The skill follows a simple modular architecture:
- TextProcessor Class: Core processing logic and statistics calculation
- OutputFormatter Class: Handles dual output format generation
- FileManager Class: Manages file I/O operations and batch processing
- CLI Interface: Command-line argument parsing and user interaction
Error Handling
The skill includes comprehensive error handling for:
- File not found or permission errors
- Invalid encoding or corrupted text files
- Memory limitations for very large files
- Output directory creation and write permissions
- Invalid command-line arguments and parameters
Performance Considerations
- Efficient memory usage for large text files through streaming
- Optimized word counting using dictionary lookups
- Batch processing with progress reporting for large datasets
- Configurable encoding detection for international text
Contributing
This skill serves as a reference implementation and contributions are welcome to demonstrate best practices:
- Follow PEP 8 coding standards
- Include comprehensive docstrings
- Add test cases with sample data
- Update documentation for any new features
- Ensure backward compatibility
Limitations
As a BASIC tier skill, some advanced features are intentionally omitted:
- Complex text analysis (sentiment, language detection)
- Advanced file format support (PDF, Word documents)
- Database integration or external API calls
- Parallel processing for very large datasets
This skill demonstrates the essential structure and quality standards required for BASIC tier skills in the claude-skills ecosystem while remaining simple and focused on core functionality.
| 1 | |
| 2 | name sample-text-processor |
| 3 | description "Reference BASIC-tier skill used as a fixture by skill-tester. Counts words and characters and applies basic text transformations. Use when validating skill-tester itself or when you need a minimal, known-good skill layout to copy. Not a production skill." |
| 4 | |
| 5 | |
| 6 | # Sample Text Processor |
| 7 | |
| 8 | This file is the fixture skill_validator.py and script_tester.py run against. |
| 9 | It is deliberately minimal. Keep its frontmatter valid YAML and limited to the |
| 10 | fields Claude Code reads: anything else here gets copied into new skills by |
| 11 | authors treating it as a template. |
| 12 | |
| 13 | Tier: BASIC. Dependencies: none, Python standard library only. |
| 14 | |
| 15 | ## Description |
| 16 | |
| 17 | The Sample Text Processor is a simple skill designed to demonstrate the basic structure and functionality expected in the claude-skills ecosystem. This skill provides fundamental text processing capabilities including word counting, character analysis, and basic text transformations. |
| 18 | |
| 19 | This skill serves as a reference implementation for BASIC tier requirements and can be used as a template for creating new skills. It demonstrates proper file structure, documentation standards, and implementation patterns that align with ecosystem best practices. |
| 20 | |
| 21 | The skill processes text files and provides statistics and transformations in both human-readable and JSON formats, showcasing the dual output requirement for skills in the claude-skills repository. |
| 22 | |
| 23 | ## Features |
| 24 | |
| 25 | ### Core Functionality |
| 26 | **Word Count Analysis**: Count total words, unique words, and word frequency |
| 27 | **Character Statistics**: Analyze character count, line count, and special characters |
| 28 | **Text Transformations**: Convert text to uppercase, lowercase, or title case |
| 29 | **File Processing**: Process single text files or batch process directories |
| 30 | **Dual Output Formats**: Generate results in both JSON and human-readable formats |
| 31 | |
| 32 | ### Technical Features |
| 33 | Command-line interface with comprehensive argument parsing |
| 34 | Error handling for common file and processing issues |
| 35 | Progress reporting for batch operations |
| 36 | Configurable output formatting and verbosity levels |
| 37 | Cross-platform compatibility with standard library only dependencies |
| 38 | |
| 39 | ## Usage |
| 40 | |
| 41 | ### Basic Text Analysis |
| 42 | |
| 43 | python text_processor.py analyze document.txt |
| 44 | python text_processor.py analyze document.txt --output results.json |
| 45 | |
| 46 | |
| 47 | ### Text Transformation |
| 48 | |
| 49 | python text_processor.py transform document.txt --mode uppercase |
| 50 | python text_processor.py transform document.txt --mode title --output transformed.txt |
| 51 | |
| 52 | |
| 53 | ### Batch Processing |
| 54 | |
| 55 | python text_processor.py batch text_files/ --output results/ |
| 56 | python text_processor.py batch text_files/ --format json --output batch_results.json |
| 57 | |
| 58 | |
| 59 | ## Examples |
| 60 | |
| 61 | ### Example 1: Basic Word Count |
| 62 | |
| 63 | $ python text_processor.py analyze sample.txt |
| 64 | === TEXT ANALYSIS RESULTS === |
| 65 | File: sample.txt |
| 66 | Total words: 150 |
| 67 | Unique words: 85 |
| 68 | Total characters: 750 |
| 69 | Lines: 12 |
| 70 | Most frequent word: "the" (8 occurrences) |
| 71 | |
| 72 | |
| 73 | ### Example 2: JSON Output |
| 74 | |
| 75 | $ python text_processor.py analyze sample.txt --format json |
| 76 | { |
| 77 | "file": "sample.txt", |
| 78 | "statistics": { |
| 79 | "total_words": 150, |
| 80 | "unique_words": 85, |
| 81 | "total_characters": 750, |
| 82 | "lines": 12, |
| 83 | "most_frequent": { |
| 84 | "word": "the", |
| 85 | "count": 8 |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | |
| 91 | ### Example 3: Text Transformation |
| 92 | |
| 93 | $ python text_processor.py transform sample.txt --mode title |
| 94 | Original: "hello world from the text processor" |
| 95 | Transformed: "Hello World From The Text Processor" |
| 96 | |
| 97 | |
| 98 | ## Installation |
| 99 | |
| 100 | This skill requires only Python 3.7 or later with the standard library. No external dependencies are required. |
| 101 | |
| 102 | Clone or download the skill directory |
| 103 | Navigate to the scripts directory |
| 104 | Run the text processor directly with Python |
| 105 | |
| 106 | |
| 107 | cd scripts/ |
| 108 | python text_processor.py --help |
| 109 | |
| 110 | |
| 111 | ## Configuration |
| 112 | |
| 113 | The text processor supports various configuration options through command-line arguments: |
| 114 | |
| 115 | `--format`: Output format (json, text) |
| 116 | `--verbose`: Enable verbose output and progress reporting |
| 117 | `--output`: Specify output file or directory |
| 118 | `--encoding`: Specify text file encoding (default: utf-8) |
| 119 | |
| 120 | ## Architecture |
| 121 | |
| 122 | The skill follows a simple modular architecture: |
| 123 | |
| 124 | **TextProcessor Class**: Core processing logic and statistics calculation |
| 125 | **OutputFormatter Class**: Handles dual output format generation |
| 126 | **FileManager Class**: Manages file I/O operations and batch processing |
| 127 | **CLI Interface**: Command-line argument parsing and user interaction |
| 128 | |
| 129 | ## Error Handling |
| 130 | |
| 131 | The skill includes comprehensive error handling for: |
| 132 | File not found or permission errors |
| 133 | Invalid encoding or corrupted text files |
| 134 | Memory limitations for very large files |
| 135 | Output directory creation and write permissions |
| 136 | Invalid command-line arguments and parameters |
| 137 | |
| 138 | ## Performance Considerations |
| 139 | |
| 140 | Efficient memory usage for large text files through streaming |
| 141 | Optimized word counting using dictionary lookups |
| 142 | Batch processing with progress reporting for large datasets |
| 143 | Configurable encoding detection for international text |
| 144 | |
| 145 | ## Contributing |
| 146 | |
| 147 | This skill serves as a reference implementation and contributions are welcome to demonstrate best practices: |
| 148 | |
| 149 | Follow PEP 8 coding standards |
| 150 | Include comprehensive docstrings |
| 151 | Add test cases with sample data |
| 152 | Update documentation for any new features |
| 153 | Ensure backward compatibility |
| 154 | |
| 155 | ## Limitations |
| 156 | |
| 157 | As a BASIC tier skill, some advanced features are intentionally omitted: |
| 158 | Complex text analysis (sentiment, language detection) |
| 159 | Advanced file format support (PDF, Word documents) |
| 160 | Database integration or external API calls |
| 161 | Parallel processing for very large datasets |
| 162 | |
| 163 | This skill demonstrates the essential structure and quality standards required for BASIC tier skills in the claude-skills ecosystem while remaining simple and focused on core functionality. |
Discussion
Browse more free Claude skills.