Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By bongkagev1.1.1CC-BY-SA-4.0In 1 marketplace
Creates language variants of existing Semgrep rules with proper applicability analysis and test-driven validation
Claude loads one when your task matches it, or you run it by name.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A Claude Code skill for porting existing Semgrep rules to new target languages with proper applicability analysis and test-driven validation.
This skill takes an existing Semgrep rule and one or more target languages, then generates independent rule variants for each applicable language. Each variant goes through a complete 4-phase cycle:
| Component | Purpose |
|---|---|
semgrep-rule-variant-creator skill | Which rule, which languages, whether a NOT_APPLICABLE verdict is right, and the by-hand path for a single language |
/semgrep-rule-variant-creator:port-rule-to-languages workflow | Applicability, test-first authoring, AST-guided translation, and the fix-until-green loop — one independent chain per language |
The split follows what needs a person. Which rule to port, which languages to target, and whether to accept a language being dropped are decisions the skill puts to you, and a workflow cannot ask questions mid-run — which is exactly why those questions come first. Everything after that is the same four phases over many languages, so it runs as a workflow, with the phase order and the retry bound held in code rather than in prose.
Porting is the same four phases repeated per language, so the orchestration ships as a dynamic workflow:
/semgrep-rule-variant-creator:port-rule-to-languages
| Field | Default | Purpose |
|---|---|---|
rulePath | required | Path to the Semgrep rule YAML being ported |
languages | required | One target language per entry: ["Go", "Java"]. A phrase like "Go and Java" is rejected rather than ported as a single language named after the phrase |
referencesDir | required | This plugin's references/ directory, as a resolved absolute path — the skill prints it with ls -d -- "${CLAUDE_PLUGIN_ROOT}/…" and passes what it saw — -d, because ls without it lists the files inside the directory rather than the directory, leaving nothing to copy. A workflow script cannot expand {baseDir} or ${CLAUDE_PLUGIN_ROOT}, and has no filesystem access to notice that it did not, and an installed plugin does not sit in your project, so this is the only route by which the guidance reaches the phase agents. The script rejects both an omitted value and a path holding an unexpanded token: a port made without the references still reports every language as passed, so a warning would be the one signal that can be ignored for free |
outputDir | working directory | Where the variant directories land |
It reads the rule once, then runs each language through its own applicability, test,
translation, and validation cycle, and reports which languages passed, which failed
validation, which were not applicable, and which Semgrep cannot analyze at all — Perl has no
frontend and Elixir's parser is Pro-only, and in both cases the bug class is present while
the rule is ungradeable. Validation is measured against one specific Semgrep, the version
recorded when the rule was read, because "All tests passed" is also what Semgrep prints for a
rule it skipped and for a test file it never matched. Two annotations is the floor on both sides
of a spec, and the ok: side is counted by a second Semgrep run over it, because --test --json
reports the lines the rule matched and nothing about the lines it must leave alone — so vulnerable
cases alone grade clean for a rule that flags every construct in the target language. The script
pins a reasoning effort per phase and encodes the phase order, so a rule cannot be written before
the tests that specify it. It also sends a NOT_APPLICABLE verdict to an independent refuter
before dropping a language, and retries failed validation up to three times instead of trusting
one agent to iterate until the tests pass.
The skill also triggers on a plain request, for porting a single language by hand:
Port the sql-injection.yaml Semgrep rule to Go and Java
Create Semgrep rule variants of my-rule.yaml for TypeScript, Rust, and C#
Create the same Semgrep rule for JavaScript and Ruby
Port this Semgrep rule to Golang
For each applicable target language, the skill produces:
npx claudepluginhub bongkage/trailofbits-skills --plugin semgrep-rule-variant-creatorBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground