What problem does it solve? Writing custom Semgrep rules that accurately detect vulnerabilities without false positives is difficult: patterns must match the AST correctly, taint flows must propagate properly, and untested rules silently miss variants or over-match safe code. This Skill enforces a strict test-first workflow so every rule is validated before use. ## Core Features & Use Cases - Test-first rule creation: Write annotated test files (ruleid:/ok:) before the rule, then iterate with semgrep --test until all tests pass. - Taint mode guidance: Prioritizes taint tracking (sources, sinks, sanitizers) for data-flow vulnerabilities like injection, with pattern matching as an alternative. - AST-driven pattern design: Uses semgrep --dump-ast to understand how Semgrep parses code, plus optimization steps to remove redundant patterns. - Use Case: You need to detect unsafe eval() calls on user input across a Python codebase. The Skill walks you through writing tests, building a taint-mode rule, debugging with --dataflow-traces, and optimizing until all tests pass. ## Quick Start Ask the agent to create a Semgrep rule that detects your target vulnerability or code pattern in a specific language, including tests.