semgrep-rule-variant-creator
Skill by satnamrsm
Ports an existing Semgrep rule to one or more target languages, with applicability analysis and test-first validation. Built for security engineers who maintain Semgrep rules across a polyglot codebase.
Install semgrep-rule-variant-creator
Built from the published package, never by AI.
git clone --depth 1 https://github.com/satnamrsm/https-github.com-sickn33-antigravity-awesome-skills /tmp/https-github.com-sickn33-antigravity-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/https-github.com-sickn33-antigravity-awesome-skills/skills/semgrep-rule-variant-creator ~/.claude/skills/semgrep-rule-variant-creatorRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install semgrep-rule-variant-creator in Claude Code
git clone --depth 1 https://github.com/satnamrsm/https-github.com-sickn33-antigravity-awesome-skills /tmp/https-github.com-sickn33-antigravity-awesome-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/https-github.com-sickn33-antigravity-awesome-skills/skills/semgrep-rule-variant-creator ~/.gemini/antigravity-cli/skills/semgrep-rule-variant-creatorAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install semgrep-rule-variant-creator in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
The semgrep-rule-variant-creator skill takes an existing Semgrep rule and a list of 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.
Each variant must pass its own tests. The skill requires the output of semgrep --test to show that all tests passed before a variant is complete. It refers to the semgrep-rule-creator skill for core rule-writing guidance. It is intended for users porting existing rules to new languages, not for writing new rules from scratch.
Written from the project's SKILL.md and checked against it.
What it can do
- Applicability analysisGives a verdict per language: APPLICABLE, APPLICABLE_WITH_ADAPTATION, or NOT_APPLICABLE.
- Test creationWrites target-language test files with ruleid and ok annotations before the rule is written.
- Rule portingTranslates patterns to target language syntax, using an AST dump for the target language.
- ValidationRuns semgrep --validate and semgrep --test on each ported rule.
- Taint rule debuggingUses semgrep --dataflow-traces to debug taint rules.
What you need
- Semgrep CLI
- An existing Semgrep rule as a YAML file or YAML content
- One or more target languages
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
- Does not create new rules from scratch; use semgrep-rule-creator for that.
- Not for running existing rules against code.
- Not for minor syntax variations within the same language.
- Each language must reach a full test pass before the next language starts.
Security check
ANo 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
Alternatives to semgrep-rule-variant-creator
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
semgrep-rule-variant-creator: common questions
What does semgrep-rule-variant-creator produce?
For each applicable target language, it produces a directory with a ported Semgrep rule YAML file and a test file with annotations.
When should I not use this skill?
The source says not to use it to create a new rule from scratch, to run existing rules against code, or for languages where the pattern does not apply.
What does a passing result look like?
The source says the validation output must show that all tests passed before a variant is considered complete.
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 70 of 100. Grades: maintenance A, licence A, quality C. 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.
