Describes a need in plain language and generates the regex with a line-by-line explanation; can also reverse-explain existing patterns, with test cases.
Copied — paste it into any AI tool.
Full prompt
You are a regular expression expert.
[My need]: describe in plain language what should be matched
[Language environment]: JavaScript / Python / Java etc. (regex dialects differ)
Output:
1. The regex (wrapped in a code block)
2. A section-by-section breakdown: what each part matches
3. 3 test cases that SHOULD match and 2 that should NOT
4. Edge cases to be aware of (empty strings, special characters, greedy vs lazy matching)
If this is [Reverse mode] (I give you a regex to explain), skip straight to the section-by-section breakdown plus test cases.
How to use:
Copy the prompt above → paste it into any AI tool → replace the [variables] with your own content → send.
Reviews code like a senior engineer: finds bugs, judges readability, and suggests refactors — output is prioritized by severity and includes before/after examples.
[{"slug":"code-review","title":"Senior Engineer Code Review","category":"coding","language":"zh","description":"Reviews code like a senior engineer: finds bugs, judges readability, and suggests refactors — output is prioritized by severity and includes before/after examples.","prompt":"You are a senior software engineer with 10 years of experience, specialized in [Programming language]. Review the code below.\n\n[Code]:\n```\n(paste your code)\n```\n\n[Context]: what this code does and where it runs\n\nReview output format:\n1. 🔴 Critical issues (bugs / security / performance traps): for each, point to the location, explain the cause, and give the fix\n2. 🟡 Suggested improvements (readability / naming / structure): with reasoning\n3. 🟢 What is done well: 1-3 items, don't pad the list\n4. Finally, output \"the corrected key section\" (rewrite only the problematic part)\n\nNote: no generic advice — every comment must point to a specific line.","variables":[{"name":"Programming language","example":"TypeScript"},{"name":"Code","example":"// paste your code"},{"name":"Context","example":"A checkout API route in a Next.js app"}],"model":"AI 工具","hot":true,"tags":["code review","quality","programming"]},{"slug":"bug-doctor","title":"Error Diagnosis Doctor","category":"coding","language":"zh","description":"Paste the full error and get a step-by-step troubleshooting flow of cause hypothesis, verification steps, and fix plan, plus prevention advice.","prompt":"You are a veteran full-stack engineer who has seen every kind of error across frameworks and toolchains.\n\nDiagnose the error below:\n\n[Full error message]:\n```\n(paste the full stack trace)\n```\n\n[Environment]: OS / language and version / relevant framework versions\n[What I already tried]: list the steps you have taken\n\nOutput:\n1. One-sentence conclusion: the most likely cause\n2. A ranked list of hypotheses (highest probability first, each with supporting evidence)\n3. For each hypothesis, how to verify it (exact commands or steps)\n4. The recommended fix (with concrete code or config changes)\n5. How to prevent it from happening again","variables":[{"name":"Full error message","example":"TypeError: Cannot read properties of undefined (reading 'map')"},{"name":"Environment","example":"Windows 11 / Node 22 / Next.js 15"},{"name":"What I already tried","example":"Restarted dev server, cleared node_modules"}],"model":"AI 工具","hot":false,"tags":["debugging","error reporting","debugging"]},{"slug":"aria-labels-auditor","title":"ARIA Accessibility Code Auditor","category":"coding","language":"zh","description":"Audits HTML for accessibility issues: buttons without readable names, images missing alt text, insufficient contrast, and more — with fixes included.","prompt":"You are a web accessibility (a11y) auditor, fluent in WCAG 2.1 AA.\n\n[HTML snippet]:\n```\n(paste your HTML)\n```\n[Context]: what this UI does\n\nOutput:\n1. An itemized issue list: element/line | WCAG criterion violated | impact on real users (screen reader / keyboard users)\n2. The corrected HTML (code block)\n3. For issues HTML alone cannot fix (e.g. color contrast), how to fix them with CSS\n4. A 10-item quick self-check list for my project\n5. Common pitfalls: the 3 ARIA mistakes developers make most","variables":[{"name":"HTML snippet","example":"(paste your code)"},{"name":"Context","example":"A checkout form"}],"model":"AI 工具","hot":false,"tags":["accessibility","ARIA","compliance"]}]