Agent Skills: Run Tests and Fix Failures

Run test suite and fix any failures

UncategorizedID: michaelvessia/nixos-config/test

Install this agent skill to your local

pnpm dlx add-skill https://github.com/MichaelVessia/nixos-config/tree/HEAD/modules/programs/agents/shared/skills/test

Skill Files

Browse the full folder contents for test.

Download Skill

Loading file tree…

modules/programs/agents/shared/skills/test/SKILL.md

Skill Metadata

Name
test
Description
Run test suite and fix any failures

Run Tests and Fix Failures

Run the project's test suite and fix any failing tests.

Steps

  1. Detect test command:

    • Check package.json for scripts.test (JS/TS projects)
    • Check for Cargo.tomlcargo test
    • Check for go.modgo test ./...
    • Check for pyproject.toml or pytest.inipytest
    • Check for mix.exsmix test
  2. Detect package manager (for JS/TS):

    • bun.lockbun run test
    • pnpm-lock.yamlpnpm run test
    • package-lock.jsonnpm run test
    • yarn.lockyarn run test
  3. Run the test suite

  4. If tests fail:

    • Analyze the failure output
    • Read the failing test file(s)
    • Understand what the test expects
    • Fix the code (not the test) unless the test itself is wrong
    • Re-run tests to verify fix
    • Repeat until all tests pass
  5. Report results:

    • Number of tests run
    • What was fixed (if anything)
    • Final pass/fail status

Rules

  • Never disable or skip tests to make them pass
  • Fix the underlying code, not the test (unless test is clearly wrong)
  • If a test seems wrong, ask before modifying it