regex
Skill2 starsChanged 4 months agoMITView on GitHub
Build, explain, or debug a regular expression from a plain-English description, with worked examples and test cases. Use when the user says "write a regex", "regex for", "explain this regex", "why doesn't this pattern match", "match a pattern like", or pastes a regex and asks what it does.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- poorvith-mp/skills-developertheir own version, first seen Aug 19, 2026
- AntheaLaffy/missing-semester-skills-dshtheir own version, first seen Aug 16, 2026
- AntheaLaffy/the-missing-semester-skillstheir own version, first seen Aug 16, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- AntheaLaffy/the-missing-semester-skills★ 1same name
- AntheaLaffy/missing-semester-skills-dsh★ 0same name
- poorvith-mp/skills-developer★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Clarify the target flavor: if it matters: regex dialects differ (PCRE, JavaScript, Python re, Go RE2, POSIX, grep/ripgrep).
- Distinctive: line 25
If the user says it's not working, identify why (missing anchor, wrong flag, escaping, greedy quantifier) and give the corrected version.
- Very specific: line 29
Prefer readable, maintainable patterns over clever one-liners.
- Distinctive: line 30
Always provide concrete match / no-match examples — never hand over a bare pattern.
- Distinctive: line 32
If a regex is the wrong tool (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Instructions
Handle the regex task in $ARGUMENTS. Two modes — detect which from the request:
Mode A — build a regex from a description
- Clarify the target flavor if it matters: regex dialects differ (PCRE, JavaScript, Python
re, Go RE2, POSIX, grep/ripgrep). Infer from context (the file type or tool mentioned); if genuinely ambiguous, ask or state the flavor you're assuming. - Write the pattern, then explain it token by token so the user understands and can adjust it.
- Show test cases: a table of inputs that should match and inputs that should not, with the expected result. Cover the tricky edges (empty string, boundaries, unicode/accents, greedy vs. lazy).
- Give a ready-to-paste snippet in the user's language showing how to use it (with the right flags —
i,m,g, etc.). - Warn about footguns you introduced or avoided: catastrophic backtracking, unanchored matches, unescaped metacharacters,
.matching newlines.
Mode B — explain or debug an existing regex
- Break it into components and explain what each does in plain language.
- State exactly what it matches and what it rejects, with examples.
- If the user says it's not working, identify why (missing anchor, wrong flag, escaping, greedy quantifier) and give the corrected version.
Rules
- Prefer readable, maintainable patterns over clever one-liners. Suggest named groups or verbose/
xmode for complex patterns. - Always provide concrete match / no-match examples — never hand over a bare pattern.
- Flag any catastrophic-backtracking risk and offer a safer rewrite.
- If a regex is the wrong tool (e.g. parsing HTML or deeply nested structures), say so and suggest the proper approach.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

