Skip to content

Skills / test-fix

test-fix

Fix failing tests from trimmed runner output, find the real cause, and never weaken an assertion without asking. Use when tests fail, CI is red, or the user asks to fix failing tests. Do not use to write new tests or to make a red suite green by deleting or skipping tests.

OfficialRuns scriptsAuditB
Latest
v0.1.0
Aisle
testing
Works with
Claude Code, Codex, Cursor
Stars
2

Install

Install test-fix

npx @agentsaisle/cli add test-fix

Installs into your project's skills folder. Add --global to install it for every project.

Runs scriptsThis skill includes scripts

Your agent may run these scripts on your machine. A maintainer has read every one in full, and the CLI lists the files when you install. You can read them on GitHub first.

Read the files on GitHub

Audit

B
Critical
0
High
0
Medium
1
Low
0

5 files · audited 2026-10-29 · rules 1.0.0

MediumAA-P02Can write files and run interpreters without disable-model-invocation

SKILL.md:6

Read Write Edit Glob Grep Bash(node *) Bash(git diff *) Bash(npm *) Bash(pnpm *) Bash(npx *) Bash(python *) Bash(go test *)

Why The agent may load this skill on its own and then write files and run code in one go.

Fix Set disable-model-invocation: true so the user starts it, or narrow the Bash patterns.

What this skill can use

Tools

  • Read
  • Write
  • Edit
  • Glob
  • Grep
  • Bash(node *)
  • Bash(git diff *)
  • Bash(npm *)
  • Bash(pnpm *)
  • Bash(npx *)
  • Bash(python *)
  • Bash(go test *)

Scripts

  • scripts/trim-test-output.mjs
  • scripts/weakened-assertions.mjs

Domains mentioned

None

Automated checks found the patterns listed here. An audit reduces risk; it is not a guarantee of safety. How audits work · Read the rules

Show this grade in a README

The badge updates when the registry is rebuilt. Paste this Markdown into the README:

[![aisle audit](https://img.shields.io/endpoint?url=https%3A%2F%2Fagentsaisle-vercel.vercel.app%2Fbadges%2Ftest-fix.json)](https://agentsaisle-vercel.vercel.app/skills/test-fix)

SKILL.md

Rendered from commit 276ea59

Fix failing tests

Use when

  • One or more tests fail and the cause is unknown.

Don't use when

  • There are no tests yet (use test-write).
  • The user wants a skip or deletion. Ask first and record why.

Steps

  1. Run the failing tests and pipe the output through node <skill>/scripts/trim-test-output.mjs. Work from that summary; do not read the full log.
  2. For each failure decide: is the code wrong, the test wrong, or the environment? Read the test and the code it calls. Say which, with the evidence.
  3. Fix the code when the code is wrong. Fix the test only when its expectation is provably outdated or incorrect, and explain why.
  4. Never remove an assertion, loosen a matcher, skip a test or raise a timeout to get green. If you think one is needed, stop and ask.
  5. Re-run the same tests, then the wider suite.
  6. Run git diff | node <skill>/scripts/weakened-assertions.mjs. Any finding must be shown to the user and approved.

Budget

  • Search first (grep, glob, symbol search). Read line ranges, not whole files.

  • Read at most 8 files per step. If you need more, write down what you learned and narrow the question.

  • Do not re-read a file you just wrote or edited.

  • Prefer the smallest command output that answers the question: head, tail, quiet flags, filtered lists.

  • Trim output first; read only the failing tests and the code they call.

Output

  • Per failure: cause, fix, and the file changed. Then the final pass counts and the weakened-assertions result.

Done when

  • The failing tests pass and the wider suite has no new failures.
  • weakened-assertions.mjs reports none, or the user approved each finding.

Version history

VersionCommitInstall
0.1.0latest276ea59add test-fix

Report this skillAgent Aisle on GitHub