nigelhorne

Regex Audit — Security skill for Claude Code

Security community

Act as a senior Perl Regex Expert.

How to install Regex Audit

Installs to ~/.claude/skills/nigelhorne-claude-regex-audit/SKILL.md

Terminal
mkdir -p ~/.claude/skills/nigelhorne-claude-regex-audit && curl -fsSL https://raw.githubusercontent.com/nigelhorne/claude/HEAD/commands/regex-audit.md -o ~/.claude/skills/nigelhorne-claude-regex-audit/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Regex Audit does

Act as a senior Perl Regex Expert. Perform a strict static analysis focusing exclusively on regular expressions within the provided code.

EXECUTION & REASONING

  • Step-by-Step Verification: Use a block to simulate hostile or massive string inputs against the existing regexes to expose flaws before refactoring.

REGEX OPTIMIZATION TARGETS

  • ReDoS & Catastrophic Backtracking: Identify poorly bounded quantifiers (.*) or nested repetitions. Refactor using possessive quantifiers or

Alternatives in Security

  • Security Guardian — Comprehensive security analysis for RTK CLI tool, focusing on command injection, shell escaping, hook security 11.9k ★
  • Harden — Run the harden skill to perform a systematic project hardening audit 1k ★
  • Data Viz Audit — Audit a data visualization for chart type selection, accessible color palette, annotations, and anti-patterns 309 ★

Full documentation available on GitHub

View Source Repository