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-variant-creator

Skill by sickn33

Ports existing Semgrep rules to new target languages. It runs an applicability check, writes tests first, and validates each variant. Built for security engineers who maintain rules across polyglot codebases.

  • Score 89
  • 50k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install semgrep-rule-variant-creator

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/semgrep-rule-variant-creator ~/.claude/skills/semgrep-rule-variant-creator

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

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

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

About

This skill ports an existing Semgrep rule to one or more target languages. It takes the rule as a YAML file path or YAML content, plus the target languages, such as Golang and Java. For each applicable language it produces a separate directory containing a ported rule YAML file and a test file with annotations.

Each language goes through four phases: applicability analysis, test creation, rule creation, and validation. Tests are written before the rule, and validation expects all tests to pass. The skill is aimed at developers and security engineers who want to extend a vulnerability pattern across several languages. It refers to the semgrep-rule-creator skill for core rule-writing guidance.

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

What it can do

  • Applicability analysisDecides per language whether the pattern applies: APPLICABLE, APPLICABLE_WITH_ADAPTATION, or NOT_APPLICABLE.
  • Test-first creationWrites vulnerable (ruleid) and safe (ok) test cases in target language idioms before the rule.
  • Rule translationTranslates patterns to target language syntax and updates the language key, message, and rule ID.
  • ValidationRuns semgrep --validate and semgrep --test, and expects output to show all tests passed.

What you need

  • Semgrep CLI
  • An existing Semgrep rule in YAML

Try asking

  • Port this sql-injection rule to Golang and Java
  • Create Java and Python variants of this Semgrep rule with tests
  • Check whether this XSS rule applies to Go before porting it

Good to know

  • Creating a new rule from scratch is out of scope; the source points to semgrep-rule-creator for that.
  • The local reference guides it names are not bundled with the skill.
  • A language can be marked NOT_APPLICABLE and skipped.
  • The skill metadata lists its risk level as critical.

Security check

A

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

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

Inside the skill

  • SKILL.md8 KB

Alternatives to semgrep-rule-variant-creator

All alternatives →

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

semgrep-rule-variant-creator: common questions

Does this skill write new Semgrep rules from scratch?

No. The source says to use semgrep-rule-creator for creating a new rule from scratch.

What inputs does it need?

An existing Semgrep rule, given as a YAML file path or YAML content, and one or more target languages.

What does each output directory contain?

A ported rule YAML file and a test file with annotations, one directory for each applicable target language.

How do I install semgrep-rule-variant-creator?

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

Is semgrep-rule-variant-creator free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is semgrep-rule-variant-creator safe to use?

It scores 89 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-variant-creator?

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

semgrep-rule-variant-creator Install

Add to stack

Loading.