跳到正文
TakoAPI
返回技能列表

regex-visualizer

由 pipedream941 提供

Web & Frontend Development
302下载量由 clawskills.sh 提供
2星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Render Regulex-style railroad diagrams for a JavaScript regular expression and export the exact same SVG/PNG.

描述

该技能的功能

Exports railroad diagram visualizations for JavaScript regular expressions as SVG and PNG files. Uses the Regulex-Plus web UI rendering engine via headless browser, so output matches the web UI exactly rather than a re-implemented diagram. Supports flags i, m, and g.

Output matches the Regulex-Plus web UI exactly because it reuses the same export logic, avoiding visual discrepancies that come from custom re-implementations.

何时使用

  • Generating regex diagrams for technical documentation
  • Sharing visual regex breakdowns with teammates
  • Debugging complex regular expressions visually
  • Embedding regex diagrams in README or wiki pages
  • Archiving regex patterns as images for presentations

示例工作流

输入

User asks: Generate a railroad diagram for the regex ^(a|b)*?$ with flag i

智能体
  1. 1

    Runs render.mjs with --re '^(a|b)*?$' and --flags 'i' and an output path

  2. 2

    Loads regulex.html in a headless browser via puppeteer-core

  3. 3

    Triggers the built-in cmd=export mode to capture the canvas and SVG element

  4. 4

    Writes the SVG and PNG files to the specified output path

输出

SVG and PNG files of the railroad diagram matching the Regulex-Plus web UI export

安装

clawhub install pipedream941/regex-visualizer

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接