New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Debug regex patterns with visual breakdowns

Regex Visual Debugger

by OneWave-AI · MIT license · ★ 306 on GitHub

Regex Visual Debugger cover

Debug regex patterns with visual breakdowns, plain English explanations, test case generation, and flavor conversion. Use when user needs help with regular expressions or pattern matching.

---
name: regex-debugger
description: Debug regex patterns with visual breakdowns, plain English explanations, test case generation, and flavor conversion. Use when user needs help with regular expressions or pattern matching.
---

# Regex Visual Debugger

Interactive regex testing, explanation, and debugging tool.

## When to Use This Skill

Activate when the user:
- Provides a regex pattern to debug
- Asks "why isn't my regex working?"
- Needs a regex pattern explained
- Wants to test regex against strings
- Asks to convert regex between flavors (Python, JS, etc.)
- Needs regex pattern suggestions

Overview

Activate when the user: - Provides a regex pattern to debug - Asks "why isn't my regex working?" - Needs a regex pattern explained - Wants to test regex against strings - Asks to convert regex between flavors (Python, JS, etc.) - Needs regex pattern suggestions - Mentions regular expressions or pattern matching

Manual install (npx, ZIP)
Claude Codenpx skills add OneWave-AI/claude-skills --skill regex-debugger -g -a claude-code
Claude Code (degit)npx degit OneWave-AI/claude-skills/regex-debugger#main ~/.claude/skills/regex-debugger
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md5.1 KB
Read SKILL.md here
OneWave-AI/main1 file shown
SKILL.md
Show the full text194 lines

Regex Visual Debugger

Interactive regex testing, explanation, and debugging tool.

When to Use This Skill

Activate when the user:

  • Provides a regex pattern to debug
  • Asks "why isn't my regex working?"
  • Needs a regex pattern explained
  • Wants to test regex against strings
  • Asks to convert regex between flavors (Python, JS, etc.)
  • Needs regex pattern suggestions
  • Mentions regular expressions or pattern matching

Instructions

  1. Analyze the Regex Pattern

    • Parse the regex structure
    • Identify each component (groups, quantifiers, character classes)
    • Check for common syntax errors
    • Validate regex syntax for specified flavor
  2. Provide Plain English Explanation

    • Break down pattern piece by piece
    • Explain what each part matches
    • Describe overall pattern behavior
    • Clarify quantifier greediness
    • Explain capture groups vs. non-capturing groups
  3. Visual Breakdown

    • Show pattern structure hierarchically
    • Highlight groups and alternations
    • Indicate character classes and ranges
    • Mark anchors and boundaries
  4. Test Against Examples

    • Test provided test strings
    • Show what matches and what doesn't
    • Highlight matched portions
    • Explain why matches succeed or fail
    • Show capture group contents
  5. Identify Common Issues

    • Unescaped special characters
    • Incorrect quantifiers
    • Greedy vs. non-greedy issues
    • Anchor misplacement
    • Unclosed groups
    • Flavor-specific incompatibilities
  6. Generate Test Cases

    • Create strings that should match
    • Create strings that should NOT match
    • Include edge cases
    • Test boundary conditions
  7. Suggest Improvements

    • More efficient patterns
    • More readable alternatives
    • Performance optimizations
    • Edge case handling
  8. Convert Between Flavors

    • Python (re module)
    • JavaScript
    • Perl
    • Java
    • .NET
    • PHP (PCRE)

Output Format

# Regex Analysis: `pattern`

## Plain English Explanation
This pattern matches [description]:
- `^` - Start of string
- `[A-Z]` - One uppercase letter
- `\d{3}` - Exactly 3 digits
- `$` - End of string

**Overall**: Matches strings like "A123", "Z999"

## Visual Structure

^ - Start anchor [A-Z] - Character class (uppercase letters) \d{3} - Digit, exactly 3 times $ - End anchor


## Test Results

### Matches
- `A123` -> Full match
- `Z999` -> Full match

### No Match
- `a123` -> Lowercase 'a' doesn't match [A-Z]
- `A12` -> Only 2 digits (needs 3)
- `A1234` -> Too many digits

## Capture Groups
1. Group 1: `[captured text]`
2. Group 2: `[captured text]`

