semgrep-rule-creator

Create Semgrep rules with YAML and test files for validation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creates production-grade Semgrep rules with proper testing and validation to help teams detect security vulnerabilities, code patterns, and bugs during development.

Core Features & Use Cases

  • Guides the creation of Semgrep rules that detect security vulnerabilities and code patterns.
  • Promotes a test-first workflow with examples and structured rule-test files.
  • Supports taint-mode and pattern-based approaches to improve precision and coverage for static analysis.

Quick Start

Define a new Semgrep rule by drafting a YAML rule block and a corresponding test file named after the rule-id, then run the tests to validate behavior.

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 production-ready Semgrep rules for static analysis?

Taint-mode Semgrep rules track data flow from untrusted sources to dangerous sinks, improving precision for vulnerability detection. They complement pattern-based approaches to provide better coverage for static analysis of security issues.

How do I test custom Semgrep rules before deploying them?

You test custom Semgrep rules using a test-first workflow with structured rule-test files. Name the test file after the rule-id, include examples, and run validation tests to confirm the rule detects intended code patterns.

What is taint-mode analysis in Semgrep and when should I use it?

Taint-mode analysis in Semgrep tracks data flow from untrusted sources to dangerous sinks, improving precision for vulnerability detection. Use it when pattern-based approaches alone cannot capture complex data propagation across code boundaries.

Can I use Semgrep rule generation for both security vulnerabilities and general code patterns?

Yes, Semgrep rule generation supports detecting both security vulnerabilities and general coding patterns. You can use pattern-based and taint-mode approaches to target specific bugs or enforce coding standards during development.

What is the two-file rule layout for Semgrep rules?

The two-file rule layout separates the rule YAML from its test file. This structure ensures that frontmatter metadata, rule definitions, and test scaffolds are produced consistently and can be validated independently.