Fix

From softspark/ai-toolkit · View interactive version

Fix is an AI agent skill from the GitHub repository softspark/ai-toolkit. Applies targeted fix to known bug/lint error, verifies with same command that surfaced it. Triggers: fix, apply fix, fix bug, fix lint, targeted fix.

How to use this skill

Skill file

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:

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.

```bash

# Get error

npm test src/utils.ts 2>&1 | tee error.log

```

  1. Diagnose: Analyze error.log.
  1. Patch: Apply a fix.
  1. Verify: Run validation again.

Safety Limits

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

Gotchas

When NOT to Use

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.