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 waybarrios

Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns and code patterns. Aimed at developers and security engineers who need custom static analysis detections.

  • Score 75
  • 562 stars
  • MIT
  • 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/waybarrios/opencode-power-pack /tmp/opencode-power-pack && mkdir -p ~/.claude/skills && cp -r /tmp/opencode-power-pack/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

Semgrep Rule Creator is an agent skill that guides an AI assistant through writing custom Semgrep rules. It covers security vulnerabilities, bug patterns and code patterns. The workflow is test-first: analyze the problem, write tests with ruleid and ok annotations, inspect the AST, write the rule, then iterate until semgrep --test passes. Taint mode is preferred for data flow issues, with pattern matching as an alternative.

Each rule is stored in its own directory with one YAML file and one test file. The skill asks the assistant to read several Semgrep documentation pages before writing rules. It is aimed at developers and security engineers who need custom static analysis detections. The source says it does not run existing Semgrep rulesets, which is left to a separate static-analysis skill. The publisher is waybarrios and the license is MIT (modified).

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

What it can do

  • Rule writingWrites Semgrep rules for specific bug patterns and security vulnerabilities.
  • Taint mode rulesBuilds data flow rules that track untrusted input to dangerous sinks.
  • Test file creationCreates test files with ruleid and ok annotations for each rule.
  • Test validationRuns semgrep --test to check that all tests pass before optimizing.
  • Rule optimizationSimplifies patterns after tests pass, then re-tests the rule.

What you need

  • Semgrep installed to run semgrep --test

Try asking

  • Write a Semgrep taint rule that flags user input reaching os.system
  • Create a Semgrep rule for eval() calls with test cases and safe examples
  • Build a custom Semgrep rule that enforces a coding standard in my Python code

Good to know

  • Does not run existing Semgrep rulesets; the source points to the static-analysis skill for that.
  • Forbids todoruleid and todook test annotations.
  • Rules must target a specific language, not generic matching.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

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

Inside the skill

  • SKILL.md6 KB
  • references/quick-reference.md5 KB
  • references/workflow.md8 KB

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 Semgrep scans on my code?

No. The source says it is for writing custom Semgrep rules, and running existing rulesets is out of scope.

Does it require tests for each rule?

Yes. The source says test-first is mandatory and a rule must pass 100% of its tests before optimization.

Why does it prefer taint mode?

The source says taint mode tracks data flow, so it alerts only when untrusted data reaches a sink, which reduces false positives for injection issues.

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 published under the MIT licence. The service it connects to may have its own pricing.

Is semgrep-rule-creator safe to use?

It scores 75 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. 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.