Sample Text Processor skill for Claude

Reference BASIC-tier skill used as a fixture by skill-tester. Counts words and characters and applies basic text transformations.

When Claude uses it

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 SKILL.md

The full skill file from alirezarezvani/claude-skills (MIT).

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.

  1. Clone or download the skill directory
  2. Navigate to the scripts directory
  3. 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:

  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.

How to install Sample Text Processor

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit alirezarezvani/claude-skills/engineering/skills/skill-tester/assets/sample-skill#main ~/.claude/skills/sample-skill

Codex

npx degit alirezarezvani/claude-skills/engineering/skills/skill-tester/assets/sample-skill#main ~/.codex/skills/sample-skill

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Sample Text Processor skill do?

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.

+How do I install Sample Text Processor in Claude Code?

Copy the skill folder into ~/.claude/skills/sample-skill, for example with "npx degit alirezarezvani/claude-skills/engineering/skills/skill-tester/assets/sample-skill#main ~/.claude/skills/sample-skill". Claude Code loads it automatically and uses it when a task matches.

+Does Sample Text Processor work with ChatGPT or Codex?

Yes. Sample Text Processor uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/sample-skill. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Sample Text Processor free?

Sample Text Processor is published on GitHub by alirezarezvani under the MIT license, which allows free use.

Related testing & code review skills

  1. Agent Browser

    Official

    Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms,…

    vercel-labs/agent-browser★ 53k
  2. Playwright

    Official

    Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction,…

    openai/skills★ 29k
  3. Playwright Skill

    Complete browser automation with Playwright. Auto-detects dev servers, writes reusable test scripts, and supports screenshots, responsive…

    lackeyjb/playwright-skill★ 3.3k
  4. Self Eval

    Grade finished work honestly on two axes with a devil's-advocate pass against inflation.

    alirezarezvani/claude-skills★ 30k
  5. Senior Data Scientist

    Design experiments and analyze tabular data: A/B tests, causal inference, feature engineering, model evaluation.

    alirezarezvani/claude-skills★ 30k
  6. Senior Qa

    Write and improve tests for React or Next.js apps: Jest, React Testing Library, MSW mocks, Playwright E2E, coverage gaps.

    alirezarezvani/claude-skills★ 30k
  7. Skill Tester

    Use when authoring or auditing a skill in this ecosystem, before release.

    alirezarezvani/claude-skills★ 30k
  8. Spec Driven Workflow

    Use when a feature should be specified before coding (acceptance criteria, spec-first, tests from specs).

    alirezarezvani/claude-skills★ 30k
  9. Stress Test

    Stress-test a plan built on untested assumptions. Use whenever the user bets on a hockey-stick model or long pilot.

    alirezarezvani/claude-skills★ 30k

See all testing & code review skills →

More skills from alirezarezvani

  1. Scenario War Room

    Use for compound what-if questions ('what if X and Y both happen?') with major downside across functions.

    alirezarezvani/claude-skills★ 30k
  2. Schema Markup

    Use for any JSON-LD, schema.org, rich-result or structured-data request, before writing markup.

    alirezarezvani/claude-skills★ 30k
  3. Scrum Master

    Use for sprint and team analytics: velocity forecasts, sprint health, retrospectives, burndown or blockers.

    alirezarezvani/claude-skills★ 30k

All skills by alirezarezvani →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.