Text Processor Skill
This skill performs various text manipulation and analysis operations.
When to Use
Use this skill when:
- The user needs to change text case (uppercase, lowercase, capitalize)
- Text needs to be reversed
- Word count or text analysis is required
- The user mentions terms like "convert to uppercase", "make lowercase", "capitalize", "reverse text", "count words", "text transformation"
Instructions
Operation: Uppercase
- Take the input text
- Convert all characters to uppercase
- Return the transformed text
Operation: Lowercase
- Take the input text
- Convert all characters to lowercase
- Return the transformed text
Operation: Capitalize
- Take the input text
- Split the text into words (separated by spaces)
- For each word:
- Convert the first character to uppercase
- Convert remaining characters to lowercase
- Join the words back together with spaces
- Return the transformed text
Operation: Reverse
- Take the input text
- Split the text into individual characters
- Reverse the order of characters
- Join the characters back together
- Return the reversed text
Operation: Word Count
- Take the input text
- Trim leading and trailing whitespace
- Split the text by whitespace (spaces, tabs, newlines)
- Filter out empty strings
- Count the number of remaining words
- Return the count
Examples
Example 1: Uppercase Conversion
Input: "Convert 'hello world' to uppercase"
Steps:
- Operation: Uppercase
- Input text: "hello world"
- Transform: HELLO WORLD
Output: "HELLO WORLD"
Example 2: Capitalize
Input: "Capitalize 'the quick brown fox'"
Steps:
- Operation: Capitalize
- Input text: "the quick brown fox"
- Split into words: ["the", "quick", "brown", "fox"]
- Capitalize each: ["The", "Quick", "Brown", "Fox"]
- Join: "The Quick Brown Fox"
Output: "The Quick Brown Fox"
Example 3: Reverse Text
Input: "Reverse the text 'hello'"
Steps:
- Operation: Reverse
- Input text: "hello"
- Split: ['h', 'e', 'l', 'l', 'o']
- Reverse: ['o', 'l', 'l', 'e', 'h']
- Join: "olleh"
Output: "olleh"
Example 4: Word Count
Input: "How many words are in 'The quick brown fox jumps over the lazy dog'?"
Steps:
- Operation: Word count
- Input text: "The quick brown fox jumps over the lazy dog"
- Split by spaces: ["The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"]
- Count: 9 words
Output: "The text contains 9 words"
Example 5: Word Count with Extra Spaces
Input: "Count words in ' hello world '"
Steps:
- Operation: Word count
- Input text: " hello world "
- Trim and split: ["hello", "world"]
- Count: 2 words
Output: "The text contains 2 words"
Common Edge Cases
- Empty strings: Return appropriate message (e.g., "0 words" for word count)
- Multiple spaces: Treat consecutive spaces as a single separator for word counting
- Special characters: Preserve special characters in all operations except word counting
- Unicode characters: Handle international characters appropriately
- Newlines and tabs: Treat as whitespace for word counting
- Mixed case input: Process according to the operation requested
Tips
- Always preserve the original text structure (spaces, punctuation) unless the operation specifically modifies it
- For capitalize operation, consider whether acronyms or proper nouns need special handling
- When counting words, clarify what constitutes a "word" if the text contains numbers or special characters
- Show both the original and transformed text in your response for clarity
1---2name: text-processor3description: Performs text manipulation operations including case conversion (uppercase, lowercase, capitalize), text reversal, and word counting. Use when the user needs to transform, analyze, or manipulate text strings.4license: MIT5---67# Text Processor Skill89This skill performs various text manipulation and analysis operations.1011## When to Use1213Use this skill when:14- The user needs to change text case (uppercase, lowercase, capitalize)15- Text needs to be reversed16- Word count or text analysis is required17- The user mentions terms like "convert to uppercase", "make lowercase", "capitalize", "reverse text", "count words", "text transformation"1819## Instructions2021### Operation: Uppercase221. Take the input text232. Convert all characters to uppercase243. Return the transformed text2526### Operation: Lowercase271. Take the input text282. Convert all characters to lowercase293. Return the transformed text3031### Operation: Capitalize321. Take the input text332. Split the text into words (separated by spaces)343. For each word:35 - Convert the first character to uppercase36 - Convert remaining characters to lowercase374. Join the words back together with spaces385. Return the transformed text3940### Operation: Reverse411. Take the input text422. Split the text into individual characters433. Reverse the order of characters444. Join the characters back together455. Return the reversed text4647### Operation: Word Count481. Take the input text492. Trim leading and trailing whitespace503. Split the text by whitespace (spaces, tabs, newlines)514. Filter out empty strings525. Count the number of remaining words536. Return the count5455## Examples5657### Example 1: Uppercase Conversion58**Input:** "Convert 'hello world' to uppercase"59**Steps:**601. Operation: Uppercase612. Input text: "hello world"623. Transform: HELLO WORLD63**Output:** "HELLO WORLD"6465### Example 2: Capitalize66**Input:** "Capitalize 'the quick brown fox'"67**Steps:**681. Operation: Capitalize692. Input text: "the quick brown fox"703. Split into words: ["the", "quick", "brown", "fox"]714. Capitalize each: ["The", "Quick", "Brown", "Fox"]725. Join: "The Quick Brown Fox"73**Output:** "The Quick Brown Fox"7475### Example 3: Reverse Text76**Input:** "Reverse the text 'hello'"77**Steps:**781. Operation: Reverse792. Input text: "hello"803. Split: ['h', 'e', 'l', 'l', 'o']814. Reverse: ['o', 'l', 'l', 'e', 'h']825. Join: "olleh"83**Output:** "olleh"8485### Example 4: Word Count86**Input:** "How many words are in 'The quick brown fox jumps over the lazy dog'?"87**Steps:**881. Operation: Word count892. Input text: "The quick brown fox jumps over the lazy dog"903. Split by spaces: ["The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"]914. Count: 9 words92**Output:** "The text contains 9 words"9394### Example 5: Word Count with Extra Spaces95**Input:** "Count words in ' hello world '"96**Steps:**971. Operation: Word count982. Input text: " hello world "993. Trim and split: ["hello", "world"]1004. Count: 2 words101**Output:** "The text contains 2 words"102103## Common Edge Cases104105- **Empty strings**: Return appropriate message (e.g., "0 words" for word count)106- **Multiple spaces**: Treat consecutive spaces as a single separator for word counting107- **Special characters**: Preserve special characters in all operations except word counting108- **Unicode characters**: Handle international characters appropriately109- **Newlines and tabs**: Treat as whitespace for word counting110- **Mixed case input**: Process according to the operation requested111112## Tips113114- Always preserve the original text structure (spaces, punctuation) unless the operation specifically modifies it115- For capitalize operation, consider whether acronyms or proper nouns need special handling116- When counting words, clarify what constitutes a "word" if the text contains numbers or special characters117- Show both the original and transformed text in your response for clarity