regex-builder
Build a regular expression from a plain-English description, or explain an existing one. Use when asked to write a regex, match/validate/extract a pattern, or understand what a regex does. Produces the regex, a token-by-token breakdown, passing and failing test cases, and notes on flavor/edge cases.
npx skills add mohitagw15856/pm-claude-skills --skill regex-builder --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Regex Builder & Explainer Skill Produce correct, readable regular expressions — and explain them so the user actually understands what they're shipping. ## Working from a brief Infer the regex flavor (JavaScript/PCRE/Python/Go) from context; if unstated, default to one and say so *(assumed — confirm)*. Always deliver a working pattern and tests even from a loose description. Never leave placeholders. ## Required Inputs - **What should match and what should NOT** — 3+ positive examples and, critically, 2+ near-miss negatives (the strings that *look* matchable but must be rejected). The negatives are where every regex bug lives. - **The engine/flavor** (JavaScript, PCRE, Python `re`, RE2, grep -E…) — anchors, lookbehind, and Unicode behaviour differ enough to break portability silently. - **Where it runs** — validation, extraction, or replacement changes how greedy the pattern should be. ## Two modes - **Build:** the user describes what to match → produce the regex. - **Explain:** the user pastes a regex → break it down. Detect which from the input. ## Output Structure ### Pattern The regex in a code block, plus the **flavor** and any **flags** (e.g. `i`, `g`, `m`) and why. ### Bre
- Working from a brief
- Required Inputs
- Two modes
- Output Structure
- Pattern
- Breakdown
- Test cases
- Notes
- Quality Checks
- Anti-Patterns
What does the regex-builder skill do?
Build a regular expression from a plain-English description, or explain an existing one. Use when asked to write a regex, match/validate/extract a pattern, or understand what a regex does. Produces the regex, a token-by-token breakdown, passing and failing test cases, and notes on flavor/edge cases.
How do I install it?
Run `npx skills add mohitagw15856/pm-claude-skills --skill regex-builder --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From mohitagw15856/pm-claude-skills, a repository with 1,255 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