## Issues Found
**Issue 1**: Pattern is too restrictive
- **Problem**: Doesn't handle lowercase letters
- **Fix**: Use `[A-Za-z]` instead of `[A-Z]`

## Suggested Improvements
```regex
# More flexible version
^[A-Za-z]\d{3,5}$

Changes:

  • Added lowercase letters
  • Changed {3} to {3,5} for 3-5 digits

Generated Test Cases

Should Match
A123
Z999
B456
Should NOT Match
1ABC    (starts with digit)
ABCD    (no digits)
A12     (too few digits)

Flavor-Specific Notes

JavaScript: [any JS-specific notes] Python: [any Python-specific notes]

Conversion to Other Flavors

JavaScript
const pattern = /^[A-Z]\d{3}$/;
const match = str.match(pattern);
Python
import re
pattern = r'^[A-Z]\d{3}$'
match = re.match(pattern, string)

Performance Notes

  • Current complexity: O(n)
  • No backtracking issues
  • Consider using non-capturing groups: (?:...) for better performance

## Examples

**User**: "Why doesn't this regex match emails: `\w+@\w+\.\w+`?"
**Response**: Analyze pattern → Explain it matches simple emails only → Show test cases (fails on "[email protected]") → Identify issues (doesn't handle special chars, multiple TLDs) → Provide improved pattern → Generate comprehensive test cases

**User**: "Explain this regex: `^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`"
**Response**: Break down pattern (IP address matcher) → Explain each component → Show it matches valid IPs (0-255 per octet) → Provide test cases → Visualize structure

**User**: "Convert this Python regex to JavaScript: `(?P<name>\w+)`"
**Response**: Identify named capture group (Python feature) → Convert to JS equivalent → Explain differences → Show both versions with usage examples

## Best Practices

- Always test regex with edge cases
- Explain in plain English first
- Show concrete examples (not just theory)
- Highlight common pitfalls for each pattern
- Provide both positive and negative test cases
- Consider performance implications
- Note flavor-specific features
- Suggest simpler alternatives when possible
- Use non-capturing groups for performance
- Escape special characters properly
- Be explicit about case sensitivity
- Test with Unicode characters if relevant
1---
2name: regex-debugger
3description: Debug regex patterns with visual breakdowns, plain English explanations, test case generation, and flavor conversion. Use when user needs help with regular expressions or pattern matching.
4---
5 
6# Regex Visual Debugger
7 
8Interactive regex testing, explanation, and debugging tool.
9 
10## When to Use This Skill
11 
12Activate when the user:
13- Provides a regex pattern to debug
14- Asks "why isn't my regex working?"
15- Needs a regex pattern explained
16- Wants to test regex against strings
17- Asks to convert regex between flavors (Python, JS, etc.)
18- Needs regex pattern suggestions
19- Mentions regular expressions or pattern matching
20 
21## Instructions
22 
231. **Analyze the Regex Pattern**
24 - Parse the regex structure
25 - Identify each component (groups, quantifiers, character classes)
26 - Check for common syntax errors
27 - Validate regex syntax for specified flavor
28 
292. **Provide Plain English Explanation**
30 - Break down pattern piece by piece
31 - Explain what each part matches
32 - Describe overall pattern behavior
33 - Clarify quantifier greediness
34 - Explain capture groups vs. non-capturing groups
35 
363. **Visual Breakdown**
37 - Show pattern structure hierarchically
38 - Highlight groups and alternations
39 - Indicate character classes and ranges
40 - Mark anchors and boundaries
41 
424. **Test Against Examples**
43 - Test provided test strings
44 - Show what matches and what doesn't
45 - Highlight matched portions
46 - Explain why matches succeed or fail
47 - Show capture group contents
48 
495. **Identify Common Issues**
50 - Unescaped special characters
51 - Incorrect quantifiers
52 - Greedy vs. non-greedy issues
53 - Anchor misplacement
54 - Unclosed groups
55 - Flavor-specific incompatibilities
56 
576. **Generate Test Cases**
58 - Create strings that should match
59 - Create strings that should NOT match
60 - Include edge cases
61 - Test boundary conditions
62 
637. **Suggest Improvements**
64 - More efficient patterns
65 - More readable alternatives
66 - Performance optimizations
67 - Edge case handling
68 
698. **Convert Between Flavors**
70 - Python (re module)
71 - JavaScript
72 - Perl
73 - Java
74 - .NET
75 - PHP (PCRE)
76 
77## Output Format
78 
79```markdown
80# Regex Analysis: `pattern`
81 
82## Plain English Explanation
83This pattern matches [description]:
84- `^` - Start of string
85- `[A-Z]` - One uppercase letter
86- `\d{3}` - Exactly 3 digits
87- `$` - End of string
88 
89**Overall**: Matches strings like "A123", "Z999"
90 
91## Visual Structure
92```
93^ - Start anchor
94[A-Z] - Character class (uppercase letters)
95\d{3} - Digit, exactly 3 times
96$ - End anchor
97```
98 
99## Test Results
100 
101### Matches
102- `A123` -> Full match
103- `Z999` -> Full match
104 
105### No Match
106- `a123` -> Lowercase 'a' doesn't match [A-Z]
107- `A12` -> Only 2 digits (needs 3)
108- `A1234` -> Too many digits
109 
110## Capture Groups
1111. Group 1: `[captured text]`
1122. Group 2: `[captured text]`
113 
114## Issues Found
115**Issue 1**: Pattern is too restrictive
116- **Problem**: Doesn't handle lowercase letters
117- **Fix**: Use `[A-Za-z]` instead of `[A-Z]`
118 
119## Suggested Improvements
120```regex
121# More flexible version
122^[A-Za-z]\d{3,5}$
123```
124**Changes**:
125- Added lowercase letters
126- Changed `{3}` to `{3,5}` for 3-5 digits
127 
128## Generated Test Cases
129 
130### Should Match
131```
132A123
133Z999
134B456
135```
136 
137### Should NOT Match
138```
1391ABC (starts with digit)
140ABCD (no digits)
141A12 (too few digits)
142```
143 
144## Flavor-Specific Notes
145**JavaScript**: [any JS-specific notes]
146**Python**: [any Python-specific notes]
147 
148## Conversion to Other Flavors
149 
150### JavaScript
151```javascript
152const pattern = /^[A-Z]\d{3}$/;
153const match = str.match(pattern);
154```
155 
156### Python
157```python
158import re
159pattern = r'^[A-Z]\d{3}$'
160match = re.match(pattern, string)
161```
162 
163## Performance Notes
164- Current complexity: O(n)
165- No backtracking issues
166- Consider using non-capturing groups: `(?:...)` for better performance
167```
168 
169## Examples
170 
171**User**: "Why doesn't this regex match emails: `\w+@\w+\.\w+`?"
172**Response**: Analyze pattern → Explain it matches simple emails only → Show test cases (fails on "[email protected]") → Identify issues (doesn't handle special chars, multiple TLDs) → Provide improved pattern → Generate comprehensive test cases
173 
174**User**: "Explain this regex: `^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`"
175**Response**: Break down pattern (IP address matcher) → Explain each component → Show it matches valid IPs (0-255 per octet) → Provide test cases → Visualize structure
176 
177**User**: "Convert this Python regex to JavaScript: `(?P<name>\w+)`"
178**Response**: Identify named capture group (Python feature) → Convert to JS equivalent → Explain differences → Show both versions with usage examples
179 
180## Best Practices
181 
182- Always test regex with edge cases
183- Explain in plain English first
184- Show concrete examples (not just theory)
185- Highlight common pitfalls for each pattern
186- Provide both positive and negative test cases
187- Consider performance implications
188- Note flavor-specific features
189- Suggest simpler alternatives when possible
190- Use non-capturing groups for performance
191- Escape special characters properly
192- Be explicit about case sensitivity
193- Test with Unicode characters if relevant
194 
View all files on GitHub →

Details

License
MIT
Stars on the repo
★ 306
Checked
Source
OneWave-AI/claude-skills ↗
Creator
OneWave-AI · 16 listings
View creator

Similar skills

See all →
MCPExpert debugging specialist for errors, test failuresDebugger AgentCloudAI-X/claude-workflow-v2 · by CloudAI-XExpert debugging specialist for errors, test failures, crashes, segmentation faults, memory leaks, timeouts, race conditions, deadlocks, and unexpected behavior. Use PROACTIVELY when encountering any error, exception, or failing test. Performs systematic root cause analysis.★ 1.4k GitHub starsSkillEncountering any bug, test failure, or unexpected behaviorSystematic debuggingobra/superpowers · by obraUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes★ 290k GitHub starsSkillRequires running verification commands and confirming outputVerification before completionobra/superpowers · by obraUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always★ 290k GitHub starsSkillGuides systematic root-cause debuggingDebugging and error recoveryaddyosmani/agent-skills · by addyosmaniGuides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.★ 98.7k GitHub starsSkillMaster systematic debugging techniques, profiling toolsDebugging strategieswshobson/agents · by wshobsonMaster systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack. Use when investigating bugs, performance issues, or unexpected behavior.★ 39.9k GitHub starsSkillMaster error handling patterns across languages includingwshobson/agents · by wshobsonMaster error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.★ 39.9k GitHub stars

More from OneWave-AI

SkillFinding security vulnerabilities , correctness bugsCode review proOneWave-AI/claude-skills · by OneWave-AIPerforms a deep code review of files, modules, a diff, or a branch - finding security vulnerabilities (mapped to OWASP Top 10:2025), correctness bugs, performance problems, and maintainability issues - and returns severity-ranked findings with evidence and concrete fixes. Use when the user asks to review, audit, or sanity-check code, asks "is this safe", "what's wrong with this", "find bugs", or wants a security or performance pass before shipping. For posting line comments on a GitHub pull request, use git-pr-reviewer.★ 306 GitHub starsSkillMapping mismatched column names to one schemaCSV/Excel MergerOneWave-AI/claude-skills · by OneWave-AIMerges, appends, joins, and deduplicates multiple CSV, TSV, and Excel files (including multi-sheet workbooks) with pandas - mapping mismatched column names to one schema, normalizing keys, resolving conflicting values, tracking which file each row came from, and verifying the row math. Use when the user wants to combine spreadsheets or exports, stack monthly files, consolidate contact or lead lists, VLOOKUP-style join two sheets on an ID or email, or dedupe records across sources, even if they only say "put these together" or "clean up these lists into one".★ 306 GitHub starsSkillDesigns relational and document database schemasDatabase schema designerOneWave-AI/claude-skills · by OneWave-AIDesigns relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and reversible migration scripts - with PostgreSQL (including Supabase) as the default and MySQL, SQLite, and MongoDB supported. Use when the user wants to model data for a new app or feature, review or fix an existing schema, choose keys or indexes, plan multi-tenancy, normalize or denormalize, or write CREATE TABLE statements or migrations, even if they just describe their app and ask "how should I store this". For moving data between database providers, use database-migrator.★ 306 GitHub starsSkillBuild and run a labelled eval set for a System One model Evaluating a typed-decision configOneWave-AI/claude-skills · by OneWave-AIBuild and run a labelled eval set for a System One model (Jev, Von, or any typed-decision config), then sweep criteria wordings and thresholds against it. Use when a Jev/Von classification is wrong or unreliable, when choosing between the hosted API and a local open model, when tuning noul thresholds, or before shipping any typed-decision feature. Produces an accuracy-by-wording matrix and a calibrated threshold.★ 306 GitHub starsSkillExtract and analyze data from invoices, receiptsFinancial Document ParserOneWave-AI/claude-skills · by OneWave-AIExtract and analyze data from invoices, receipts, bank statements, and financial documents. Categorize expenses, track recurring charges, and generate expense reports. Use when user provides financial PDFs or images.★ 306 GitHub starsSkillWrites conversion-focused landing page copyLanding page copywriterOneWave-AI/claude-skills · by OneWave-AIWrites conversion-focused landing page copy - headlines, subheads, value propositions, feature and benefit blocks, social proof, FAQs, and CTA button text - using PAS, AIDA, or StoryBrand. Use when the user wants words for a landing page, sales page, product or pricing page, waitlist page, homepage hero, or ad-to-page flow, including rewriting weak copy, generating headline or CTA variants for A/B tests, or turning a product description into page sections. Use landing-page-optimizer instead for auditing an existing page's performance, and a frontend skill for building the page itself.★ 306 GitHub stars