Regex Explainer and Tester skill for Claude and Codex
Regex Explainer and Tester as an AI skill. It asks for Regex, Regex flavour, What it should match and 3 more, then does the rest. Free to install in Claude or…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a regular expression is hard to read or behaves unexpectedly and needs to be explained token by token and checked against examples. Do not use for writing a parser or extracting data from a large text corpus. Related topics: coding, productivity.
What it will ask you for
- Regex (free text, e.g. "Paste the pattern")
- Regex flavour (choose one: JavaScript, Python, PCRE, Java, Go, .NET)
- What it should match (longer free text)
- Strings that should match (longer free text)
- Strings that should not match (longer free text)
- Flags used (free text, e.g. "i or g or m or none")
How it works
- Split the pattern into tokens and explain each in plain words, including greedy versus lazy behaviour and group capture.
- Restate the whole pattern in one sentence and compare it with the stated intent.
- Trace every supplied example, recording match or no match, the captured text and the reason.
- Add edge cases for empty input, whitespace, Unicode, newlines and long strings, and predict each result.
- Check for catastrophic backtracking and give a corrected pattern with before and after results if anything fails.
What you get
A token-by-token explanation, a one-sentence summary, a results table of examples and edge cases, and a corrected pattern with a change list when needed.
What it watches out for
- Forgetting that anchors and the multiline flag change what a match means, so a pattern passes by accident.
- Assuming the same syntax across flavours, when lookbehind and named groups differ between engines.
- Claiming a pattern is safe without checking nested quantifiers that can freeze a server on hostile input.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.