Skip to main content
prompt CX Codex GP ChatGPT

opencode-review-security — Claude Code prompt for security reviews

The opencode-review-security Claude Code prompt reviews Rust pull requests for security risks. Documentation-only and comment-only diffs take a no-op path that records pass and updates the summary comment.

Apache-2.0 ★ 423 updated 2026-11-16

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/opencode-review-security.md
Open on GitHub

What opencode-review-security does

The prompt lays out a security review workflow for pull requests in a Rust repository. It checks the diff before invoking the security-review skill, then assigns severity based on how exploitable a finding is and what damage it could cause. Findings must name a concrete risk.

For changes limited to docs or comments, it writes pass to ./.opencode-verdict.txt and updates the summary comment. Changes under .github/workflows/, .github/scripts/, .github/prompts/, or .agents/skills/ always require a full review. The workflow needs gh, repository and PR context values, and the security-review skill at .agents/skills/security-review/SKILL.md.

What it helps with

  • review a pull request for security flaws
  • skip full analysis for docs-only changes
  • rank findings by exploitability
  • update the PR verdict and summary comment

Example prompts for the agent

  • Review this Rust pull request for security risks.
  • Check this PR for exploitable security issues and post the summary result.

How to install opencode-review-security

Manually: put the files in place

.claude/commands/opencode-review-security.md

Questions about opencode-review-security

How do I install opencode-review-security in Claude Code?

Add the prompt file at .claude/commands/opencode-review-security.md.

What does opencode-review-security do?

It defines a security review workflow for Rust pull requests and invokes the security-review skill. For PRs with no code changes, it records pass and updates the summary comment.

What does opencode-review-security need to run?

It needs gh, repository and PR values in the run context, and the security-review skill at .agents/skills/security-review/SKILL.md.

Source text

opencode-review-security.md · Apache-2.0
You are performing an automated **Security review** of a pull request in this Rust repository, running under OpenCode. Be concise, concrete, and avoid noise — only flag findings you can name a specific risk for.

You will receive context lines at the top of the prompt in this form:

```
REPO: <owner>/<repo>
PR NUMBER: <n>
HEAD SHA: <sha>
```

Use the values from those lines (as `GITHUB_REPOSITORY`, `PR_NUMBER`, and `HEAD_SHA` respectively) in every `gh` invocation below.

## Step 1 — Invoke the `security-review` skill

Your FIRST action is to invoke the `security-review` skill via the `skill` tool with skill ID `security-review`. The skill lives in this repository at `.agents/skills/security-review/SKILL.md` and is discovered by OpenCode automatically.

- The skill owns the review shape: its checklist (scope, threat model, input validation, authorization, secrets handling, dependency changes) defines the analysis steps. Do not re-derive or hand-roll the scope here.
- You assign severity by **exploitability**: how reachable and damaging the issue is in the context of this diff.

## Step 2 — No-op when there are no code changes

Before invoking the skill, run `gh pr diff ${PR_NUMBER}` and inspect the changed file list. Changes under `.github/workflows/`, `.github/scripts/`, `.github/prompts/`, or `.agents/skills/` are **always security-relevant and never take the no-op path** — these paths control what code and instructions run in CI with secrets, so they always warrant the full review. Otherwise, if the diff contains **no code changes at all** (docs-only or comment-only changes — i.e. no non-doc code change), do the following and stop:

1. Write `pass` to `./.opencode-verdict.txt` in the workspace root (e.g. `echo pass > ./.opencode-verdict.txt`).
2. Post-or-update the single summary comment (see "Posting the summary" below for the discover-then-edit pattern) with this body:
   ```
   **Security review:** no security-relevant changes. ✅
   <!-- opencode-verdict: pass -->
   ```
3. Stop. Do not invoke the skill.

## Protocol parameters

The shared review protocol is appended after this header. Substitute its placeholder tokens with these values:

- `<KIND>` = `Security review`
- `<KIND_HYPHEN>` = `Security-review`
- `<SKILL_ID>` = `security-review`
- `<SKILL_PATH>` = `.agents/skills/security-review/SKILL.md`
- `<FINDING_DESC>` = `concrete issue`
- `<SEVERITY_NOTE>` = Severity is one of `Critical`, `High`, `Medium`, `Low`, assigned by exploitability.
- `<INLINE_SCOPE_LIMIT>` = `Do not post inline comments for stylistic preferences, missing tests, or general code quality — those belong to the other review workflows, not here.`
- `<SUMMARY_HEADING>` = `**Security review** (security-review skill)`
- `<NO_FALLBACK>` = `hand-rolled security checks`

© relatedb · Apache-2.0 · relatedb/relate

Similar prompts

All prompts for Code review and refactoring →

From the same set18

The whole set →
stellar-nightshift The stellar-nightshift prompt for Claude Code applies the remedy for each finding in a supplied cluster and leaves unrelated code alone. It targets files in the cluster’s crate directories. CX Codex +1 ★ 423repo stars opencode-review-rust The opencode-review-rust Claude Code prompt automates Rust pull request reviews. It checks the changed-file list first, then sends the full diff to the rust-reviewer skill. CX Codex +1 ★ 423repo stars opencode-review-stellar The opencode-review-stellar Claude Code prompt runs a strict maintainability and code-quality review on a Rust pull request. It gathers agent findings but leaves comments and the final verdict to a later pipeline step. CX Codex +1 ★ 423repo stars opencode-review-protocol The opencode-review-protocol Claude Code prompt defines a pull request review workflow. It posts line-specific findings, updates a summary comment, and writes a verdict for CI. CX Codex +1 ★ 423repo stars release-notes A prompt for Claude Code drafts relate release notes from the changelog and commit history. It runs for a tagged release. CX Codex +1 ★ 423repo stars security-review The security-review Claude Code skill reviews code changes for security risks and suggests remediations. It activates for auth or permission changes, secrets and PII handling, public endpoints, and dependency upgrades. CX Codex +1 ★ 423repo stars neo4j-query-workload-skill The neo4j-query-workload-skill Claude Code skill builds a graph-database query workload one requirement at a time. It runs new queries against the dataset and checks earlier results for regressions. CX Codex +1 ★ 423repo stars relate This Claude Code skill guides JVM projects through using Relate as a local graph database with Cypher. It activates when Java or Kotlin code needs to create, query, or embed the database. CX Codex +1 ★ 423repo stars

Project sponsors

Companies that keep this analytics open