No. 020 · Code Quality
Semgrep Rules skill for OpenCode
Create and refine vulnerability detection rules
Write Semgrep rules that detect specific vulnerability patterns. Covers rule syntax, pattern matching, taint tracking, and testing rules against known-good and known-bad code.
When to use this skill
- Writing a custom lint rule
- Detecting a specific vulnerability pattern
- Enforcing a coding standard
Core concepts
This skill provides guidance on semgrep rules best practices, patterns, and common pitfalls. It is designed to be loaded on demand when a relevant task is detected.
Installation
curl -LO https://opencodeskills.dev/downloads/code-quality/semgrep-rules.zip
unzip semgrep-rules.zip -d ~/.config/opencode/skills/
Restart OpenCode — the skill loads automatically.
When it triggers
- writing a custom lint rule
- detecting a specific vulnerability pattern
- enforcing a coding standard