release-now
Create a git tag + GitHub Release for open-pr — an official release if standing on main, an RC if standing on a branch with an open PR (a dev tool specific to…
Review PRs against the conventions learned from each repo — 1 post per PR, findings tagged by severity, code left untouched.
> /plugin marketplace add TOMOSIA-VIETNAM/open-pr > /plugin install open-pr@open-pr
How it fires
How this command gets triggered: by you, by Claude, or both.
/reviewContext preview
What this command does when you run it.
Review PRs against the conventions learned from each repo — 1 post per PR, findings tagged by severity, code left untouched.
argument-hint: "<PR URL> [other PR URL...] [content]" description: Review PRs against the conventions learned from each repo — 1 post per PR, findings tagged by severity, code left untouched.
> **CRITICAL:** `Read` `"${CLAUDE_PLUGIN_ROOT}"/core/guardrails.md` and `core/cli.md` FIRST — shared > rules + the `<op>` runtime, not repeated here. `<op>` ≡ `sh "${CLAUDE_PLUGIN_ROOT}"/bin/open-pr.sh`, > exactly as THIS line spells it — no env var exists in the shell. On top of those: > - Read-only on the reviewed repo; the only write is Step 9's 1 review (+ 1 more on a submodule PR > when Step 1 detects a bump). FORBIDDEN: close/merge/reopen, create/delete/switch a branch, push, > edit code → mention it in the review instead. > - The worktree may surface the REVIEWED repo's own `.claude/skills/` — its dev workflow, not a > review tool. FORBIDDEN: invoking it, even when listed as available.
`<op> target <url>` → `vendor/owner/repo/pull_number/host`; exit 4 or no URL → print:
❌ Error: No PR URL provided. Usage: /open-pr:review <PR URL> Example (GitHub): /open-pr:review https://github.com/org/repo/pull/123 Example (GitLab): /open-pr:review https://gitlab.com/org/repo/-/merge_requests/123
`Read` `"${CLAUDE_PLUGIN_ROOT}"/core/pr-target.md` — vendor reconciliation, `<repo>`, free-form-text rule, empty-"PR info" stop. A language instruction in `ARGUMENTS`/chat overrides `.shared.output_language`, this run only.
**≥2 valid PR URLs** && the intent isn't already clear from `ARGUMENTS`/chat → ask "Found N PRs — review all N or just the first?", WAIT (extras may be reference-only). Confirmed multi-PR → run Step 0 → Step 9 to COMPLETION per URL, SEQUENTIALLY, each with its own worktree/memory/post. FORBIDDEN: parallel, subagent. `[content]` applies to every PR. All done → 1 chat summary, 1 line per PR, shaped by Step 9's reporting rule; nothing further posted.
`<op> settings --repo <repo>` → this run's resolved config (`core/repo-settings.md` names what each field means). `<vendor>` MUST be reconciled (`core/pr-target.md` §2) BEFORE the next call. Then ONE call fetches everything — `<op> context` with `--max-patch-bytes` = `big_file_threshold_kb` × 1024; its `## <label>` sections are what later Steps name. Any path "Diff size per file" lists that "Diff" lacks is an omitted file → carry to Step 7 as **"Oversized paths"**. "CI checks" stays unfiltered — Step 7 and `setup/bootstrap.md` q6 each read the raw list.
**Filesystem:** `<op> locate-repo` → `<repo_dir>`; exit 5 → ask with a CHOICE in plain language — name the N directories found and why each might be it — STOP if unresolved. FORBIDDEN: `cd`. Everything this command writes — `notebooks/review/<repo>/`, the worktree, `.gitignore` — is relative to pwd: 1 workspace ⇒ 1 `notebooks/review/` for every repo reviewed from it. Before writing under `notebooks/review/` → state pwd + `<repo>` in chat. No `notebooks/review/` line in `.gitignore` at pwd → add exactly that line.
`<op> checkout` with `--head-sha` = "Head SHA", `--base` = `baseRefName`, `--repo-dir <repo_dir>` → `worktree=<path>`; PR code on disk, main tree untouched, gated to the commit the "Diff" was read at. `Read`/`Grep` at `<worktree>/<path>`. Exit 2 ⇒ STOP, print both SHAs + `<worktree>` and that `/open-pr:clean` removes it. Exit 3 ⇒ STOP with its stderr. FORBIDDEN: retrying past the script's own retry, or comparing against a freshly fetched SHA — that hides the stale diff.
Then try `Read`ing `<worktree>/.gitmodules` — every run, never cached. Exists && "Diff" carries `Subproject commit` → `Read` `"${CLAUDE_PLUGIN_ROOT}"/cases/submodule-review.md`.
`<op> stacks --repo-dir <repo_dir> <every "Files" path>` → keep the `(file, stacks)` mapping for Steps 4-7; judge `.md` lines per `core/cli.md`.
From the Context `settings` call: resolve `chat_language` per `core/repo-settings.md`; `doctor_due` is already computed. `<vendor>` is already reconciled, never re-asked. Persisting it:
(`/open-pr:upgrade` owns that backfill); a confirmed mismatch was already persisted at §2
Branch:
`"${CLAUDE_PLUGIN_ROOT}"/setup/bootstrap.md`, then `setup/doctor.md`
Setup stable ⇒ don't touch `notebooks/review/` outside Step 4 (new template), Step 6 (lesson), or a due doctor.
Each Step 2 stack absent from `.review.templates_copied` → `Read` `"${CLAUDE_PLUGIN_ROOT}"/setup/template.md`, follow it. Present → use `notebooks/review/<repo>/templates/<stack>.md`. Runs every time: a new stack can appear post-bootstrap.
`Read` `"${CLAUDE_PLUGIN_ROOT}"/core/review-criteria.md`; load every layer it names for Step 2's stacks.
"Old comments" non-empty → `Read` `"${CLAUDE_PLUGIN_ROOT}"/cases/re-review.md`; it also gates whether Step 8/9 post at all. Empty (brand-new PR) → skip to Step 7.
**Large-diff guard, before anything else here:** count("Files") > `many_files_threshold` || "Oversized paths" (Context) non-empty || any "Diff size per file" entry > `big_file_threshold_kb` KB or `UNKNOWN` → `Read` `"${CLAUDE_PLUGIN_ROOT}"/cases/large-diff-guards.md`, follow it (it may STOP the command). Neither → proceed.
**Overview items** — never counted toward N, never entered into `comments[]`:
FORBIDDEN: writing it for them.
AI code review that lands on the PR, not in your terminal — GitHub, GitLab, Bitbucket. Learns each repo's conventions: 1 review, 1 fix commit, replies in thread. Claude Code · Cursor · Codex · Gemini CLI · Antigravity.
Create a git tag + GitHub Release for open-pr — an official release if standing on main, an RC if standing on a branch with an open PR (a dev tool specific to…
Remove the git worktrees review checked PR code out into. Each one is a full checkout on disk; nothing else is touched.
Report a problem with the open-pr plugin itself, or ask for a change, on its public issue tracker. Reads no PR; writes nothing in your repo.
Act on the findings a review left on a PR — takes or declines each by severity, edits code at pwd to match the project, 1 commit, replies once pushed.
Bring every per-repo config found below pwd up to the schema this build expects. Takes no PR.