Official agent skill

Debug Test Failures

by microsoft in microsoft/haste

Systematic debugging workflow for test failures. An agent skill from microsoft/haste.

OfficialMITAuto-check passedTesting & QA

Install Debug Test Failures

skills CLI
$ npx skills add microsoft/haste --skill debug-test-failures -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/haste debug-test-failures --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/haste.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/debug-test-failures .claude/skills/debug-test-failures && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
debug-test-failures
GitHub stars
106
Token cost
~735 tokens
SKILL.md length
347 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Systematic debugging workflow for test failures. An agent skill from microsoft/haste.

  • Tests are failing
  • SKILL.md covers Overview, Key Concepts, Patterns & Techniques and Decision Framework, plus 1 more section
  • Calls npm
  • A CI build is red

What it does

Debug Test Failures is an agent skill from microsoft/haste, published by the product's own GitHub organization. Systematic debugging workflow for test failures. Use when tests are failing, a CI build is red, or when asked to debug test issues.

Its SKILL.md is about 740 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Failing and flaky tests and Debugging. The repository describes itself as: High Speed Assessment and Satellite Tracking for Emergencies. The licence is MIT.

When your agent uses it

  • Tests are failing
  • A CI build is red
  • Asked to debug test issues

Example prompts

  • “/debug-test-failures”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): shell

What it can do on your machine

Read from SKILL.md and the folder at commit 079bd89. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • shell

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Debug Test Failures loads about 735 tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 347 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~735

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/haste at commit 079bd89, republished under its MIT licence (© microsoft). 347 words, ~735 tokens.

