regex-one-liner-refactoring
Installation
SKILL.md
Regex One-Liner Refactoring Protocol (String Parsing Compression)
Overview
When generating string parsing, token extraction, or case transformation routines (e.g., converting camelCase to kebab-case or extracting query parameters from a URL), default LLM outputs frequently write verbose procedural Character-by-Character Loops: tracking character indices, managing state flags, and executing multi-step slice operations across 20 to 30 lines of code.
Procedural string parsing algorithms consume 200+ output tokens, are prone to index-out-of-bounds edge cases, and create cognitive noise in code reviews.
The Regex One-Liner Refactoring Protocol condenses multi-step string manipulations into clean, compiled Regular Expressions, reducing code size and token footprint by 75%.