Syntic
← All skills
EngineeringFreeCommunityv1.0.0

Sample Skill

Use as a reference implementation for basic text processing: word counting, character analysis, transformations, batch processing with dual JSON and human-readable output formats.

About this skill

Use as a reference implementation for basic text processing: word counting, character analysis, transformations, batch processing with dual JSON and human-readable output formats.

SKILL.md

sample-skill.SKILL.md

Place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review the contents and run it in a controlled environment first.

SKILL.md
---
name: Sample Skill
description: Use as a reference implementation for basic text processing: word counting, character analysis, transformations, batch processing with dual JSON and human-readable output formats.
category: Engineering
version: 1.0.0
tools: []
---

# Sample Text Processor

Reference implementation for text processing with dual output formats (JSON and human-readable).

## Features

**Core Functionality**
- Word count analysis (total, unique, frequency)
- Character statistics (character count, line count, special characters)
- Text transformations (uppercase, lowercase, title case)
- File processing (single files or batch directories)
- Dual output formats (JSON and human-readable)

**Technical Features**
- Command-line interface with argument parsing
- Error handling for file and processing issues
- Progress reporting for batch operations
- Configurable output formatting and verbosity
- Cross-platform compatibility (standard library only)

## Usage

Text analysis:
- Analyze document with statistics output
- Save results to JSON or text

Text transformation:
- Transform text to uppercase, lowercase, or title case
- Save to output file

Batch processing:
- Process directories of text files
- Generate results in JSON or human-readable format

## Output Examples

Text analysis produces:
- File name and path
- Total word count, unique word count
- Character count, line count
- Most frequent word with occurrence count

JSON output structure:
```json
{
  "file": "filename",
  "statistics": {
    "total_words": 150,
    "unique_words": 85,
    "total_characters": 750,
    "lines": 12,
    "most_frequent": {"word": "the", "count": 8}
  }
}
```

## Architecture

Modular design with components:
- **TextProcessor Class**: Core processing and statistics calculation
- **OutputFormatter Class**: Dual format generation (JSON and text)
- **FileManager Class**: File I/O and batch processing
- **CLI Interface**: Argument parsing and user interaction

## Configuration Options

- `--format`: Output format (json, text)
- `--verbose`: Enable verbose output and progress
- `--output`: Specify output file or directory
- `--encoding`: Text file encoding (default: utf-8)

## Error Handling

Comprehensive error handling for:
- File not found or permission errors
- Invalid encoding or corrupted text
- Memory limitations for large files
- Output write permissions
- Invalid arguments

## Performance Considerations

- Efficient memory usage through streaming
- Optimized word counting with dictionary lookups
- Batch processing with progress reporting
- Configurable encoding detection

## Best Practices

1. Follow PEP 8 coding standards
2. Include comprehensive docstrings
3. Add test cases with sample data
4. Update documentation for new features
5. Ensure backward compatibility

## Tier Level

This is a BASIC tier skill demonstrating essential structure and quality standards. Advanced features (sentiment analysis, complex file formats, database integration, parallel processing) are intentionally omitted to keep focus on core functionality.

Install

Syntic App

  1. 1Create a dedicated folder for this skill in your local skills library.
  2. 2Place SKILL.md into that folder.
  3. 3Restart Syntic and invoke this skill on matching tasks.

Syntic Code (CLI)

  1. 1Save SKILL.md in your local Syntic Code skills directory.
  2. 2Keep related files in the same skill folder.
  3. 3Run in a safe environment and validate outputs.