Command Palette

Search for a command to run...

Back to skills
skill № 63096

test-fix-loop

This skill should be used when autonomously iterating on test failures: runs the suite, diagnoses, applies minimal fixes, re-runs with checkpoint commit…

FreeNo executable scripts
jikig-aiby jikig-ai★ 21 GitHub stars

Install test-fix-loop in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Cloud Mode (Devin): before pipeline work run bash "${CLAUDE_PLUGIN_ROOT}/scripts/cloud-detect.sh". If CLAUDE_PLUGIN_ROOT is unset (cloud exec shells do not export it), resolve the root by IDENTITY, never by script basename: for d in "$HOME/.local/share/devin/cli/plugins/cache" and /opt/.devin/plugins, skip unless [ -d "$d" ], then MANIFEST="$(find "$d" -path '*/.claude-plugin/plugin.json' -exec grep -l '"name":space:*::space:*"soleur"' {} + 2>/dev/null | head -1)", ROOT="${MANIFEST%/.claude-plugin/plugin.json}" — one resolution, two consumers: $ROOT/scripts/cloud-detect.sh and $ROOT/scripts/precommit-guard.sh. (Shape check, not authentication: a planted {"name":"soleur"} dir passes — ADR-179 A11.) local or not-local:no-devin-env proceeds normally; any other not-local:<reason> applies <plugin-root>/devin/INSTRUCTIONS.md §Cloud Mode: emit the --banner, fan out sequentially with Reviewed-Coverage: sequential-fallback disclosure (never claim an independent review ran), message_user ack before any secrets read or production mutation, and run precommit-guard.sh before any git commit — hooks do not fire in cloud.

Grok Build (plugins/soleur/lib/harness.ts invokeSkill()): Read this SKILL.md in this process and run it to completion. A one-segment soleur:<name> in this document names a SKILL — on Grok Build, Read plugins/soleur/skills/<name>/SKILL.md in this process; it is not a nested tool_use. A multi-segment id such as soleur:<domain>:<name> names an AGENT: spawn it, never Read it, and on Grok Build spawn_subagent takes the id with its colons replaced by hyphens (agentIdToGrokSubagentType). Claude Code: Skill tool for a skill (soleur:<name>), Task tool with subagent_type for an agent. Forbidden is executing a subset, not the Read.

Test-Fix Loop

Autonomous test-fix iteration loop. Run the test suite, diagnose failures, apply fixes to implementation code, and re-run until all tests pass or a termination condition is met. This is a recovery mechanism for unexpected failures -- not a replacement for RED/GREEN/REFACTOR (use atdd-developer for TDD discipline).

When to Use

  • After implementation produces unexpected test failures in unrelated modules
  • When soleur:work GREEN phase fails and manual diagnosis is tedious
  • To batch-fix multiple test failures across a codebase
  • NOT for writing new tests (use atdd-developer)
  • NOT for linting, type-checking, or non-test failures

Run Health Emission

Read run-health-schema.md. The consumer is plugins/soleur/agents/engineering/review/session-forensics-analyst.md. Emission is best-effort and never blocks the loop.

After the test command is known, set RUN_DIR=".soleur/runs/<branch>-tfl-<utc>" and snapshot that command (not this skill file):

bash "${CLAUDE_PLUGIN_ROOT}/scripts/run-health-emit.sh" --run-dir "$RUN_DIR" --phase 0 --status started --prompt-file "$STEP_INVOCATION"

At each iteration boundary use the same helper with --phase iter-N-parse, --phase iter-N-fix, or --phase terminate. Before the diagnostic report, emit phase exit. Before every return after RUN_DIR is set — the already-pass exit, the tally STOP, and the diagnostic report — seal once. Set RUN_HEALTH_STATUS to completed when Result is SUCCESS or the suite already passed, to budget-capped on tally STOP, and to failed for every other Result.

bash "${CLAUDE_PLUGIN_ROOT}/scripts/run-health-emit.sh" --run-dir "$RUN_DIR" --status "$RUN_HEALTH_STATUS" --seal --import-tally

After --seal, run bash "${CLAUDE_PLUGIN_ROOT}/skills/session-retrospective-compound/scripts/triage-session.sh" --run-dir "$RUN_DIR" and, when it prints WARRANTS_DEEP_ANALYSIS: true (or when RUN_HEALTH_STATUS is failed or budget-capped), invoke soleur:session-retrospective-compound.

Phase 0: Detect and Confirm

Detect Test Runner

Auto-detect the test command from project files in priority order:

  1. CLAUDE.md -- explicit test command (highest priority)
  2. package.json -- scripts.test field
  3. Cargo.toml -- cargo test
  4. Makefile / Justfile -- test target
  5. Gemfile / Rakefile -- bundle exec rake test or bin/rails test
  6. pyproject.toml -- pytest
  7. go.mod -- go test ./...

If $ARGUMENTS contains --cmd or --max flags, extract values directly: --cmd '<command>' sets the test command and --max N the iteration cap; when either is present it wins over the number/command heuristics below (a red-capable command from soleur:reproduce-bug usually contains digits). Optional flag: --max (iterations, default 5). When the caller i

Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • references/determinism-checklist.md

FAQ

What does the test-fix-loop skill do?

This skill should be used when autonomously iterating on test failures: runs the suite, diagnoses, applies minimal fixes, re-runs with checkpoint commit isolation until all tests pass.

How do I install the test-fix-loop skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the test-fix-loop skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare test-fix-loop with