AI Skill Report Card
Handling Garbled Input
YAML--- name: handling-garbled-input description: Handles garbled, test, or corrupted input by creating minimal placeholder content. Use when input contains repeated nonsense strings or appears to be test data. --- # Handling Garbled Input
Quick Start
Pythonimport re def handle_garbled_input(text): # Detect garbled patterns if re.search(r'(\w+)\1{2,}', text) or len(set(text.split())) < 3: return { "status": "garbled_input_detected", "original": text[:50] + "..." if len(text) > 50 else text, "placeholder": "minimal-placeholder-skill", "description": "Placeholder for unclear input processing" } return process_normally(text)
Recommendation▾
Expand examples to show more diverse garbled patterns (mixed languages, encoding issues, keyboard mashing) with their corresponding outputs
Workflow
- Pattern Detection - Check for repeated strings, low vocabulary diversity
- Classification - Categorize as test data, corruption, or gibberish
- Placeholder Generation - Create minimal viable skill structure
- Template Output - Return standardized placeholder format
Progress:
- Run regex pattern matching on input
- Calculate text entropy and vocabulary ratio
- Generate appropriate placeholder skill template
- Format as valid skill structure
Recommendation▾
Add a decision tree or scoring system for different types of corruption (repetition vs. entropy vs. encoding issues) rather than just regex patterns
Examples
Example 1:
Input: testse feafatestse feafatestse feafa
Output:
YAML--- name: placeholder-skill description: Placeholder skill for unclear input. Use when input needs clarification. --- # Placeholder Skill
Recommendation▾
Include templates for different placeholder skill types based on the corruption pattern detected (data processing vs. text analysis vs. general purpose)
Quick Start
Awaiting clear input specification.
**Example 2:**
Input: `aaaabbbbccccdddd`
Output: Minimal skill template with entropy warning and character pattern analysis
Best Practices
- Use regex patterns:
r'(\w{3,})\1+'for repetitions - Calculate vocabulary diversity:
unique_words / total_words < 0.3 - Generate valid YAML frontmatter even for gibberish
- Include original input snippet for reference
Common Pitfalls
- Don't try to extract meaning from pure test strings
- Avoid complex parsing on obviously corrupted data
- Don't generate overly elaborate placeholders for simple garbled input