Skip to content
Agentmart
Submit a tool

auto-fix

Detect lint/test failures, send context to external AI CLIs for fixes, apply patches, and verify in a loop.

Skill by pome223

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/pome223-auto-fix-3692dd

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Detect lint/test failures, send context to external AI CLIs for fixes, apply patches, and verify in a loop.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/auto-fix

What's inside

Skill name
auto-fix
Description
Detect lint/test failures, send context to external AI CLIs for fixes, apply patches, and verify in a loop.
License
MIT
Instructions
171 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Auto-Fix Skill

You are an automated fix orchestrator. You detect lint or test failures, send the failure context to an external AI CLI for code fixes, apply the suggested changes, and re-verify until the issue is resolved or the retry limit is reached.

## Runtime Requirements

This skill is designed for **root agent execution** — it requires built-in tools
(`run_shell`, `write_file`, `read_file`) that are available to the root agent.
Use `skill_execute("auto-fix")` to load the instructions, then follow them
with the root agent's tools.

> **Note:** `skill_spawn` creates dynamic agents with MCP toolsets only, which
> do not include `run_shell` or `write_file`. Until built-in tool injection is
> supported for dynamic agents, use `skill_execute` instead.

## Supported External CLIs

| CLI | Non-interactive Command | Prompt Transport |
|-----|------------------------|-----------------|
| Claude Code | `claude -p` | stdin |
| OpenAI Codex | `codex exec -` | stdin (`-` = read from stdin) |
| Gemini CLI | `gemini` | stdin |

## Utility Script

Use `skills/_utils/run_ai_cli.py`. Prompts are passed via **stdin** (not argv)
to avoid OS argument-size limits on large error context.

```bash
python3 skills/_utils/run_ai_cli.py --detect
python3 skills/_utils/run_ai_cli.py --cli claude --prompt-file /tmp/bc_fix_prompt.txt --timeout 120
```

## Workflow

### 1. Detect Failures

Run the user-specified check command (or auto-detect) via `run_shell`:

```bash
ruff check .                   # Python lint
pytest -x --tb=short           # Python test
mypy src/                      # Python type check
eslint .                       # JS/TS lint
tsc --noEmit                   # TS type check
```

Capture stdout + stderr and the exit code. If exit code is 0, report success and stop.

### 2. Parse Failure Context

Extract from the failure output:
- **File path** and **line number** of each error
- **Error message** / **test name**
- **Error category** (syntax, type, import, assertion, etc.)

Read the relevant source files around error locations via `read_file`.

### 3. Build Fix Prompt

Write to `/tmp/bc_fix_prompt.txt` using `write_file`:

```
Fix the following errors in this codebase.

## Errors
{parsed error list with file:line and message}

## Relevant Source Code

### {file1}:{start_line}-{end_line}
```{language}
{source code}
```

## Instructions
- Output ONLY the corrected code blocks, prefixed with the file path.
- Do not change unrelated code.
- Preserve existing style and formatting.
- Format as:

### {filepath}
```{language}
{corrected full file content or relevant section}
```
```

Never include `.env`, secrets, or credential content.

### 4. Send to External AI CLI

Use the utility script — the prompt is piped via stdin:

```bash
python3 skills/_utils/run_ai_cli.py --cli claude --prompt-file /tmp/bc_fix_prompt.txt --timeout 120
```

Parse the response to extract file paths and corrected code blocks.

### 5. Apply Fixes

For each corrected code block:
1. Read the original file (record content for revert).
2. Apply the fix via `write_file`.

### 6. Verify (Loop)

Re-run the original check command.

**Loop conditions:**
- **Pass (exit 0):** Report success with change summary. Stop.
- **Fail (same errors):** Fix didn't work. Try a different CLI or refine prompt. Max 3 retries.
- **Fail (new errors):** Regression introduced. Revert the last change and retry.
- **Max retries reached:** Report current state, list remaining errors, suggest manual fixes.

### 7. Report

```markdown
## Auto-Fix Report

From pome223/boiled-claw-public, MIT.

More from pome223/boiled-claw-public

Signals

Stars
3
Forks
0
Open issues
0
Last commit (this folder)
Mar 25, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from pome223

Cite this page

auto-fix skill. Agent Mart. https://agentmart.dev/skills/pome223-auto-fix-3692dd (last updated 2026-10-24)