regex-visual-debugger
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.
What this skill does
# 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
```markdown
# 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
```javascript
const pattern = /^[A-Z]\d{3}$/;
const match = str.match(pattern);
```
### Python
```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
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".