Skip to content
Back to skills

Review Plan Security

ASecurity

Codex-primary security review of the implementation plan across three axes before implementation.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
toolsgoshellbashnodesecurity

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 25, 2026

npx -y skills add nirecom/agents --skill review-plan-security --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Review Plan Security?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Review Plan Security
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nirecom-review-plan-security/badge)](https://www.skillsdirectory.com/skills/nirecom-review-plan-security)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: review-plan-security
description: Codex-primary security review of the implementation plan across three axes before implementation.
model: sonnet
context: fork
---

Review security implications of the implementation plan via Codex (round-continuing under the 2+1 cap: fix concerns and re-run).

## Procedure

RPS-1. Resolve `<PLANS_DIR>` via `skills/_shared/resolve-plans-dir.md`. Identify the detail plan: the output of `node "$AGENTS_MAIN_ROOT/bin/plan-artifact-path" --step detail`. Initialize `EXTENSIONS_USED=0`.
RPS-2. Invoke `"$AGENTS_MAIN_ROOT/skills/review-plan-security/scripts/run-codex-review-loop.sh"` (Bash), exporting `AGENTS_MAIN_ROOT`, `SESSION_ID`, `PLANS_DIR`, `EXTENSIONS_USED`. Pass `CTX_SURVEY_CODE`, `CTX_SURVEY_HISTORY` as env vars when available. `CTX_CONCERNS_LOG` is auto-generated by the wrapper from the ledger (`concern-ledger render-concerns-log`, format `security-plan`) and auto-exported when non-empty — do not set it manually (#2185). Exit-code handling (SSOT: `skills/_shared/codex-review-loop.md`; round-continuing under the 2+1 cap):
- exit 0 APPROVED → RPS-5 (no RISK items).
- exit 1 NEEDS_REVISION → save stdout to `<PLANS_DIR>/<session-id>-security-plan-codex-round-<N>-raw.md` (`<N>` from `<CONTROL_DIR>/security-plan-round-number.txt`, `<CONTROL_DIR>` = `node "$AGENTS_MAIN_ROOT/bin/workflow-control-dir" --session <session-id>`); present concerns via RPS-3; address them, then re-run `/review-plan-security` — the round counter survives, so the re-run is counted as the next round.
- exit 2 ESCALATE → run `review-loop-summarize-concerns --budget-remaining 0`; stop → RPS-3.
- exit 6 HIGH_UNRESOLVED → save stdout to `<PLANS_DIR>/<session-id>-security-plan-codex-round-<N>-raw.md` (`<N>` from `<CONTROL_DIR>/security-plan-last-round.txt`); run `review-loop-summarize-concerns --budget-remaining 0`; stop → RPS-3. Re-run only after accepting per exit-codes.md "Escalation by format".
- exit 3 → silently launch `plan-security-reviewer` subagent with `model:` = the `model=` line of `node "$AGENTS_MAIN_ROOT/bin/resolve-role-model" --role reviewer`, by the four fallback steps of `skills/_shared/codex-review-loop.md` "Exit 3 = " (this wrapper, raw `-security-plan-fallback-raw.md`); its APPROVED verdict (fallback round exit 0) → RPS-5; its NEEDS_REVISION verdict → RPS-3.
  Its prompt carries the canonical line of the `rules/shell-commands.md` Subagent Dispatch Prompts section.
  Handle every other exit code of the fallback round (step 4) by this list.
- exit 4 → HALT with blocking error; surface wrapper stderr; do NOT launch fallback agent.
- exit 5 AUTO_EXTEND → same as exit 1 (concerns remain within the extension budget): save stdout to the same `-raw.md` with `<N>` from `<CONTROL_DIR>/security-plan-round-number.txt`; present via RPS-3, address, re-run.
- exit 7 FINALIZE_FAILED → `<CONTROL_DIR>/security-plan-unresolved-concerns.json` could not be written; HALT, surface the `## Concern Ledger: FINALIZE-FAILED` line, launch no fallback, emit no sentinel. After an ESCALATE, confirm the artifact with `bash "$AGENTS_MAIN_ROOT/bin/concern-ledger" check-finalized --plans-dir <PLANS_DIR> --session-id <session-id> --format security-plan` first.
- exit 9 → HALT; accept per exit-codes.md "Escalation by format", then re-run.
RPS-3. Triage — per `skills/_shared/priority-hierarchy.md`, reject a concern only when it directly contradicts a decision already settled in the approved intent.md / outline.md (including the merged Accepted Tradeoffs file `bin/resolve-accepted-tradeoffs-file` builds — in fallback, the path passed in the prompt).
- Raising a topic the plan does not address is never grounds to reject.
- Rejecting obliges naming the specific governing decision; a reject carrying no cited decision is a procedure violation.
- Record each reject durably so it does not re-surface next round: `bash "$AGENTS_MAIN_ROOT/bin/concern-ledger" reject --plans-dir <PLANS_DIR> --session-id <session-id> --format security-plan --id C<N> --reason "<cited decision>"` (#2185).
- A concern about the consequences or residual risk of a settled decision is no contradiction of it; only a demand to reverse the decision is.
- Forward each surviving concern to RPS-4.
- When every concern is rejected on a cited decision, treat the review as having no RISK items and go to RPS-5.
- A concern tagged `[upstream-inconsistency …]` stays outside this triage: follow the fork branch of [`skills/_shared/codex-review-loop/upstream-inconsistency-pause.md`](../_shared/codex-review-loop/upstream-inconsistency-pause.md) (stop without the sentinel, return the three items of its fork section under `## Upstream inconsistency`).
- After A / D, the main conversation revises the detail per that procedure's table and re-runs `/review-plan-security`.
- exit 0 carries no concerns and skips RPS-3.
RPS-4. Present the surviving concerns with per-axis severity and proposed mitigations before implementation proceeds.
RPS-5. Summary — APPROVED (including the all-rejected case): report no RISK items, and on the all-rejected path also list every rejected concern beside the settled decision cited against it; NEEDS_REVISION: summarize the RPS-4 mitigations.

## Notes

The three security axes (Information Leakage / Third-Party Access / External Access) and their OWASP/CWE references live in the Codex prompt (`bin/review-plan-codex`) and the `plan-security-reviewer` fallback agent.
For code-level pattern scanning after implementation, use `/review-code-security`.

Files in this skill

  • SKILL.md5 KB
  • scripts/run-codex-review-loop.sh4.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.