Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

semgrep-rule-creator

Skill by rubenautodetail

Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Built for developers and security engineers who write their own static analysis detections.

  • Score 56
  • 0 stars
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install semgrep-rule-creator

Built from the published package, never by AI.

git clone --depth 1 https://github.com/rubenautodetail/autodetailapp /tmp/autodetailapp && mkdir -p ~/.claude/skills && cp -r /tmp/autodetailapp/.claude/skills/semgrep-rule-creator ~/.claude/skills/semgrep-rule-creator

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install semgrep-rule-creator in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The semgrep-rule-creator skill helps an AI assistant write custom Semgrep rules for security vulnerabilities, bug patterns, and code patterns. It follows a set workflow: analyze the problem, write tests first, inspect the AST, write the rule, and iterate until semgrep --test passes. It prioritizes taint mode for data flow issues where untrusted input reaches a dangerous sink.

Each rule is saved in its own directory with a YAML rule file and a test file that uses ruleid and ok annotations. The skill asks the assistant to read several Semgrep documentation pages before writing rules. It is aimed at developers and security engineers who write custom static analysis detections. It is not meant for running existing rulesets.

Written from the project's SKILL.md and checked against it.

What it can do

  • Rule creationWrites custom Semgrep rules for security vulnerabilities, bug patterns, and code patterns.
  • Taint mode rulesBuilds data flow rules that track untrusted input to dangerous sinks.
  • Test file generationCreates test files with ruleid and ok annotations, including safe cases.
  • Test-driven iterationRuns semgrep --test and repeats the rule until all tests pass.
  • AST analysisInspects the AST structure of sample code before writing the rule.
  • Rule optimizationSimplifies patterns after all tests pass and re-runs the tests.

What you need

  • Semgrep CLI

Try asking

  • Write a Semgrep taint rule for user input reaching eval in Python
  • Create a Semgrep rule and test file for unsafe os.system calls
  • Build a custom Semgrep rule that flags a risky function in my code

Good to know

  • Not for running existing Semgrep rulesets.
  • For general static analysis without custom rules, the static-analysis skill is recommended.
  • Each YAML file must contain only one Semgrep rule.
  • Generic language rules and todook or todoruleid test annotations are not allowed.

Security check

B
  • Allowed to use Bash, Write, Edit without limitsIn SKILL.md

Checked automatically: .claude/skills/semgrep-rule-creator/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: BashReadWriteEditGlobGrepWebFetch

Alternatives to semgrep-rule-creator

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

semgrep-rule-creator: common questions

Does this skill run existing Semgrep scans?

No. The source says not to use it for running existing Semgrep rulesets. It is for writing new custom rules.

What files does it produce for each rule?

It produces exactly two files in a directory named after the rule ID: a YAML rule file and a test file with ruleid and ok annotations.

Why does it prefer taint mode?

The source says taint mode tracks data flow, so it alerts only when untrusted data reaches a sink. This reduces false positives for injection vulnerabilities compared with plain pattern matching.

How do I install semgrep-rule-creator?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is semgrep-rule-creator free?

The code is public, but no licence file was found, so check the repository before commercial use.

Is semgrep-rule-creator safe to use?

It scores 56 of 100. Grades: maintenance A, licence F, quality C. Security check: grade B (allowed to use bash, write, edit without limits). Review the code before you install. How grades work.

What are alternatives to semgrep-rule-creator?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

semgrep-rule-creator Install

Add to stack

Loading.