Debug failing test

From albinotonnina/echos · View interactive version

Debug failing test is an AI agent skill from the GitHub repository albinotonnina/echos. Systematic process for diagnosing and fixing a failing test

How to use this skill

Skill file

Follow this order before changing any application code:

  1. Reproduce in isolation

Run only the failing test and confirm it fails reliably (not intermittently).

  1. Read the full error output

Do not skim — read the assertion failure, the stack trace, and any stderr output.

Note the exact line number in the test and in the source.

  1. Check for environment issues
  1. Trace the failure

Add a single console.log at the point of failure to inspect the actual value.

Do not add multiple logs at once — add one, run, interpret, then add the next.

  1. Identify the root cause

Is the test wrong (wrong expectation), the fixture wrong (bad test data), or the code wrong?

Fix the right thing — do not change a test expectation just to make it pass.

  1. Verify the fix

Run the full test suite after fixing.

If the fix touches shared utilities, check for regressions in related tests.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.