fix

fix is a command for Claude Code from TOMOSIA-VIETNAM/open-pr. It costs 35 tokens per session (2,599 once invoked), scanned A, original, MIT.

A command that applies selected findings from a pull-request review by editing the local code, creating one commit, and replying after the change is pushed.

In plain words
What is it for?
Use it when you want to accept or decline review findings and update the matching pull-request branch.
Why use it?
It defines strict checks and limits for a higher-risk workflow, including which findings require a decision and which Git operations are forbidden.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the open-pr plugin — 5 commands shipped together

Good fit Use it when you want to accept or decline review findings and update the matching pull-request branch.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add TOMOSIA-VIETNAM/open-pr
Claude Code
/plugin install open-pr

Made for: Claude Code.

Or install open-pr, the plugin that ships this one along with the rest of its 5 commands.

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 fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/tomosia-vietnam/open-pr/fix.svg)](https://agentmods.dev/commands/tomosia-vietnam/open-pr/fix)
Your own site
<a href="https://agentmods.dev/commands/tomosia-vietnam/open-pr/fix"><img src="https://agentmods.dev/badge/commands/tomosia-vietnam/open-pr/fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,599 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.00035 $0.02599
Opus 5 $0.00017 $0.01300
Sonnet 5 $0.00007 $0.00520
Haiku 4.5 $0.00003 $0.00260

Measured 8d ago against content hash 4ec608ced7da, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

fix 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 8d 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.

src/commands/fix.md · 190 lines

How it starts

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

CRITICAL: Read "${CLAUDE_PLUGIN_ROOT}"/core/guardrails.md FIRST — shared rules, not repeated here. On top of those:

  • This command EDITS REAL CODE at pwd, then commits/pushes — higher risk than the read-only /open-pr:review. Step 1 MUST run BEFORE ANY other action. FORBIDDEN: "helpfully" fixing the remote/branch just to pass it.
  • FORBIDDEN: git commit --amend, git push --force/--force-with-lease, git add -A/git add ., git branch -D, git reset --hard, resolving a PR thread, editing/committing when the PR's branch is protected or the remote/branch doesn't match the PR, deciding alone on a 🔵/📝 finding, checking out the PR/MR, git worktree add/remove, close/merge/reopen, creating a review/draft-note batch (this command only replies; posting is review.md's job). cd/find are allowed ONLY to self-locate the project directory (Step 1a), and only once git remote proves the match — never by directory name. This bullet + the one above are the SOLE enforcement layer — no allowed-tools backs them (deliberate).

Step 0 — Target

Read "${CLAUDE_PLUGIN_ROOT}"/core/pr-target.md, taking its no-store branch (§2): this command never persists git_remote_type, it uses <vendor_guess> as-is. Usage: block:

❌ Error: No PR URL provided.
Usage: /open-pr:fix <PR URL> [content]
Example (GitHub): /open-pr:fix https://github.com/org/repo/pull/123
Example (GitLab): /open-pr:fix https://gitlab.com/org/repo/-/merge_requests/123
Example with instructions: /open-pr:fix https://github.com/org/repo/pull/123 only fix the security part

Free-form text outside the URL narrows this run's scope (Step 3 item 3).

No URL → take the PR THIS session already establishes (its review ran here, the user named it, pwd is its worktree), say which in 1 short sentence, continue. NOT exactly 1 ⇒ print the Usage: block. FORBIDDEN: guessing past it.

Context

Fetch:

entry label
"Fetch PR basic info", fields number,headRefName,baseRefName PR info
"Fetch PR review comments (LINE-level findings)" Comments
"Fetch PR reviews (FILE-level findings + review_id)" Reviews
"Fetch account running the command" Account running this command
"Fetch review threads (id + isResolved + comment ids)" Review threads

Read the full file on GitHub · 190 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. 8d ago First seen · 190 lines · 35 tokens per session scan A 4ec608ced7da

Subscribe to this mod's changes

fix is a command published in the GitHub repository TOMOSIA-VIETNAM/open-pr (42 stars, last pushed 2d ago), licensed MIT. It adds 35 tokens to every session and 2,599 once invoked, about $0.0002 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.