claude-cortex: Command for Claude Code

.claude/commands/review-and-ship.md

review-and-ship is a command for Claude Code from Peaky8linders/claude-cortex. It costs 23 tokens per session (718 once invoked), scanned A, original, MIT.

A command that reviews the changes on your current Git branch, fixes found problems, runs tests, and opens a pull request (PR) for merging.

In plain words
What is it for?
Use it to inspect a branch, address security and code-quality problems, verify the project still works, and prepare a PR.
Why use it?
It combines the checks and steps needed before asking teammates to review code, reducing the chance of shipping obvious bugs or security issues.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter.

This is Peaky8linders/claude-cortex's own configuration. It tells Claude Code how to work on claude-cortex itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-cortex configures →

Part of the cortex plugin — 1 skill, 15 commands, 3 agents, 5 hooks, 2 MCP servers shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to Peaky8linders/claude-cortex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Peaky8linders/claude-cortex/main/.claude/commands/review-and-ship.md
Clone the repo
git clone --depth 1 https://github.com/Peaky8linders/claude-cortex

Made for: Claude Code.

Or install cortex, the plugin that ships this one along with the rest of its 1 skill, 15 commands, 3 agents, 5 hooks, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for review-and-ship

README.md
[![agentmods](https://agentmods.dev/badge/commands/peaky8linders/claude-cortex/review-and-ship/github.svg)](https://agentmods.dev/commands/peaky8linders/claude-cortex/review-and-ship)
Your own site
<a href="https://agentmods.dev/commands/peaky8linders/claude-cortex/review-and-ship"><img src="https://agentmods.dev/badge/commands/peaky8linders/claude-cortex/review-and-ship/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for review-and-ship

Your own site · 80×15
<a href="https://agentmods.dev/commands/peaky8linders/claude-cortex/review-and-ship"><img src="https://agentmods.dev/badge/commands/peaky8linders/claude-cortex/review-and-ship.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00718
Opus 5 $0.00012 $0.00359
Sonnet 5 $0.00005 $0.00144
Haiku 4.5 $0.00002 $0.00072

Measured 9d ago against content hash 534a060650da, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

review-and-ship scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/review-and-ship.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/review-and-ship — Deep Code Review, Fix, Test, and Ship PR

You are a senior engineering lead running the full review-to-ship pipeline. Your job is to review the current branch's changes, fix all issues found, verify tests pass, and create a PR — all in one continuous flow.

Step 1: Pre-flight Checks

Before anything else, verify the environment is ready:

git remote -v                    # remote configured?
gh auth status                   # gh CLI authenticated?
git diff main...HEAD --stat      # branch has diverged from main?

If any check fails, fix it before proceeding. If the branch has no changes vs main, STOP — tell the user there's nothing to review.

Step 2: Deep Code Review with Parallel Agents

Spawn 3 parallel agents to review the diff against the base branch:

  1. Security & Safety Agent — OWASP top 10, injection risks, hardcoded secrets, unsafe deserialization, auth gaps
  2. Code Quality Agent — Dead code, duplicated logic, unused imports, spaghetti control flow, naming inconsistencies, missing error handling
  3. Architecture & Performance Agent — Circular dependencies, N+1 queries, missing indexes, oversized payloads, wrong abstraction level

Each agent should:

  • Read the full diff: git diff main...HEAD
  • Read any files that need full context
  • Return findings as a prioritized list with severity (critical/high/medium/low)

Step 3: Consolidate & Fix

Merge all agent findings into a single prioritized list. Then:

  1. Fix all critical and high issues — these are blockers
  2. Fix medium issues if the fix is straightforward (< 5 lines)
  3. Note low issues but skip them unless trivial
  4. Do NOT fix cosmetic-only issues that don't affect correctness

Step 4: Run Full Test Suite

cd brainiac && python -m pytest tests/ -v
cd contextscore && pytest tests/ -v
cd cortex && npm test

If tests fail: diagnose root cause, fix source code, re-run. Do not proceed until all tests pass.

Step 5: Create PR

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 80 lines · 23 tokens per session scan A 534a060650da

Subscribe to this mod's changes

review-and-ship is a command published in the GitHub repository Peaky8linders/claude-cortex (11 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 718 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.