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 henryalouf

Ports an existing Semgrep rule to new target languages, producing a rule and test directory for each applicable language. Built for developers and security engineers extending Semgrep coverage across a polyglot codebase.

  • Score 71
  • 204 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/henryalouf/ruflow /tmp/ruflow && mkdir -p ~/.claude/skills && cp -r /tmp/ruflow/.agents/skills/antigravity-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

The semgrep-rule-variant-creator skill ports an existing Semgrep rule to one or more target languages. For each target language, it runs an independent four-phase cycle: applicability analysis, test creation, rule creation and validation. The output is a directory per language containing a Semgrep YAML rule and a test file with ruleid and ok annotations.

The skill is aimed at developers and security engineers who need to expand Semgrep coverage across a polyglot codebase. It refers to the semgrep-rule-creator skill for rule fundamentals. The input is an existing rule, given as a file path or YAML content, plus a list of target languages. Each language receives a verdict of APPLICABLE, APPLICABLE_WITH_ADAPTATION or NOT_APPLICABLE.

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

What it can do

  • Applicability analysisDecides per target language whether the vulnerability pattern applies, with a verdict.
  • Test creationWrites test cases with ruleid and ok annotations before the rule is written.
  • Rule creationTranslates patterns and metadata such as language key, message and rule ID to the target language.
  • ValidationRuns semgrep --validate and semgrep --test and requires all tests to pass.

What you need

  • Semgrep CLI
  • An existing Semgrep rule as a YAML file or content
  • One or more target languages

Try asking

  • Port the sql-injection rule to Golang and Java with tests
  • Check whether this rule applies to Python before porting it
  • Create a Java variant of this Semgrep rule with its test file

Good to know

  • Not for creating a new rule from scratch; use semgrep-rule-creator instead.
  • Not for running existing rules against code.
  • Skips languages where the vulnerability pattern does not apply.
  • Does not cover minor syntax variations within the same language.

Security check

A

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

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

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

What does the skill output for each language?

It produces a directory named after the original rule ID and language, with a Semgrep YAML rule and a test file with annotations.

When should I not use this skill?

The source says not to use it for creating a new rule from scratch, for running existing rules against code, or for languages where the pattern does not fundamentally apply.

Which skill should I read for rule basics?

The source names semgrep-rule-creator as the authoritative reference for Semgrep rule creation fundamentals.

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 71 of 100. Grades: maintenance B, licence A, quality B. 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.