What this skill does
Regular expressions are write-once, read-never for most people — they work, but six months later nobody (including the original author) can explain what ^(?:[a-z0-9]+(?:[.-][a-z0-9]+)*)@ actually matches. This skill works in both directions: describe a pattern in plain language and get a working, tested regex back, or paste an existing regex and get a plain-English breakdown of exactly what it matches.
How it works
- Pattern generation — given a plain-language description ("match a US phone number with optional area code parentheses"), writes a regex, then walks through 3-5 example strings showing which match and which don't, including deliberate edge cases.
- Pattern explanation — given an existing regex, breaks it into its component groups and explains each in plain language, then gives a one-sentence summary of the overall pattern's purpose.
- Language-specific output — flags any syntax that behaves differently across regex flavors (PCRE vs. JavaScript vs. POSIX) when it's relevant to the target language you specify.
Requirements
- Works on Claude AI (any surface) — a pure reasoning skill with no external tool dependency, though pairing it with code execution (Claude Code) lets it actually run the generated regex against your test strings to confirm behavior rather than just reasoning about it.
Setup
- Unzip the package into your Skills directory, keeping the folder structure intact.
- Either describe the pattern you need or paste an existing regex to explain — see
SKILL.mdfor the exact invocation pattern and how to specify a target language.
What's included
SKILL.md— the skill definition and generation/explanation logicexamples/sample-run.md— worked examples in both directions (generate and explain)