semgrep-rule-creator

Create custom Semgrep rules for security vulnerabilities and bug patterns.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The skill enables developers to craft custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns, ensuring accurate static analysis.

Core Features & Use Cases

  • Test‑first workflow: write tests before the rule and run semgrep --test until all pass.
  • Taint‑mode and pattern‑matching: supports both data‑flow and syntactic detection across languages.
  • Strict validation: enforces 100% test pass, prevents generic rules, and bans unsafe annotations.
  • Reference guides: includes quick‑reference and detailed workflow documentation.

Quick Start

Ask the semgrep‑rule‑creator skill to create a rule that flags unsafe eval calls in Python code.

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 custom Semgrep rules for security vulnerabilities?

To create custom Semgrep rules for detecting security vulnerabilities, write test cases before authoring the rule and run semgrep --test until all pass. This skill generates the rule files using both taint-mode and pattern-matching syntax.

What is taint analysis in static analysis and how does Semgrep apply it?

Taint analysis tracks data flow from untrusted sources to dangerous sinks to detect security bugs. Semgrep applies this through taint-mode rules, which you can author to trace data-flow patterns across your codebase.

Can I use Semgrep pattern-matching to detect bug patterns across multiple languages?

Yes, you can use Semgrep pattern-matching to detect bug patterns across multiple languages. The rule creation process supports syntactic detection, allowing you to define code patterns that identify vulnerabilities regardless of the target language.

What is the best way to write and validate Semgrep rules?

The best way to write and validate Semgrep rules is a test-first workflow: write test cases before the rule, then run semgrep --test until all pass. Strict validation enforces 100% test pass rates and prevents generic or unsafe rules.

Why does my static analysis rule fail to catch specific code patterns?

Static analysis rules may fail to catch specific code patterns if they lack strict validation or use unsafe annotations. Enforcing 100% test pass rates and avoiding generic rules ensures accurate detection of security vulnerabilities and bug patterns.