semgrep-rule-variant-creator

semgrep-rule-variant-creator is a skill for Claude Code from waybarrios/opencode-power-pack. It costs 50 tokens per session (1,769 once invoked), scanned A, original, MIT.

A tool for adapting existing Semgrep security rules, which are checks that find risky code, to other programming languages. It creates a separate rule and test folder for each language where the pattern applies.

In plain words
What is it for?
Use it to port an existing Semgrep rule to languages such as Go or Java, expand coverage across a polyglot codebase, and create language-specific tests.
Why use it?
It avoids manually rewriting the same security check for every language in a mixed-language codebase. Tests help check that each adapted rule works.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the opencode-power-pack plugin — 54 skills shipped together

Good fit Use it to port an existing Semgrep rule to languages such as Go or Java, expand coverage across a polyglot codebase, and create language-specific tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/waybarrios/opencode-power-pack/semgrep-rule-variant-creator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator
Clone the repo
git clone --depth 1 https://github.com/waybarrios/opencode-power-pack

Made for: Claude Code.

Or install opencode-power-pack, the plugin that ships this one along with the rest of its 54 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for semgrep-rule-variant-creator

README.md
[![agentmods](https://agentmods.dev/badge/skills/waybarrios/opencode-power-pack/semgrep-rule-variant-creator/github.svg)](https://agentmods.dev/skills/waybarrios/opencode-power-pack/semgrep-rule-variant-creator)
Your own site
<a href="https://agentmods.dev/skills/waybarrios/opencode-power-pack/semgrep-rule-variant-creator"><img src="https://agentmods.dev/badge/skills/waybarrios/opencode-power-pack/semgrep-rule-variant-creator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for semgrep-rule-variant-creator

Your own site · 80×15
<a href="https://agentmods.dev/skills/waybarrios/opencode-power-pack/semgrep-rule-variant-creator"><img src="https://agentmods.dev/badge/skills/waybarrios/opencode-power-pack/semgrep-rule-variant-creator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,769 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01769
Opus 5 $0.00025 $0.00885
Sonnet 5 $0.00010 $0.00354
Haiku 4.5 $0.00005 $0.00177

Measured 9d ago against content hash 3a61f250e08d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

semgrep-rule-variant-creator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/semgrep-rule-variant-creator/SKILL.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Semgrep Rule Variant Creator

Port existing Semgrep rules to new target languages with proper applicability analysis and test-driven validation.

When to Use

Ideal scenarios:

  • Porting an existing Semgrep rule to one or more target languages
  • Creating language-specific variants of a universal vulnerability pattern
  • Expanding rule coverage across a polyglot codebase
  • Translating rules between languages with equivalent constructs

When NOT to Use

Do NOT use this skill for:

  • Creating a new Semgrep rule from scratch (use semgrep-rule-creator instead)
  • Running existing rules against code
  • Languages where the vulnerability pattern fundamentally doesn't apply
  • Minor syntax variations within the same language

Input Specification

This skill requires:

  1. Existing Semgrep rule - YAML file path or YAML rule content
  2. Target languages - One or more languages to port to (e.g., "Golang and Java")

Output Specification

For each applicable target language, produces:

<original-rule-id>-<language>/
├── <original-rule-id>-<language>.yaml     # Ported Semgrep rule
└── <original-rule-id>-<language>.<ext>    # Test file with annotations

Example output for porting sql-injection to Go and Java:

sql-injection-golang/
├── sql-injection-golang.yaml
└── sql-injection-golang.go

sql-injection-java/
├── sql-injection-java.yaml
└── sql-injection-java.java

Rationalizations to Reject

When porting Semgrep rules, reject these common shortcuts:

Rationalization Why It Fails Correct Approach
"Pattern structure is identical" Different ASTs across languages Always dump AST for target language
"Same vulnerability, same detection" Data flow differs between languages Analyze target language idioms
"Rule doesn't need tests since original worked" Language edge cases differ Write NEW test cases for target
"Skip applicability - it obviously applies" Some patterns are language-specific Complete applicability analysis first
"I'll create all variants then test" Errors compound, hard to debug Complete full cycle per language
"Library equivalent is close enough" Surface similarity hides differences Verify API semantics match
"Just translate the syntax 1:1" Languages have different idioms Research target language patterns

Read the full file on GitHub · 199 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 199 lines · 50 tokens per session scan A 3a61f250e08d

Subscribe to this mod's changes

semgrep-rule-variant-creator is a skill published in the GitHub repository waybarrios/opencode-power-pack (498 stars, last pushed 2d ago), licensed MIT. It adds 50 tokens to every session and 1,769 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

verify-implementation

A workflow that runs a project’s verification skills to produce a report on coding patterns, architecture rules, and project conventions. It is intended for work after implementation, before a pull request, or during code review.

sangrokjung/claude-forge · 37 tokens

ln-23-test-suite-auditor

Audits existing tests for meaningful coverage, trustworthy oracles, and maintenance value. Not for test implementation or a single delivery review.

levnikolaevich/claude-code-skills · 35 tokens

ln-21-documentation-auditor

Audits documentation and comments for trustworthy claims, coverage, and discoverability. Not for code, test, or architecture audits.

levnikolaevich/claude-code-skills · 34 tokens

ln-41-test-strategy-planner

Plans a risk-based test portfolio and prioritized scenarios without editing tests. Not for test execution or implementation.

levnikolaevich/claude-code-skills · 29 tokens

ln-42-acceptance-test-builder

Builds, updates, consolidates, or retires scoped acceptance tests and records execution evidence. Not for product-code fixes or audits.

levnikolaevich/claude-code-skills · 36 tokens

sr-reviewer

Reviewer role for the specrails implement pipeline. Validates the entire implementation: the OpenSpec change package (proposal/design/tasks/specs) is well-formed, the developer's code matches the design's public API and invariants, every tasks.md box is ticked, the tests cover every spec scenario, and the project's…

fjpulidop/specrails-core · 98 tokens