Agent skill · Testing & QA

semgrep-rule-variant-creator

Creates language variants of existing Semgrep rules. Use when porting a Semgrep rule to specified target languages. Takes an existing rule and target languages as input, produces independent rule+test directories for each language.

Wayner Barrios443★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 4
SKILL.md size: 8 KB
Bundled scripts: none
Path: skills/semgrep-rule-variant-creator/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 443
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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-inj

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Input Specification
  4. Output Specification
  5. Rationalizations to Reject
  6. Strictness Level
  7. Overview
  8. Foundational Knowledge
  9. Four-Phase Workflow
  10. Phase 1: Applicability Analysis
  11. Phase 2: Test Creation (Test-First)
  12. Phase 3: Rule Creation
  13. Phase 4: Validation
  14. Quick Reference
Ships with 3 files
  • references/applicability-analysis.md
  • references/language-syntax-guide.md
  • references/workflow.md
Commands it runs
Validate YAML
semgrep --validate --config rule.yaml
Run tests
semgrep --test --config rule.yaml test-file
semgrep --dataflow-traces -f rule.yaml test-file
More from opencode-power-pack
All skills →
About this skill
What does the semgrep-rule-variant-creator skill do?

Creates language variants of existing Semgrep rules. Use when porting a Semgrep rule to specified target languages. Takes an existing rule and target languages as input, produces independent rule+test directories for each language.

How do I install it?

Run `npx skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From waybarrios/opencode-power-pack, a repository with 443 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going