Official agent skill

Debug Failing Test

by microsoft in microsoft/vscode-python-environments

Debug a failing test using an iterative logging approach, then clean up and document the learning.

OfficialMITAuto-check passedTesting & QA

Install Debug Failing Test

skills CLI
$ npx skills add microsoft/vscode-python-environments --skill debug-failing-test -a claude-code

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

GitHub CLI
$ gh skill install microsoft/vscode-python-environments debug-failing-test --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/vscode-python-environments.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/debug-failing-test .claude/skills/debug-failing-test && 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-failing-test
GitHub stars
141
Token cost
~780 tokens
SKILL.md length
365 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Debug a failing test using an iterative logging approach, then clean up and document the learning.

  • Works in 5 steps: Initial Assessment → Iterative Debugging Loop → Fix and Verify → …
  • Tasks that involve Failing and flaky tests
  • SKILL.md covers Workflow, Logging Conventions, Example Debug Session and Notes
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Debug Failing Test is an agent skill from microsoft/vscode-python-environments, published by the product's own GitHub organization. Debug a failing test using an iterative logging approach, then clean up and document the learning.

Its SKILL.md is about 780 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: VS Code extension for Python environment and package management. The licence is MIT.

When your agent uses it

  • Tasks that involve Failing and flaky tests
  • Tasks that involve Debugging

Example prompts

  • “/debug-failing-test”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Initial Assessment
  2. Iterative Debugging Loop
  3. Fix and Verify
  4. Clean Up
  5. Document and Learn

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

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

  • Network

    No URLs in SKILL.md.

    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 Failing Test loads about 780 tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 365 words of instructions outside code blocks.

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

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/vscode-python-environments at commit e4f9939, republished under its MIT licence (© microsoft). 365 words, ~780 tokens.

Download SKILL.mdSave it as .claude/skills/debug-failing-test/SKILL.md (or your agent's skills folder).
name
debug-failing-test
description
Debug a failing test using an iterative logging approach, then clean up and document the learning.

Debug a failing unit test by iteratively adding verbose logging, running the test, and analyzing the output until the root cause is found and fixed.

Workflow

Phase 1: Initial Assessment
  1. Run the failing test to capture the current error message and stack trace
  2. Read the test file to understand what is being tested
  3. Read the source file being tested to understand the expected behavior
  4. Identify the assertion that fails and what values are involved
Phase 2: Iterative Debugging Loop

Repeat until the root cause is understood:

  1. Add verbose logging around the suspicious code:

    • Use console.log('[DEBUG]', ...) with descriptive labels
    • Log input values, intermediate states, and return values
    • Log before/after key operations
    • Add timestamps if timing might be relevant
  2. Run the test and capture output

  3. Assess the logging output:

    • What values are unexpected?
    • Where does the behavior diverge from expectations?
    • What additional logging would help narrow down the issue?
  4. Decide next action:

    • If root cause is clear → proceed to fix
    • If more information needed → add more targeted logging and repeat
Phase 3: Fix and Verify
  1. Implement the fix based on findings
  2. Run the test to verify it passes
  3. Run related tests to ensure no regressions
Show full SKILL.md (161 more words)Show less
Phase 4: Clean Up
  1. Remove ALL debugging artifacts:

    • Delete all console.log('[DEBUG]', ...) statements added
    • Remove any temporary variables or code added for debugging
    • Ensure the code is in a clean, production-ready state
  2. Verify the test still passes after cleanup

Phase 5: Document and Learn
  1. Provide a summary to the user (1-3 sentences):

    • What was the bug?
    • What was the fix?
  2. Record the learning by following the learning instructions (if you have them):

    • Extract a single, clear learning from this debugging session
    • Add it to the "Learnings" section of the most relevant instruction file
    • If a similar learning already exists, increment its counter instead

Logging Conventions

When adding debug logging, use this format for easy identification and removal:

typescript
console.log('[DEBUG] <location>:', <value>);
console.log('[DEBUG] before <operation>:', { input, state });
console.log('[DEBUG] after <operation>:', { result, state });

Example Debug Session

typescript
// Added logging example:
console.log('[DEBUG] getEnvironments input:', { workspaceFolder });
const envs = await manager.getEnvironments(workspaceFolder);
console.log('[DEBUG] getEnvironments result:', { count: envs.length, envs });

Notes

  • Prefer targeted logging over flooding the output
  • Start with the failing assertion and work backwards
  • Consider async timing issues, race conditions, and mock setup problems
  • Check that mocks are returning expected values
  • Verify test setup/teardown is correct

© 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-failing-test of microsoft/vscode-python-environments.

Open the folder on GitHubat commit e4f9939

Compare with similar skills

Debug Failing Test 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 Failing Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Debug Failing Test this skillmicrosoft/vscode-python-environments141—~780Automated 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 today
    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 today
    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
  • Debug Test Failures

    microsoft/haste

    Official

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

    107 GitHub stars~735 tokensUpdated today
    Testing & QAAuto-check passed

More from microsoft/vscode-python-environments

All 9 skills in this repo
  • Cross Platform Paths

    microsoft/vscode-python-environments

    Official

    Critical patterns for cross-platform path handling in this VS Code extension.

    141 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Python Manager Discovery

    microsoft/vscode-python-environments

    Official

    Environment manager-specific discovery patterns and known issues.

    141 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Run E2E Tests

    microsoft/vscode-python-environments

    Official

    Run E2E tests to verify complete user workflows like environment discovery, creation, and selection.

    141 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Run Integration Tests

    microsoft/vscode-python-environments

    Official

    Run integration tests to verify that extension components work together correctly.

    141 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Run Smoke Tests

    microsoft/vscode-python-environments

    Official

    Run smoke tests to verify extension functionality in a real VS Code environment.

    141 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Generate Snapshot

    microsoft/vscode-python-environments

    Official

    Generate a codebase health snapshot for technical debt tracking and planning.

    141 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Questions about Debug Failing Test

What does Debug Failing Test do?

Debug a failing test using an iterative logging approach, then clean up and document the learning. Debug Failing Test is an agent skill from microsoft/vscode-python-environments, published by the product's own GitHub organization. Debug a failing test using an iterative logging approach, then clean up and document the learning.

When should I use Debug Failing Test?

Debug Failing Test fits situations like: tasks that involve Failing and flaky tests; tasks that involve Debugging.

How do I install Debug Failing Test in Claude Code?

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

How do I install Debug Failing Test in Codex?

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

Can I use Debug Failing Test 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/vscode-python-environments --skill debug-failing-test -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-failing-test, .gemini/skills/debug-failing-test, .github/skills/debug-failing-test and .opencode/skills/debug-failing-test in your project.

What does Debug Failing Test need to run?

SKILL.md names no scripts, command-line tools or credentials: Debug Failing Test is instructions for the agent only.

Does Debug Failing Test access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Debug Failing Test 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 Failing Test use?

Debug Failing Test 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 Failing Test use?

About 780 tokens (SKILL.md is roughly 3.1k 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 Failing Test?

Skills that share tags, products or a category with Debug Failing Test: 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 Failing Test?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/vscode-python-environments, which has 141 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

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