Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问clear审计通过

regex-visual-debugger正则表达式可视化调试器

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

2,742

周安装

112

GitHub Stars

106

下载量

878
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:regex-visual-debugger(正则表达式可视化调试器)
来源仓库:https://github.com/onewave-ai/claude-skills
仓库路径:skills/regex-visual-debugger
安装命令:
npx skills add https://github.com/onewave-ai/claude-skills --skill regex-visual-debugger
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/onewave-ai/claude-skills --skill regex-visual-debugger

简介

regex-visual-debugger 用于可视化调试正则表达式,适合在 Codex、Claude、Cursor、Gemini CLI 中需要直观查看匹配路径时使用。

  • 它将抽象语法转化为图形化展示。
  • 可通过 npx skills add 命令从 GitHub 仓库安装并使用。
  • 有助于教学与非专业开发者理解复杂模式。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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

  1. 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

  1. Visual Breakdown

- Show pattern structure hierarchically - Highlight groups and alternations - Indicate character classes and ranges - Mark anchors and boundaries

  1. 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

  1. Identify Common Issues

- Unescaped special characters - Incorrect quantifiers - Greedy vs. non-greedy issues - Anchor misplacement - Unclosed groups - Flavor-specific incompatibilities

  1. Generate Test Cases

- Create strings that should match - Create strings that should NOT match - Include edge cases - Test boundary conditions

  1. Suggest Improvements

- More efficient patterns - More readable alternatives - Performance optimizations - Edge case handling

  1. 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

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 "user+tag@domain.co.uk") → 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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.69%
按下载量换算243

windsurf

22%
按下载量换算193

OpenCode

15.64%
按下载量换算137

Cursor

13.13%
按下载量换算115

Codex

7.83%
按下载量换算69

Antigravity

3.31%
按下载量换算29

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills