semgrep-rule-creator

Automate creation of custom Semgrep rules for bug and vulnerability detection.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers developers to create custom Semgrep rules, automating the detection of specific bug patterns and security vulnerabilities within their codebase.

Core Features & Use Cases

  • Custom Rule Creation: Define rules tailored to your project's unique needs, going beyond generic linters.
  • Security Vulnerability Detection: Build detectors for specific CWEs or OWASP Top 10 risks relevant to your tech stack.
  • Code Quality Enforcement: Enforce coding standards, identify anti-patterns, and ensure best practices.
  • Use Case: A team wants to ensure no sensitive API keys are hardcoded in their Python application. They use this Skill to create a Semgrep rule that specifically flags any pattern resembling an API key format, preventing accidental exposure.

Quick Start

Use the semgrep-rule-creator skill to build a new Semgrep rule for detecting insecure deserialization patterns in Python.

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 detecting security vulnerabilities?

Custom Semgrep rules for security vulnerabilities are created by defining precise pattern matching and taint mode detection logic, which automates the identification of specific CWEs and bug patterns across multiple programming languages.

Can I use Semgrep taint mode to track insecure data flows in my codebase?

Semgrep taint mode tracks insecure data flows by defining source, sink, and sanitizer patterns within your custom rules, enabling precise detection of complex vulnerability paths and preventing accidental exposure of sensitive data.

How do I write a Semgrep rule to enforce code quality and identify anti-patterns?

To enforce code quality, you write Semgrep rules using AST analysis and pattern matching to identify specific anti-patterns, allowing your team to enforce coding standards and ensure best practices beyond generic linters.

Does Semgrep rule creation support test-driven development for static analysis?

Semgrep rule creation strongly emphasizes test-driven development for static analysis, supporting rule syntax validation and taint flow debugging to ensure your custom detection logic is robust and accurately identifies target bug patterns.

What is the best way to debug Semgrep rules when static analysis is not working?

When static analysis is not working, the best way to debug Semgrep rules is through AST analysis and taint flow debugging, validating the rule syntax to ensure the pattern matching logic correctly identifies the intended bug patterns.

Are there limitations to using Semgrep pattern matching for multi-language codebases?

Semgrep pattern matching supports multiple programming languages for vulnerability detection, but creating precise rules requires understanding each language's AST structure to accurately enforce code quality and avoid false positives.