sample-text-processor — Claude Code skill: how to install
A reference BASIC-tier skill used as a test fixture. It calculates word statistics and transforms text case using standard Python libraries.
/plugin marketplace add alirezarezvani/claude-skills
/plugin install engineering-advanced-skills@claude-code-skillsWhat sample-text-processor does
sample-text-processor acts as a test fixture for skill_validator.py and script_tester.py. It is a minimal BASIC-tier layout. The frontmatter includes only the fields Claude Code reads. Its command-line script, text_processor.py, tracks word frequency and changes text casing.
The codebase contains dedicated classes for processing logic and output formatting. You run single-file inspections through analyze, or batch-process directories. The script outputs terminal text or raw JSON data. Text encoding defaults to utf-8.
Running this tool requires Python 3.7 or newer with no external packages. The author intentionally omitted complex natural language features and binary document readers. Feeding a PDF or Word document into the script triggers an encoding failure.
What it helps with
- validate skill verification tools against a reference manifest layout
- calculate word frequency and line totals for plain text documents
- batch transform text files into uppercase, lowercase, or title case
- generate text metrics directly in JSON format for automated workflows
Example prompts for the agent
- Run
text_processor.py analyze document.txtand report the most frequent words - Convert headings in
chapter.txtto title case usingtext_processor.py transform - Batch process the
docs/directory withtext_processor.pyand output results tobatch_results.json
How to install sample-text-processor
1Plugin marketplace
/plugin marketplace add alirezarezvani/claude-skills/plugin install engineering-advanced-skills@claude-code-skillsThis installs the whole engineering-advanced-skills plugin with all its skills
2Skills CLI (Vercel)
npx skills add alirezarezvani/claude-skills --skill sample-skill -a claude-code3Manually: put the files in place
~/.claude/skills/sample-skill/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/sample-skill/
Manually: put the files in place
.agents/skills/sample-skill/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/sample-skill/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install alirezarezvani/claude-skills sample-skill2Manually: put the files in place
.github/skills/sample-skill/SKILL.mdPlatform CLI
gemini skills install https://github.com/alirezarezvani/claude-skills --path engineering/skills/skill-tester/assets/sample-skillManually: put the files in place
.devin/skills/sample-skill/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about sample-text-processor
How do I install sample-text-processor in Claude Code?
Add the marketplace source with /plugin marketplace add alirezarezvani/claude-skills, then install it by running /plugin install engineering-advanced-skills@claude-code-skills.
What does sample-text-processor do?
The skill provides a baseline template for skill validation tools and calculates text metrics such as character count, line count, and word frequencies. It also converts text casing and generates structured JSON output.
What dependencies are needed to run text_processor.py?
It requires only Python 3.7 or newer. The script relies strictly on the Python standard library, so no third-party packages are needed.
Source text
SKILL.md · MIT
---
name: sample-text-processor
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."
---
# 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
```bash
python text_processor.py analyze document.txt
python text_processor.py analyze document.txt --output results.json
```
### Text Transformation
```bash
python text_processor.py transform document.txt --mode uppercase
python text_processor.py transform document.txt --mode title --output transformed.txt
```
### Batch Processing
```bash
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
```bash
$ 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
```bash
$ 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
```bash
$ 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.
1. Clone or download the skill directory
2. Navigate to the scripts directory
3. Run the text processor directly with Python
```bash
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:
1. Follow PEP 8 coding standards
2. Include comprehensive docstrings
3. Add test cases with sample data
4. Update documentation for any new features
5. 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.
© Alireza Rezvani · MIT · alirezarezvani/claude-skills