Agent skill
regex-builder
Build, test, and explain regular expressions against sample text or files using CLI tools (rg, python) and specific regex flavors. Use when asked to craft, debug, or validate regexes or search patterns.
Install this agent skill to your Project
npx add-skill https://github.com/jMerta/codex-skills/tree/main/regex-builder
SKILL.md
Regex builder
Goal
Produce a correct, testable regex with rationale and runnable verification.
Inputs to confirm (ask if missing)
- Target regex flavor/engine (PCRE, Python, JavaScript, .NET, RE2, etc.).
- Example matches and non-matches (at least 3 each when possible).
- Scope: single-line vs multi-line; file types/paths.
- Output needs: capture groups, named groups, replacement template.
Workflow
- Gather samples
- Ask for sample text or identify files.
- If files exist, locate with
rg --filesand preview withrg -n.
- Choose tool
- Prefer
rgfor quick match checks; userg -Pfor PCRE features. - Use Python for detailed group inspection when needed.
- Prefer
- Build incrementally
- Start with a minimal literal anchor; expand piece by piece.
- Add anchors/boundaries; handle whitespace and separators explicitly.
- Validate
- Show a command to test against samples.
- Confirm no false positives by testing non-matches.
- Deliver
- Provide final regex, flags, and explanation.
- Include a test command and expected match summary.
- Note any tradeoffs/backtracking risks.
CLI snippets (use as needed)
- Ripgrep check:
rg -n "<regex>" path\\to\\filerg -n -P "<regex>" path\\to\\file
- Python quick test (adjust quoting for the shell):
python -c "import re,sys;pat=re.compile(r'<regex>');data=sys.stdin.read();print([m.group(0) for m in pat.finditer(data)])" < path\\to\\file
Deliverables
- Regex + flags and any capture group map.
- Test command(s) and summary of matches/non-matches.
- Short explanation of the approach and known limitations.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
vps-checkup
SSH into an Ubuntu VPS (Docker) for a read-only health/security/update report (UFW + fail2ban) and propose fixes; apply updates/restarts only with explicit confirmation. Use when the user wants a read-only VPS health/security check.
ci-fix
Fix GitHub Actions CI failures using GitHub CLI (gh): inspect runs/logs, identify root cause, patch workflows/code, rerun jobs, and summarize verification. Use when GitHub Actions CI is failing or needs diagnosis.
dependency-upgrader
Upgrade dependencies for Java/Kotlin (Gradle/Maven) and TypeScript/Node projects with minimal risk: plan the bump, apply changes incrementally, run tests/builds, and document breaking changes. Use when the user asks to bump deps, update frameworks, or address CVEs.
plan-work
Plan work before coding: do repo research, analyze options/risks, and ask clarifying questions before proposing an implementation plan. Use when the user asks for a plan, design/approach, scope breakdown, or implementation steps.
coding-guidelines-gen
Generate nested AGENTS.md coding guidelines per module (monorepo-aware), detect languages/tooling, ask architecture preferences, and set up missing formatters/linters (Spotless for JVM). Use when the user wants module-scoped AGENTS.md coding guidelines or to set up missing formatters/linters.
ui-ux-pro-max
Use when designing, building, or refining frontend UI/UX: layouts, components, visual systems, typography, color, and UX patterns for websites, landing pages, dashboards, and product interfaces. Provides searchable styles, palettes, font pairings, charts, and stack best practices (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind).
Didn't find tool you were looking for?