← ClaudeAtlas

regulex-pluslisted

Visualize a JavaScript regular expression as a railroad diagram (PNG/SVG) or a Mermaid flowchart by shelling out to the `regulex-plus` CLI. Use whenever the user asks to explain, debug, understand, optimize, or document a regex — especially complex patterns with quantifiers, lookarounds, alternations, or CJK/Chinese characters — and also proactively after you yourself generate or modify a non-trivial regex, so the user can verify it visually. Pick Mermaid for embedding in docs / PRs / chats that render Mermaid natively (GitHub, Notion, Obsidian, mermaid.live); pick PNG for inline image preview anywhere; pick SVG for editable vector documents.
PipeDream941/regulex-plus · ★ 3 · AI & Automation · score 74
Install: claude install-skill PipeDream941/regulex-plus
# regulex-plus Render any JavaScript regex as a railroad diagram saved to a local image file. Wraps the regulex-plus web visualizer in a headless-browser CLI, so it works in any Node environment without manual screenshots. ## When to use Invoke this skill when **any** of the following holds: - The user asks to **explain / understand / 解释 / 看懂** a regex. - The user is **debugging or optimizing** a regex and would benefit from a structural view. - The regex contains **CJK characters / 中文** — regulex-plus has native CJK width handling that generic visualizers lack. - The regex has **alternations, nested groups, lookarounds, backreferences, or non-trivial quantifiers** that are hard to read inline. - You (Claude) just **generated or rewrote a regex** in a code change — offer the user a visual to confirm intent. Skip it for one-token patterns (e.g. `\d+`, `^$`) — overhead isn't worth it. ## How to invoke The CLI is `regulex-plus` (installed when this skill's package is added). Use Bash: ```bash # Minimal — PNG to ./regulex.png npx regulex-plus '<pattern>' # Pick output path; format inferred from extension npx regulex-plus '<pattern>' --out ./diagrams/email.png npx regulex-plus '<pattern>' --out ./diagrams/email.svg npx regulex-plus '<pattern>' --out ./diagrams/email.mmd # Mermaid # Add flags, theme, language npx regulex-plus '<pattern>' --flags ig --theme dark --lang en --out out.png # Mermaid flowchart, top-down direction npx regulex-plus '<pattern>' --format merma