semgrep-rule-creator

Create Semgrep rules with YAML rule files and annotated tests.

10|4|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/sbknana/equipa --skill semgrep-rule-creator-sbknana
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semgrep-rule-creator
Source: https://github.com/sbknana/equipa/tree/main/skills/security/semgrep-rule-creator/skills/semgrep-rule-creator
Command: npx skills add https://github.com/sbknana/equipa --skill semgrep-rule-creator-sbknana

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Detects and blocks security vulnerabilities and bugs by auto-generating precise Semgrep rules with tested patterns. The skill streamlines rule creation, testing, and validation across languages supported by Semgrep.

Core Features & Use Cases

  • Generate production-ready Semgrep rules with comprehensive tests, following a test-first approach.
  • Support taint-mode and pattern-based detection for multiple languages.
  • Enforce a clear two-file rule structure (rule YAML + test file) and a verifiable workflow via semgrep --test.

Quick Start

Create a new Semgrep rule directory named after the rule, including a YAML rule file and a test file annotated with rule IDs, then run semgrep --test to verify.

Frequently Asked Questions about semgrep-rule-creator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Semgrep rule test fail when running semgrep --test?

Semgrep rule tests fail when the test file annotations do not match the rule ID or when the static analysis pattern logic misses expected matches, requiring you to adjust the YAML rule or update the test cases.

How do I write Semgrep rules with test cases to detect security vulnerabilities?

To write Semgrep rules with tests, create a directory containing a YAML rule file and a test file annotated with rule IDs, then run semgrep --test to validate that your security vulnerability detection patterns pass.

How do I configure taint-mode analysis in Semgrep to track data flow for bug patterns?

Taint-mode configuration in Semgrep tracks data flow from sources to sinks to detect bug patterns, requiring explicit settings in your rule YAML file paired with test cases to verify tainted paths match expectations.

Does Semgrep static analysis support multiple programming languages for rule creation?

Semgrep static analysis supports multiple programming languages for rule creation, allowing you to craft targeted pattern-based and taint-mode rules across any language supported by the Semgrep engine.

What is the best way to structure Semgrep rule files and test files for validation?

The best way to structure Semgrep rules is a two-file approach: a YAML file defining the rule and a test file annotated with rule IDs, organized in a dedicated directory named after the rule.

Why does my Semgrep rule test fail when running semgrep --test?

Semgrep rule tests fail when the test file annotations do not match the rule ID or when the static analysis pattern logic misses expected matches, requiring you to adjust the YAML rule or update the test cases.