Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/sanmak/specops/pr-fixgit clone --depth 1 https://github.com/sanmak/specopsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.08595 |
| Opus 5 | $0.00000 | $0.04297 |
| Sonnet 5 | $0.00000 | $0.01719 |
| Haiku 4.5 | $0.00000 | $0.00860 |
Grade A, and why
pr-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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 664 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fetch inline review comments from a GitHub PR, group by issue type, apply fixes, and push — all in an isolated git worktree. Supports watch submode for PR babysitting and all submode to fix every open PR with review comments.
Instructions
Follow these steps precisely. Do NOT add a Co-Authored-By line to commits.
Argument Parsing
Compact-state recovery pre-check: After detecting mode and PR target below, check for a matching compact state file. For fix mode, check .claude/.pr-fix-compact-state-<PR_NUMBER>.json. For all mode, check .claude/.pr-fix-compact-state-all.json. If the file exists and its saved mode and pr_number (or pr_list) match the current invocation, restore all state variables from the file and skip any already-completed steps. The compact state file is deleted at the end of a successful run (see Step 9 / Step A6).
Parse $ARGUMENTS for one of three modes:
Global flag — --minor: If --minor is present anywhere in $ARGUMENTS, set INCLUDE_MINOR = true and strip it before further parsing. Default: INCLUDE_MINOR = false. When false, CodeRabbit comments with _🟡 Minor_ severity are filtered out in Step 4a. When true, all severities are processed.
Parse the remaining $ARGUMENTS for one of three modes:
- Fix mode (default):
$ARGUMENTSis a PR number (e.g.,3) or empty. - Watch mode:
$ARGUMENTSstarts withwatchfollowed by a PR number (e.g.,watch 3). - All mode:
$ARGUMENTSstarts withall, optionally followed by--dry-runand/or a number limit (e.g.,all,all --dry-run,all 3,all --dry-run 3).
All modes support --minor (e.g., /pr-fix 3 --minor, /pr-fix watch 3 --minor, /pr-fix all --minor --dry-run 3).
If watch mode is detected, skip to the Watch Mode section below. If all mode is detected, skip to the All Mode section below.
For fix mode, extract the PR number from $ARGUMENTS. If empty, try auto-detection: gh pr view --json number -q .number 2>/dev/null. If auto-detection fails, ask the user "Which PR number should I fix?" and wait for their response.
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.
- 2d ago First seen · 664 lines · 0 tokens per session scan A 79e301639cb2
pr-fix is a command published in the GitHub repository sanmak/specops (49 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 8,595 tokens. 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.
Other commands, from other repositories
ijfw-audit
Run the IJFW audit gate for the current workflow phase. Usage: /ijfw-audit [phase name].
ijfw
IJFW command index. Groups commands by intent: Build / Remember / Ship / Review / Configure.
_registry-protocol
This protocol is MANDATORY for ALL commands, agents, and phases.
reqforge-greenkeeper
Diagnose and fix ReqForge repository release gate failures.
evolution-engine
Scan feedback and generate evolution proposals for rule/skill upgrades.
implement-fastapi-routes
The file docstring contains a description of the FastAPI routes we need to implement. Implement these routes.