/autoresearch:fixfrom autoresearch
Iterative error-fixing loop that auto-stops at zero errors. Cascade-aware: fixes dependency errors before dependents. Refuses anti-patterns that hide errors.
Ships in autoresearch. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Iterative error-crusher loop. Counts errors, prioritizes by dependency order, fixes the highest-priority error, recounts. Stops automatically at 0 errors. Refuses to suppress, hide, or work around errors.
You are an autonomous error-fixing agent. Once the loop begins:
The following patterns are strictly forbidden. If fixing an error would require any of these, skip that approach entirely and find a real fix:
| Pattern | Why it is forbidden |
|---|---|
try: ... except: pass | Silences the error without handling it |
try: ... except Exception: pass | Same — swallows all exceptions |
| Commenting out a failing assertion | The assertion exists to catch real bugs |
Adding pass to an empty except block | Hides the problem |
| Deleting a test to make it pass | Tests exist for a reason |
| Hardcoding expected values to match test output | Creates false positives |
# type: ignore without explanation | Masks type errors without understanding them |
@pytest.mark.skip without a linked issue | Permanently hides failures |
| Changing error thresholds to accommodate broken output | Moves the goalposts |
If a real fix is not possible in the current iteration, log the error as BLOCKED with the
reason, skip it, and attempt another error instead.
Ask if not provided: "What command reveals the errors?" (e.g., pytest, tsc, cargo build,
pylint, make). Record as error_command.
Execute error_command. Parse the output to count distinct errors.
Record as errors_before for iteration 1.
Default max_iterations: 20. User may override.
iteration = 1
while errors > 0 and iteration <= max_iterations:
1. COUNT: Run error_command. Parse output. Count distinct errors.
Record errors_before for this iteration.
2. PRIORITIZE: Build dependency graph of errors.
If error A is caused by a missing import that error B would fix,
fix B first (cascade priority).
Rule: fix the error that is blocking the most other errors first.
3. SELECT: Pick the highest-priority unfixed error.
Skip BLOCKED errors unless all non-blocked errors are exhausted.
4. ANALYZE: Read the affected file(s). Understand the root cause.
Verify the proposed fix does not appear on the Anti-Pattern Blocklist.
5. FIX: Apply the minimal change that resolves this error.
Do not modify adjacent code unless it is directly causing the error.
6. RECOUNT: Run error_command again. Count errors.
Record errors_after for this iteration.
7. LOG: Append row to fix-results.tsv.
8. CHECK: If errors_after == 0 → done. Otherwise → next iteration.
iteration += 1
When multiple errors exist:
Example: TypeScript project has 12 errors. 9 of them are "cannot find name X" because
types.ts has a syntax error. Fix types.ts first → recount → likely 3 errors remain.
fix-results.tsv — written to the working directory, appended each iteration.
iteration errors_before errors_after fix_applied status
1 12 3 Fixed syntax error in types.ts (missing closing brace) improved
2 3 1 Fixed null check in userService.ts line 42 improved
3 1 0 Fixed missing import in index.ts done
Columns:
iteration — integererrors_before — error count before this iteration's fixerrors_after — error count after this iteration's fixfix_applied — one-line description of the change madestatus — one of: improved, done, no_change, blocked, budget_exhaustederrors_after == 0 → append status: done to final row → print summary → done.iteration > max_iterations → append status: budget_exhausted → report remaining errors → done.BLOCKED → report blockers with reasons → done.| Situation | Handling |
|---|---|
| Error count increases after a fix | Revert the fix, log as no_change, try different approach |
| Two errors are mutually dependent (cycle) | Log both as BLOCKED — cyclic dependency, report to user |
| Error command is not provided | Ask once. Refuse to guess. |
| Error command times out | Wrap with timeout 5m. Exit 124 = timeout → skip this iteration |
| Same error persists for 3 iterations | Log as BLOCKED — repeated failure, skip and try others |
| Fix works but introduces a linter warning | Note in fix_applied — do not revert for warnings alone |
What SKILL.md sets; muted values are Claude Code's defaults
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: commands: Invalid input, skills: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
10 skills in this plugin
/autoresearchCore autonomous research loop. Reads research.md, proposes hypotheses,
runs experiments, evaluates results mechanically, keeps improvements,
discards failures, and iterates until the target metric is achieved or
the iteration budget is exhausted.
TRIGGER when: user invokes "autoresearch" (no subcommand); research.md exists;
user wants the 5-stage loop; user wants iterative optimization overnight.
/debugautoresearch:debugScientific bug hunting using falsifiable hypotheses. Forms hypotheses, designs
falsifying tests, eliminates candidates systematically, and logs the full
investigation trail in a structured debug/ folder.
TRIGGER when: user has a bug to investigate scientifically; user wants systematic
root-cause analysis; user says "debug", "investigate", "root cause", "why is this
failing"; user invokes /autoresearch:debug.
DO NOT TRIGGER when: user wants to optimize a metric (use /autoresearch); user
wants to fix a known error automatically (use /autoresearch:fix); user just wants
a quick one-line answer about what a function does.
/learnautoresearch:learnFeedback-driven self-improvement protocol for autoresearch-skill. Converts
failed runs, confusing transcripts, bad outputs, or user feedback into a
bounded improvement plan, an eval scenario, and a patch checklist without
executing the patch automatically.
TRIGGER when: user says the skill failed, wants to improve autoresearch-skill,
provides feedback on confusing behavior, asks to turn a failure into an eval,
or invokes /autoresearch:learn.
DO NOT TRIGGER when: the user wants to run an optimization loop (use
/autoresearch), fix code errors (use /autoresearch:fix), or ship a finished
artifact (use /autoresearch:ship).
/planautoresearch:plan7-step setup wizard that produces a complete, ready-to-run research.md without
executing the research loop. Walks the user through goal, metric, search space,
constraints, evaluator design, and baseline measurement, then writes the file.
TRIGGER when: user wants to set up a research project; user wants to plan before
running the loop; user says "plan my research"; user has a goal but no research.md;
user invokes /autoresearch:plan.
DO NOT TRIGGER when: research.md already exists and the user wants to run the loop;
user wants a one-shot answer; user wants to debug, not optimize.
/predictautoresearch:predictMulti-perspective deliberation engine. Gathers independent positions from
diverse personas, runs cross-examination and rebuttal rounds, detects herd
behavior, and synthesizes a neutral judge verdict with confidence levels.
TRIGGER when: user wants multi-perspective prediction, forecasting,
scenario analysis, decision analysis, "what will happen if", "should we",
"predict the outcome of", structured devil's advocacy, or any question
benefiting from adversarial deliberation.
/reasonautoresearch:reasonAdversarial multi-round reasoning with blind-judge panel to reach rigorous conclusions.
TRIGGER when: user wants rigorous reasoning or argument evaluation; user wants a decision
analyzed from multiple angles; user wants devil's advocate critique; user asks "what are
the strongest arguments for/against"; user wants a structured debate; user wants to avoid
groupthink or anchoring; user invokes /autoresearch:reason.
DO NOT TRIGGER when: user wants a simple recommendation; user wants a quick summary;
user wants factual lookup; user just wants pros/cons without adversarial pressure.
Other plugins' skills for the same job