brainstorm
Runs a structured design conversation — clarifies intent, proposes 2-3 approaches with trade-offs, iterates the design — and writes a user-approved engineering…
Reviews local changes, an open PR/MR, or a branch diff against the project's own coding guidelines through the review lenses — bugs, security, guidelines, architecture, simplification, plus test coverage and API contracts when relevant — inline on a small diff, in parallel
$ npx -y skills add oprogramadorreal/optimus-claude --skill code-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/code-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Reviews local changes, an open PR/MR, or a branch diff against the project's own coding guidelines through the review lenses — bugs, security, guidelines, architecture, simplification, plus test coverage and API contracts when relevant — inline on a small diff, in parallel
description: >- Reviews local changes, an open PR/MR, or a branch diff against the project's own coding guidelines through the review lenses — bugs, security, guidelines, architecture, simplification, plus test coverage and API contracts when relevant — inline on a small diff, in parallel agents on a larger one. Excludes style and linter-catchable issues. Read-only: applies fixes or posts PR/MR comments only on explicit approval. For an iterative auto-fix loop, use /optimus:deep review. disable-model-invocation: true argument-hint: "[--pr N | --branch | path]"
Analyze local git changes (or a PR/MR) against the project's coding guidelines through the review lenses in Step 5 — inline on a small diff, in parallel agents on a larger one. Out of scope: style concerns, subjective preferences, and anything a linter already catches.
**Multi-repo**: if `git rev-parse --is-inside-work-tree` does not return `true`, read `$CLAUDE_PLUGIN_ROOT/skills/init/references/multi-repo-detection.md` and apply it. When it returns `true`, resolve the repository root with `git rev-parse --show-toplevel`, including in a linked worktree or subdirectory. In a workspace, run Step 3's git commands inside each child repo, PR/MR mode requires the user to name a repo, and Step 4 loads each repo's docs independently; if changed files map to no child repo, ask which repo's context applies.
**Prerequisites**: if `.claude/CLAUDE.md` or `.claude/docs/coding-guidelines.md` is missing, recommend `/optimus:init` first. On the user's choice to continue, fall back to the bundled baseline: read `$CLAUDE_PLUGIN_ROOT/skills/init/templates/docs/coding-guidelines.md` and review against it plus general best practices for the detected stack — a shared, versioned anchor keeps findings reproducible where ad-hoc judgment would not. Note in the report that findings are generic, not project-specific.
If your invocation prompt body contains `HARNESS_MODE_INLINE`, you are running inside the `/optimus:deep` orchestrator as a single iteration. Read `$CLAUDE_PLUGIN_ROOT/references/harness-mode.md` and follow it — that reference governs which of the steps below run, how scope and agent prompts are overridden, and how this run ends.
If `HARNESS_MODE_INLINE` is NOT present, continue with the standard interactive flow below.
**Local changes (default)**: gather staged + unstaged + untracked via `git diff --cached`, `git diff`, and `git status --short`. If local changes exist, review them.
**No local changes → auto-route** (no user prompt):
1. Detect the platform per the **Platform Detection Algorithm** in `$CLAUDE_PLUGIN_ROOT/skills/pr/references/platform-detection.md`. 2. Check for an open PR/MR on the current branch: GitHub `gh pr view --json number,state,baseRefName` (use only when `state` is `"OPEN"`); GitLab `glab mr view --output json` (use `iid`/`target_branch` only when `state` is `"opened"`; a failed command means no MR — unless it looks like an auth or connectivity error, in which case tell the user before falling back). Platform unknown: try both, use the first confirmed open PR/MR. 3. Base = the PR/MR target branch; with no open PR/MR or no CLI, detect the default branch per `$CLAUDE_PLUGIN_ROOT/skills/pr/references/default-branch-detection.md`. If detection fails, ask the user for a base ref — never guess; if they have none, report there is nothing to review. 4. Run `git log --oneline origin/<base>..HEAD`; if commits exist, route (branch diffs use Branch/ref mode with `<ref>` = `origin/<base>`; for GitLab say "MR !N" instead of "PR #N"):
**Nothing at all** → inform the user there are no changes to review; suggest staging changes or specifying a PR.
Entered on explicit request or via the auto-route. Detect the platform per the **Platform Detection Algorithm** (including **Signal Conflict Resolution**) in `$CLAUDE_PLUGIN_ROOT/skills/pr/references/platform-detection.md`; if unknown, ask the user.
| | GitHub | GitLab | |---|---|---| | Metadata | `gh pr view <N> --json state,isDraft,title,body,baseRefName,headRefName,headRefOid` | `glab mr view <N> --output json` | | `pr-description` fields | `title` + `body` | `title` + `description` | | Diff | `gh pr diff <N>` | `glab mr diff <N>` | | Head SHA field | `headRefOid` | `sha` | | Checkout | `gh pr checkout <N>` | `glab mr checkout <N>` |
Repo: oprogramadorreal/optimus-claude
Runs a structured design conversation — clarifies intent, proposes 2-3 approaches with trade-offs, iterates the design — and writes a user-approved engineering…
Stages, commits, and optionally pushes local changes with a Conventional Commits message — always previews and confirms first, and offers a feature branch on…
Runs an iterative auto-fix loop on a chosen target — review, refactor, or coverage — dispatching the base skill into fresh subagent contexts per iteration,…
Prunes and consolidates the project's auto-memory to keep it minimal — deletes stale, wrong, or redundant memories, merges overlapping ones into existing…
Runs a Gauntlet Loop: turns an ambitious goal and optional quality references into a minimal builder/critic prompt judged against a concrete comparison bar,…
Compacts the current conversation into one self-contained, tool-agnostic handoff document at docs/handoffs/<slug>.md so any fresh agent or teammate can resume…