Download SKILL.mdSave it as .claude/skills/debug-test-failures/SKILL.md (or your agent's skills folder).
name
debug-test-failures
description
Systematic debugging workflow for test failures. Use when tests are failing, a CI build is red, or when asked to debug test issues.
allowed-tools
shell
source
Internal engineering practices
domain
testing
level
intermediate
agents
backend-dev, gis, ui, backend-validation
created_date
2026-04-27
status
draft

Debug Test Failures

Overview

A systematic process for diagnosing and fixing test failures. Use this skill when tests fail, CI is red, or someone reports a broken build. The key principle: find the root cause, not just the symptom.

Key Concepts

Failure Categories
  • Deterministic failure: Same result every time. Usually a code bug or outdated test.
  • Flaky failure: Intermittent. Usually caused by timing, ordering, shared state, or external dependencies.
  • Environment failure: Works locally, fails in CI. Usually paths, permissions, or missing dependencies.

Patterns & Techniques

Systematic Debugging Process

Step 1: Reproduce Run the failing test in isolation:

bash
# Python tests
cd hastelib && hatch run test:pytest

# UI lint
cd ui && npm run lint

Run it 2-3 times. If intermittent, it's likely flaky.

Step 2: Analyze

  • Read the error message and stack trace carefully
  • Identify the assertion that failed: expected vs actual values
  • Check if the failure is in the test or the code under test

Step 3: Investigate

  • Read the test code to understand what it's testing
  • Read the production code being tested
  • Check recent changes to both
  • Common root causes:
    • Changed function signatures or return types
    • Modified data structures
    • New dependencies not mocked
    • Environment differences (paths, timezones, locale)
    • Race conditions in async code

Step 4: Fix

  • Fix the root cause, not just the symptom
  • If the test is wrong (testing outdated behavior), update the test
  • If the code is wrong, fix the code
  • Run the full test suite: cd hastelib && hatch run test:pytest

Step 5: Report Summarize: root cause, fix applied, verification that all tests pass.

Decision Framework

SymptomLikely CauseAction
Test always failsCode bug or outdated testRead both, fix the wrong one
Test passes locally, fails in CIEnvironment differenceCheck paths, deps, permissions
Test fails intermittentlyTiming, shared state, or orderingAdd isolation, remove shared state
Many tests fail at onceBreaking change in shared codeFind the common dependency

Common Pitfalls

  • Fixing the test to match broken code — Verify the code is correct before changing the test
  • Adding sleep() to fix flaky tests — Fix the root cause (usually missing await or shared state)
  • Only running the fixed test — Always run the full suite to check for regressions

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/debug-test-failures of microsoft/haste.

Open the folder on GitHubat commit 079bd89

Compare with similar skills

Debug Test Failures next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Debug Test Failures compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Debug Test Failures this skillmicrosoft/haste106—~735Automated safety check: PassMIT
Pester Failure AnalysisPowerShell/PowerShell56k—~5.1kAutomated safety check: PassMIT
Testingkortix-ai/suna20k—~3.6kAutomated safety check: NotesCustom licence
OpenLogi Change VerificationAprilNEA/OpenLogi23k—~1.4kAutomated safety check: PassApache-2.0
RustPython Test Failure InvestigationRustPython/RustPython22k—~467Automated safety check: PassMIT
Issue To Regression Testbrunosabot/streamline-card269—~529Automated safety check: PassMIT

Similar skills

  • Pester Failure Analysis

    PowerShell/PowerShell

    Investigates failing Pester tests in PowerShell CI jobs by following a six-step workflow from pull request status to documented fix recommendations.

    56k GitHub stars~5.1k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Testing

    kortix-ai/suna

    A skill your agent uses for every Kortix test task, behavior change, bug fix, refactor, API route change, CLI change, SDK change, browser journey, test failure, coverage question, local benchmark…

    20k GitHub stars~3.6k tokensUpdated today
    Testing & QAAuto-check: notes
  • Plans the smallest check that could disprove a code change in the OpenLogi project, then escalates through reproduction, focused tests and a final gate before a push.

    23k GitHub stars~1.4k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Investigates a failing RustPython test by comparing it with CPython, then either fixes it or gathers the details for an incompatibility report.

    22k GitHub stars~467 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Issue To Regression Test

    brunosabot/streamline-card

    A skill your agent uses when the user asks to fix a bug, references a GitHub issue number, or describes an issue and wants a fix.

    269 GitHub stars~529 tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Ue Test Authoring

    JasonMa0012/MooaToon

    A skill your agent uses when writing or modifying UE automated tests (Automation, CQTest, Functional, Gauntlet, LowLevel) with Rider MCP available.

    749 GitHub stars~2.1k tokensUpdated 19 days ago
    Testing & QAAuto-check: notes

More from microsoft/haste

All 9 skills in this repo
  • API Design

    microsoft/haste

    Official

    Guide for designing and documenting RESTful APIs. An agent skill from microsoft/haste.

    106 GitHub stars~663 tokensUpdated 5 days ago
    Auto-check passed
  • Copilot CLI Modes

    microsoft/haste

    Official

    Comprehensive guide to all Copilot CLI running modes: Interactive, Plan, Autopilot, Fleet, Research, Chronicle, and Delegate.

    106 GitHub stars~4.2k tokensUpdated 5 days ago
    Auto-check passed
  • Dependency Update

    microsoft/haste

    Official

    Guide for safely updating project dependencies. An agent skill from microsoft/haste.

    106 GitHub stars~551 tokensUpdated 5 days ago
    Auto-check passed
  • Official

    Imagery provider adaptation skill for HASTE. An agent skill from microsoft/haste.

    106 GitHub stars~1.3k tokensUpdated 5 days ago
    Auto-check passed
  • Security Analysis

    microsoft/haste

    Official

    Dependabot and security analysis skill for HASTE. An agent skill from microsoft/haste.

    106 GitHub stars~1k tokensUpdated 5 days ago
    Auto-check passed
  • Validation Diagnostics

    microsoft/haste

    Official

    Validation and diagnostic skill for HASTE. An agent skill from microsoft/haste.

    106 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed

Questions about Debug Test Failures

What does Debug Test Failures do?

Systematic debugging workflow for test failures. An agent skill from microsoft/haste. Debug Test Failures is an agent skill from microsoft/haste, published by the product's own GitHub organization. Systematic debugging workflow for test failures.

When should I use Debug Test Failures?

Debug Test Failures fits situations like: tests are failing; A CI build is red; asked to debug test issues.

How do I install Debug Test Failures in Claude Code?

Run `npx skills add microsoft/haste --skill debug-test-failures -a claude-code`. Or copy the skill folder (.github/skills/debug-test-failures in microsoft/haste) into .claude/skills/debug-test-failures in your project. Claude Code loads it when a task matches its description.

How do I install Debug Test Failures in Codex?

Run `npx skills add microsoft/haste --skill debug-test-failures -a codex`. Or copy the skill folder (.github/skills/debug-test-failures in microsoft/haste) into .agents/skills/debug-test-failures in your project. Codex loads it when a task matches its description.

Can I use Debug Test Failures in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/haste --skill debug-test-failures -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/debug-test-failures, .gemini/skills/debug-test-failures, .github/skills/debug-test-failures and .opencode/skills/debug-test-failures in your project.

What does Debug Test Failures need to run?

Going by SKILL.md and its folder, Debug Test Failures needs the command-line tools its instructions call (npm). Our summary lists: Python 3. Its frontmatter pre-approves these tools: shell.

Does Debug Test Failures access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Debug Test Failures safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Debug Test Failures use?

Debug Test Failures is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Debug Test Failures use?

About 735 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Debug Test Failures?

Skills that share tags, products or a category with Debug Test Failures: Pester Failure Analysis (PowerShell/PowerShell, 56k stars), Testing (kortix-ai/suna, 20k stars), OpenLogi Change Verification (AprilNEA/OpenLogi, 23k stars) and RustPython Test Failure Investigation (RustPython/RustPython, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Debug Test Failures?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/haste, which has 106 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 2, 2026.

Source: microsoft/haste on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.