fix

fix is a skill for Claude Code from softspark/ai-toolkit. It costs 38 tokens per session (1,140 once invoked), scanned A, original, Apache-2.0.

A guided code-fixing workflow for known bugs and lint errors. It classifies reported errors, applies likely automatic fixes first, and checks the result with the command that found the problem.

In plain words
What is it for?
Fixing bugs, formatting problems, unused imports, and other errors reported by tools such as Ruff, mypy, ESLint, TypeScript, or PHPStan.
Why use it?
It reduces the manual work of sorting errors and checking whether a targeted fix worked.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the ai-toolkit plugin — 113 skills, 44 agents, 14 hooks shipped together

Good fit Fixing bugs, formatting problems, unused imports, and other errors reported by tools such as Ruff, mypy, ESLint, TypeScript, or PHPStan.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/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.

Any agent
npx skills add softspark/ai-toolkit --skill fix
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 113 skills, 44 agents, 14 hooks.

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/skills/softspark/ai-toolkit/fix.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/fix)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/fix"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,140 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 31
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00038 $0.01140
Opus 5 $0.00019 $0.00570
Sonnet 5 $0.00008 $0.00228
Haiku 4.5 $0.00004 $0.00114

Measured 4d ago against content hash 5cb4e2f97477, 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/error-classifier.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

app/skills/fix/SKILL.md · 104 lines

How it starts

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

Fix Command

$ARGUMENTS

Attempts to fix code errors autonomously.

Usage

/fix <file_or_scope>
# Example: /fix src/utils.ts

Automated Error Classification

Before entering the fix loop, classify errors to prioritize auto-fixable ones:

# Pipe lint or test output
ruff check . 2>&1 | python3 ${CLAUDE_SKILL_DIR}/scripts/error-classifier.py
mypy src/ 2>&1 | python3 ${CLAUDE_SKILL_DIR}/scripts/error-classifier.py
npx eslint . 2>&1 | python3 ${CLAUDE_SKILL_DIR}/scripts/error-classifier.py

The script outputs JSON with:

  • total_errors: count of all parsed errors
  • auto_fixable_count: errors that tools can fix automatically (e.g., F401 unused imports, formatting)
  • manual_count: errors requiring human/agent intervention
  • tools_detected: which linters produced the output (ruff, mypy, eslint, tsc, phpstan)
  • errors[]: each error with file, line, code, message, and auto_fixable flag
  • suggested_order: files to fix, auto-fixable first
  • fix_strategy: recommended approach (auto-fix first, then manual)

Use this to run auto-fixers (e.g., ruff check --fix .) before spending time on manual fixes.


Protocol (The "Fix Loop")

  1. Analyze: Run validation to get the exact error message.

    # Get error
    npm test src/utils.ts 2>&1 | tee error.log
    
  2. Diagnose: Analyze error.log.

    • Use debugging-tactics skill.
    • Trace the error to the source line.
  3. Patch: Apply a fix.

    • Use sed or write_file.
  4. Verify: Run validation again.

    • If PASS: Stop.
    • If FAIL: Repeat (Max 3 retries).

Safety Limits

  • Max Retries: 3
  • Scope: Only modify the specified files.
  • Stop Condition: If new errors appear that are totally different, STOP and ask user.

Example Flow

User: /fix app.py
Agent: Running tests... FAIL (NameError)
Agent: Fixing app.py (Import missing module)
Agent: Running tests... PASS
Agent: Fixed NameError in app.py

Rules

  • MUST know the exact symptom (error message, failing test, lint code) before editing — guessing is not fixing
  • MUST verify the fix by rerunning the same command that exposed the problem, not a different validator
  • NEVER modify tests to make them pass — fixing the test is not fixing the bug
  • NEVER touch files outside the declared scope — scope creep hides regressions
  • CRITICAL: hard-stop after 3 iterations. If the fix loop has not converged, the problem is deeper than /fix handles — escalate to /debug.
  • MANDATORY: if new, unrelated errors appear during a fix attempt, stop and ask the user — do not chase them

Read the full file on GitHub · 104 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 104 lines · 38 tokens per session scan A 5cb4e2f97477

Subscribe to this mod's changes

fix is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed today), licensed Apache-2.0. It adds 38 tokens to every session and 1,140 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-09-03.

Related

Other skills, from other repositories

cline-fix-volatile-msg

Ladder-aware Cline Anthropic caching — verify the rolling read/write ladder on the wire, then add the tools breakpoint and tune TTL. Updated for the 2026-08 AI-SDK monorepo.

OnlyTerp/prompt-cache-skills · 50 tokens

continue-fix-volatile-msg

Ladder-aware Continue Anthropic caching — verify the rolling ladder on the wire, then enable it by default and add TTL coverage.

OnlyTerp/prompt-cache-skills · 33 tokens

opencode-detect-openai-compat

OpenCode's caching detection misses OpenAI-compatible proxies routing to Anthropic/Bedrock. Broaden the predicate.

OnlyTerp/prompt-cache-skills · 32 tokens

cline-pin-timestamp

Cline's system prompt includes a timestamp that may be recomputed per request, invalidating the system-prompt cache.

OnlyTerp/prompt-cache-skills · 29 tokens

log-analyzer

Senior-SRE log analysis specialist. Use when investigating incidents from logs, triaging error spikes, extracting timelines, correlating distributed traces, or separating signal from noise across plain-text, JSON (slog/zap), syslog, journald, container, and Kubernetes logs. ALWAYS use when the user asks to "analyze…

johnqtcg/awesome-skills · 138 tokens

incident-postmortem

Incident post-mortem specialist for writing blameless post-mortems, extracting timelines from logs/events, conducting root cause analysis (5-Why, fishbone), classifying severity, and generating tracked action items. ALWAYS use when writing a post-mortem, reviewing an incident, extracting a timeline, performing root…

johnqtcg/awesome-skills · 98 tokens