auto-fix

auto-fix is a command for Claude Code from allsmog/vuln-scout. It costs 21 tokens per session (613 once invoked), scanned A, original, MIT.

A command that creates patches for security problems already marked as verified. It can apply one fix or several selected fixes, with an optional pull request—a proposed code change for review.

In plain words
What is it for?
Fixing a specific finding, fixing verified critical or high-severity findings, previewing changes with a dry run, opening a pull request, and checking that the issue is gone afterward.
Why use it?
It reduces the manual work of turning confirmed security findings into code changes while keeping unconfirmed findings untouched and requiring human review.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the vuln-scout plugin — 32 skills, 15 commands, 9 agents shipped together

Good fit Fixing a specific finding, fixing verified critical or high-severity findings, previewing changes with a dry run, opening a pull request, and checking that the issue is gone afterward.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/allsmog/vuln-scout/auto-fix
Install

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.

Clone the repo
git clone --depth 1 https://github.com/allsmog/vuln-scout

Made for: Claude Code.

Or install vuln-scout, the plugin that ships this one along with the rest of its 32 skills, 15 commands, 9 agents.

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 auto-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/allsmog/vuln-scout/auto-fix/github.svg)](https://agentmods.dev/commands/allsmog/vuln-scout/auto-fix)
Your own site
<a href="https://agentmods.dev/commands/allsmog/vuln-scout/auto-fix"><img src="https://agentmods.dev/badge/commands/allsmog/vuln-scout/auto-fix/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 auto-fix

Your own site · 80×15
<a href="https://agentmods.dev/commands/allsmog/vuln-scout/auto-fix"><img src="https://agentmods.dev/badge/commands/allsmog/vuln-scout/auto-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 613 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.00021 $0.00613
Opus 5 $0.00010 $0.00307
Sonnet 5 $0.00004 $0.00123
Haiku 4.5 $0.00002 $0.00061

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

Security

Grade A, and why

auto-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 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.

vuln-scout/commands/auto-fix.md · 74 lines

What it actually says

Auto-Fix Security Findings

Automatically generate and apply patches for verified security findings. Uses the patch-advisor agent to create context-aware fixes.

Usage

/vuln-scout:auto-fix --finding VSCOUT-0003
/vuln-scout:auto-fix --all-verified --severity critical,high
/vuln-scout:auto-fix --all-verified --dry-run
/vuln-scout:auto-fix --all-verified --create-pr

Flags

Flag Effect
--finding Fix a specific finding by ID
--all-verified Fix all verified findings
--severity Filter to specific severities (comma-separated)
--dry-run Show proposed patches without applying
--create-pr Create a git branch and open a PR with the fixes

Safety

  • Only operates on verdict: verified findings (never patches unverified code)
  • Always shows the proposed change before applying (unless --create-pr in batch mode)
  • Never auto-merges PRs -- always requires human review
  • Re-scans after patching to verify the fix eliminated the finding

Workflow

Step 1: Load findings

Read .claude/findings.json. Filter to verdict: "verified" findings matching the specified criteria.

Step 2: Generate fixes

For each selected finding:

  1. Read the vulnerable code context (file + surrounding lines)
  2. Use the patch-advisor agent's remediation knowledge to generate a fix
  3. Show the before/after diff to the user

Step 3: Apply patches

If not --dry-run:

  1. Apply the code change using the Write tool
  2. Re-run scan on the modified file to verify the finding is resolved
  3. If the finding persists, warn the user and revert

Step 4: Create PR (if --create-pr)

BRANCH="vuln-scout/auto-fix-$(date +%Y%m%d-%H%M%S)"
git checkout -b "$BRANCH"
git add <modified-files>
git commit -m "fix(security): remediate <finding-ids> [vuln-scout auto-fix]"
gh pr create --title "Security: Auto-fix <N> findings" --body "<details>"
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 · 74 lines · 21 tokens per session scan A a9d1d25c8e0f

Subscribe to this mod's changes

auto-fix is a command published in the GitHub repository allsmog/vuln-scout (24 stars, last pushed 2mo ago), licensed MIT. It adds 21 tokens to every session and 613 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.