run-and-fix

run-and-fix is a command for Claude Code from paulbaranowski/wild-horses. It costs 65 tokens per session (6,762 once invoked), scanned A, original, MIT.

A command that runs Pyright on Python code and fixes the type errors it reports. Pyright is a tool that checks whether Python code uses types consistently.

In plain words
What is it for?
It is for running scoped or strictness-controlled checks, applying known fixes, handling library typing issues, and reviewing optional improvement suggestions.
Why use it?
It turns a type-checking report into a systematic repair process based on documented patterns, while flagging findings that may indicate real bugs.

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 pyright plugin — 1 command shipped together

Good fit It is for running scoped or strictness-controlled checks, applying known fixes, handling library typing issues, and reviewing optional improvement suggestions.

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 paulbaranowski/wild-horses
Claude Code
/plugin install pyright

Made for: Claude Code.

Or install pyright, the plugin that ships this one along with the rest of its 1 command.

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 run-and-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/paulbaranowski/wild-horses/run-and-fix/github.svg)](https://agentmods.dev/commands/paulbaranowski/wild-horses/run-and-fix)
Your own site
<a href="https://agentmods.dev/commands/paulbaranowski/wild-horses/run-and-fix"><img src="https://agentmods.dev/badge/commands/paulbaranowski/wild-horses/run-and-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 run-and-fix

Your own site · 80×15
<a href="https://agentmods.dev/commands/paulbaranowski/wild-horses/run-and-fix"><img src="https://agentmods.dev/badge/commands/paulbaranowski/wild-horses/run-and-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,762 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.00065 $0.06762
Opus 5 $0.00032 $0.03381
Sonnet 5 $0.00013 $0.01352
Haiku 4.5 $0.00006 $0.00676

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

Security

Grade A, and why

run-and-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 11d 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.

plugins/pyright/commands/run-and-fix.md · 376 lines

How it starts

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

Pyright: Run and Fix

Run pyright on the Python code in this project and fix the errors it finds, following the rule-specific patterns in the bundled playbook.

Pattern catalog. The playbook is split across five files at ${CLAUDE_PLUGIN_ROOT}:

  • reference.md — index, setup, triage, suppression policy, narrowing artifacts, documented-API preference, CI, parallel dispatch, external-finding verification, editor-autofix warning, serialization compat, config-intent principle, assert-vs-raise, consolidation pass (orchestrator-level).
  • rules.md — fix recipes keyed on pyright rule name (reportOptionalMemberAccess, reportArgumentType, reportTypedDictNotRequiredAccess, …).
  • libraries.md — library-stub workarounds (bitstring, scipy, tornado, matplotlib, Beanie, Supabase, litellm, pydantic, PIL, tenacity, pymongo, …).
  • bugs.md — signals that pyright has uncovered a real bug (to flag for the user, not silence).
  • suggestions.md — Phase 5 "Suggested improvements" procedure: signals to combine, sort order, save flow.

Read reference.md at the start of the run for the index and the triage/policy framework. Re-consult rules.md and libraries.md when triage surfaces specific rules or library names. If ${CLAUDE_PLUGIN_ROOT} isn't substituted in this context, find the files with Glob "**/pyright/reference.md" and read the siblings alongside it.

Arguments: "$ARGUMENTS"


Phase 1 — Parse args and verify setup

Step 1: parse $ARGUMENTS

Expected tokens, all optional:

  • Positional level ∈ {basic, standard, strict}. Overrides the config's typeCheckingMode for this invocation.
  • --persist — if a level is given and the run reaches zero errors, write that level back to config.
  • --ratchet — climb basicstandardstrict, fixing to zero at each rung. Mutually exclusive with an explicit level; implies --persist at each rung.
  • --scope <path> — restrict pyright invocation and fix work to a subpath. Default: the config's include.
  • --intent <silence|improve|bugs-only> — declares the lean Phase 3 should take when fixing errors. See Phase 3 § "Apply the chosen intent" for the full, authoritative definitions. If omitted, the command prompts in Phase 2 after showing triage.
  • --no-suggestions — skip the "Suggested improvements" section in Phase 5. Default: include it.

Read the full file on GitHub · 376 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. 11d ago First seen · 376 lines · 65 tokens per session scan A f88c65fef8f0

Subscribe to this mod's changes

run-and-fix is a command published in the GitHub repository paulbaranowski/wild-horses (12 stars, last pushed 23d ago), licensed MIT. It adds 65 tokens to every session and 6,762 once invoked, about $0.0003 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.