К основному содержанию
скилл

sample-text-processor — скилл для Claude Code: как установить

Эталонный скилл уровня BASIC для тестов и валидации. Подсчитывает частоту слов и меняет регистр текста средствами стандартной библиотеки Python.

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install engineering-advanced-skills@claude-code-skills
Открыть на GitHub

Что делает sample-text-processor

sample-text-processor служит тестовым образцом для валидаторов skill_validator.py и script_tester.py. Разработка относится к уровню BASIC. Она демонстрирует корректную разметку YAML без лишних полей. Консольный скрипт text_processor.py подсчитывает частоту слов и меняет регистр текста.

Внутри работают модули TextProcessor и FileManager. Утилита обрабатывает отдельные документы через команды analyze и transform, а для папок предусмотрен режим batch. Результаты выводятся в виде консольного текста либо структуры JSON. По умолчанию используется кодировка utf-8.

Для работы нужен Python 3.7 или свежее со стандартной библиотекой. В коде намеренно нет распознавания языка или поддержки форматов вроде PDF и Word. Попытка скормить утилите бинарный файл вызовет сбой декодирования.

Какие задачи решает

  • проверить работу skill_validator.py на эталонной структуре манифеста
  • подсчитать число строк и частоту слов в текстовом документе
  • преобразовать регистр текста в файлах пакетом
  • получить текстовую статистику в формате JSON для пайплайнов

Примеры запросов агенту

  • Запусти анализ файла notes.txt через text_processor.py и покажи частоту слов
  • Преобразуй заголовки в файле chapter.txt в title case с помощью скрипта text_processor.py
  • Обработай папку docs/ пакетом через text_processor.py и сохрани статистику в batch_results.json

Как установить sample-text-processor

1Через маркетплейс плагинов

/plugin marketplace add alirezarezvani/claude-skills
/plugin install engineering-advanced-skills@claude-code-skills

Команда ставит плагин engineering-advanced-skills целиком, со всеми его скиллами

2Через Skills CLI (Vercel)

npx skills add alirezarezvani/claude-skills --skill sample-skill -a claude-code

3Вручную: положить файлы

~/.claude/skills/sample-skill/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/sample-skill/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о sample-text-processor

Как установить sample-text-processor в Claude Code?

Подключите каталог командой /plugin marketplace add alirezarezvani/claude-skills, а затем установите пакет через /plugin install engineering-advanced-skills@claude-code-skills.

Что делает sample-text-processor?

Скилл служит фикстурой для тестирования валидаторов и подсчитывает базовые показатели текста: строки, знаки и частоту слов. Также он умеет менять регистр текста и экспортировать результаты в JSON.

Какие зависимости нужны для запуска text_processor.py?

Требуется интерпретатор Python 3.7 или новее. Скрипт использует только стандартную библиотеку Python, поэтому сторонние пакеты не нужны.

Исходный текст

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

Похожие скиллы

Все скиллы по теме «Тесты и QA» →
improve-codebase-architecture Matt Pocock Скилл ищет архитектурные узкие места в кодовой базе и показывает варианты углубления модулей в HTML-отчёте. Подойдёт для ревью перед рефакторингом. 1 163 035установок design-taste-frontend Leonxlnx Скилл задаёт арт-дирекцию для публичных страниц и рабочих экранов, а затем проверяет результат в браузере по скриншотам. Нужен, когда интерфейс выглядит шаблонным или недоработанным. CX Codex +1 678 700установок tdd Matt Pocock Скилл управляет циклом красный-зелёный в TDD: проверяет, что тесты пишутся до кода, держит их на уровне публичных интерфейсов и не завязывает на внутреннюю структуру. 1 141 062установок skill-creator официальный anthropics Помогает создать новый скилл, доработать существующий и проверить результат через тестовые промпты и оценки. 414 180установок agent-browser vercel-labs Скилл управляет браузером через CLI: открывает страницы, заполняет формы, нажимает кнопки и проверяет веб-приложения. Подходит для задач, где агенту нужно действовать в интерфейсе. CX Codex +1 1 200 000установок prototype Matt Pocock Создаёт временный прототип, чтобы проверить логику, модель состояния или вид интерфейса до работы над основным кодом. 986 201установок

Из того же набора482

Весь набор →
agent-regression-evals Скилл проверяет изменения в промптах, моделях и инструментах агента через статистические тесты. Он помогает отличить реальное ухудшение метрик от случайного шума в CI. 1установок grade-iterate Третий этап сборки Claude Managed Agent: задаёт рубрику, читает вердикты грейдера и гоняет итерации до прохождения. Пригодится, когда агент уже запущен, но выдаёт не то. 1установок session-handoff Сжимает текущий диалог в документ передачи контекста следующему агенту. Удаляет секреты и подтягивает статус на старте новой сессии. ★ 28 786звёзд репо ai-decision-authority Раскладывает решения по трём зонам автономии ИИ и говорит, где нужен человек, а где агент действует сам. ★ 28 786звёзд репо ar-run Скилл запускает ровно одну итерацию автоисследования: читает историю результатов, вносит правку в целевой файл и оценивает метрики. ★ 28 786звёзд репо hub-run Запускает полный цикл работы AgentHub одной командой: от фиксации базовых метрик и параллельного запуска агентов до оценки и слияния кода. ★ 28 786звёзд репо month-end-close Плагин автоматизирует график финансового закрытия, сверку счетов и анализ отклонений. Он работает локально через Python без подключения к ERP-системам. ★ 28 786звёзд репо coding-agent-rollout Плагин проверяет настройки, MCP-серверы, плагины и слои CLAUDE.md, а также отслеживает этап внедрения Claude Code в команде. Пригодится, когда общие правила нужно сверять с локальными. ★ 28 786звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой