ワンクリックで
semgrep-coderabbit-review
Two-stage code review combining fast pattern detection (Semgrep) with AI-powered semantic analysis (CodeRabbit)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Two-stage code review combining fast pattern detection (Semgrep) with AI-powered semantic analysis (CodeRabbit)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | semgrep-coderabbit-review |
| description | Two-stage code review combining fast pattern detection (Semgrep) with AI-powered semantic analysis (CodeRabbit) |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","workflow":"code-review","tools":"semgrep,coderabbit","phases":"pattern-detection,semantic-review"} |
A comprehensive two-stage code review workflow that combines fast pattern detection with AI-powered semantic analysis for maximum coverage and efficiency.
I orchestrate a complete code review process:
Use this skill when you need to:
Do NOT use if you only need:
semgrep scan --config .semgrep.yaml --error
Catches in 10-20 seconds:
Action: Fix all Semgrep violations immediately. They are deterministic and indicate real issues.
coderabbit --prompt-only -t uncommitted
Catches in 5-30 minutes:
Action: Fix CRITICAL + HIGH issues. Consider MEDIUM issues if reasonable.
Re-run both tools after fixes to ensure no new issues introduced:
semgrep scan --config .semgrep.yaml --error
coderabbit --prompt-only -t uncommitted
What Semgrep catches:
preHandler: [fastify.authenticate] on protected routesdb.query() instead of Repository PatternWhat CodeRabbit catches:
Checklist:
await request.repos.entity.method(ctx)What Semgrep catches:
What CodeRabbit catches:
Checklist:
What Semgrep catches:
$:, export let, bind:){@html} without sanitization (XSS risk)any types (type safety lost)What CodeRabbit catches:
Checklist:
any types (explicit types or unknown with guards)What Semgrep catches:
any types in shared definitionsWhat CodeRabbit catches:
Checklist:
any types (use unknown with guards)Stage 1: Semgrep (10-20 seconds)
Stage 2: CodeRabbit (5-30 minutes)
Fix Issues
Verify
| Priority | Level | Examples | Deadline |
|---|---|---|---|
| 🚫 CRITICAL | Blocking | Secrets, auth bypass, SQL injection, XSS, data leakage | MUST fix before merge |
| 🚫 HIGH | Architectural | Missing guards, schema mismatch, breaking changes, race conditions | Fix before merge |
| ⚠️ MEDIUM | Quality | Weak crypto, poor error handling, type safety, duplication | Fix if reasonable |
| 💡 LOW | Polish | Suggestions, optimization, style | Consider optional |
| Pattern | Fix |
|---|---|
const secret = "hardcoded-key" | Move to process.env.SECRET or OCI Vault |
| SQL string concat | Use SELECT * FROM users WHERE id = ? with bindings |
{@html userContent} | Use {@html DOMPurify.sanitize(userContent)} |
| No auth guard | Add preHandler: [fastify.authenticate] |
console.log(token) | Remove or use safe logger without secrets |
| Pattern | Fix |
|---|---|
await fastify.db.query(...) | Use await request.repos.entity.method(ctx) |
| Missing DbContext | Pass user ID context to all DB operations |
export let prop (Svelte) | Use let { prop } = $props() (Svelte 5) |
| Wrong status code | 201 for create, 204 for delete, 400 for validation |
any type | Define explicit type or unknown with type guard |
| Pattern | Fix |
|---|---|
console.log() in prod | Remove or use proper logging layer |
MD5.hash() | Use crypto.subtle.digest('SHA-256', ...) |
| No test coverage | Add test for new behavior/branch |
| Duplicate logic | Extract to reusable function/component |
| N+1 queries | Batch queries or use database join |
Fix Semgrep First
Read CodeRabbit Carefully
Batch Similar Fixes
Maximum 3 Passes
Test as You Go
opencode-semgrep-coderabbit-plugin (provides tools for this skill)AGENTS.md, .semgrep.yaml, .coderabbit.yamlpackages/database/src/repositories/apps/api/src/routes/| Issue | Cause | Solution |
|---|---|---|
| Semgrep takes >30s | Large change set or complex patterns | Run on smaller subset or filter by rule |
| CodeRabbit takes >30min | Very large changes (>500 lines) | Break into smaller PRs |
| Too many findings | Code quality debt accumulation | Fix critical/high, schedule follow-up for medium/low |
| Same issue on re-run | Fix incomplete or misunderstood | Read feedback again, ask CodeRabbit for clarification |
| Semgrep false positives | Rule too broad or context-specific | Review rule definition, can mark as intended if safe |
| Conflicting tool feedback | Tools have different perspectives | Trust Semgrep (deterministic), validate CodeRabbit with context |
/skill semgrep-coderabbit-review in OpenCodeopencode-semgrep-coderabbit-plugin for tools.semgrep.yaml for specific rule definitions.coderabbit.yaml for CodeRabbit configurationVersion: 1.0
Last Updated: Jan 22, 2026
Status: Production Ready
Plugin Required: opencode-semgrep-coderabbit-plugin >= 1.0.0