semgrep-rule-creator

Generate Semgrep rules and tests for security vulnerability detection.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/gebl/anvil-skill-marketplace --skill semgrep-rule-creator-gebl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semgrep-rule-creator
Source: https://github.com/gebl/anvil-skill-marketplace/tree/main/generated/claude/skills/semgrep-rule-creator
Command: npx skills add https://github.com/gebl/anvil-skill-marketplace --skill semgrep-rule-creator-gebl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building Semgrep rules and tests can be time-consuming and error-prone; this skill provides a guided workflow to craft robust detections for security vulnerabilities and code patterns.

Core Features & Use Cases

  • Generates rule scaffolds, test files, and documentation structures for Semgrep rules.
  • Supports both taint-mode and pattern-based approaches, with guidance to iterate toward precise detections.
  • Use Case: quickly add a rule to detect a specific vulnerability in a Python project and validate it with tests.

Quick Start

Create a Semgrep rule using the tool and run the built-in tests to verify it against vulnerable and safe code samples.

Frequently Asked Questions about semgrep-rule-creator

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

FAQPage Schema
How do I create Semgrep rules to detect security vulnerabilities?

You can automate the creation of Semgrep rules by generating rule scaffolds alongside test files and documentation structures. This workflow supports test-first design to accurately detect security vulnerabilities and specific code patterns across multiple languages.

What is the best way to write Semgrep tests for static analysis rules?

The best way to write Semgrep tests is to adopt a test-first design that validates your static analysis rules against vulnerable and safe code samples. This ensures precise detections and reduces false positives before deploying rules to production.

Can I use taint-mode Semgrep rules for Python projects?

Yes, you can use taint-mode Semgrep rules for Python projects. The rule creation workflow supports taint-mode analysis across multiple languages, enabling you to track data flow from sources to sinks to identify complex code vulnerabilities.

Does this Semgrep rule generator support pattern-based approaches?

Yes, this Semgrep rule generator supports pattern-based approaches alongside taint-mode. It provides guidance to iterate toward precise detections, helping you match exact code syntax and structural patterns for static analysis testing.

How do I organize a repository of Semgrep rules and assets?

To organize a repository of Semgrep rules, you should utilize structured directories such as scripts, references, and assets alongside your SKILL.md frontmatter. This setup enables organized rule management and production-grade static analysis workflows.