grok - Design safe regexes and formal grammars
Designs ReDoS-audited regexes, formal grammars, parser choices, tokenizers, ASTs, diagnostics, and syntax-evolution plans.
Tags
Updated: 2026-11-28Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Design safe regular expressions
- Analyze ReDoS complexity
- Compare regex engine behavior
- Select parser generators
- Design parser combinators
- Detect grammar ambiguity
- Design internal DSLs
- Design AST structures
- Plan AST transformations
- Design tokenizers and lexers
- Design error recovery
- Plan grammar evolution
- Design incremental parsing
Inputs
- Sample text
- Informal syntax specification
- Target runtime
- Regex engine target
- Input trust level
- Existing parser code
- Grammar requirements
Outputs
- Formal grammar
- ReDoS analysis
- Parser generator recommendation
- Parser implementation specification
- Tokenizer design
- AST design
- AST transformation plan
- Error recovery strategy
- Grammar test inputs
- Grammar evolution plan
Requirements
- Opus 4.7 authoring defaults
- Access to sample and parser files
- Access to .agents/PROJECT.md
