Agent skill

Test Failure Diagnosis

by aztfmod in aztfmod/terraform-provider-azurecaf

Analyze test failure output to identify root cause and suggest fixes.

MITAuto-check passedTesting & QA

Install Test Failure Diagnosis

skills CLI
$ npx skills add aztfmod/terraform-provider-azurecaf --skill test-failure-diagnosis -a claude-code

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

GitHub CLI
$ gh skill install aztfmod/terraform-provider-azurecaf test-failure-diagnosis --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/aztfmod/terraform-provider-azurecaf.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/test-failure-diagnosis .claude/skills/test-failure-diagnosis && 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
test-failure-diagnosis
GitHub stars
188
Token cost
~559 tokens
SKILL.md length
224 words
Files
1
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Analyze test failure output to identify root cause and suggest fixes.

  • Works in 5 steps: Classify failure type → Extract failure details → Identify root cause → …
  • Test failures occur
  • Calls python3 and go
  • : test failures

What it does

Test Failure Diagnosis is an agent skill from aztfmod/terraform-provider-azurecaf. Analyze test failure output to identify root cause and suggest fixes. Use when build or test failures occur. Triggers on: test failures, build errors, CI failures.

Its SKILL.md is about 560 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. The repository describes itself as: Terraform provider for the Terraform platform engineering for Azure. The licence is MIT.

When your agent uses it

  • Test failures occur
  • : test failures

Example prompts

  • “/test-failure-diagnosis”

Requirements

  • Python 3

Workflow steps

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

  1. Classify failure type
  2. Extract failure details
  3. Identify root cause
  4. Suggest fix
  5. Verify fix

What it can do on your machine

Read from SKILL.md and the folder at commit ac74615. 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

    Shell commands in SKILL.md call:

    • python3
    • go

    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

Test Failure Diagnosis loads about 559 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 224 words of instructions outside code blocks.

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

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 aztfmod/terraform-provider-azurecaf at commit ac74615, republished under its MIT licence (© aztfmod). 224 words, ~559 tokens.

Download SKILL.mdSave it as .claude/skills/test-failure-diagnosis/SKILL.md (or your agent's skills folder).
name
test-failure-diagnosis
description
Analyze test failure output to identify root cause and suggest fixes. Use when build or test failures occur. Triggers on: test failures, build errors, CI failures.

Test Failure Diagnosis

Procedure

1. Classify failure type

Read the failure output and classify:

Failure typeIndicatorsCommon cause
Compilation errorcannot compile, undefined:, syntax errorBad JSON in resourceDefinition.json, invalid Go syntax
JSON parse errorjson: cannot unmarshal, unexpected end of JSONMissing comma, unmatched quotes, bad escapes in resourceDefinition.json
Duplicate slugduplicate key, ambiguity errorsTwo resources share the same slug
Test assertion failureFAIL, expected X got YNaming logic bug, regex mismatch
Regex errorerror parsing regexpInvalid regex pattern in validation_regex or regex field
Import errorcannot find package, module not foundMissing dependency, go.mod issue
2. Extract failure details

From the output, extract:

  • Failed test name(s): The specific Test* function(s) that failed
  • Error message: The assertion or error text
  • File and line: Where the failure occurred
  • Expected vs actual: What was expected and what was produced
3. Identify root cause

Based on the classification, check the most likely source:

For JSON errors:

bash
python3 -c "import json; json.load(open('resourceDefinition.json'))"

For duplicate slugs:

bash
grep '"slug":' resourceDefinition.json | sort | uniq -d

For regex issues:

bash
grep -n 'validation_regex\|"regex"' resourceDefinition.json | grep -v '"\"'
4. Suggest fix

Provide a specific, actionable fix:

  • For JSON formatting: show the exact line and the correction
  • For duplicate slugs: identify which resources conflict
  • For regex: show the invalid pattern and the corrected version
  • For test failures: show what the test expects and how to satisfy it
5. Verify fix

After applying the suggested fix, re-run the failed test:

bash
go test ./azurecaf/ -run "<failed_test_name>" -v

© aztfmod, 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/test-failure-diagnosis of aztfmod/terraform-provider-azurecaf.

Open the folder on GitHubat commit ac74615

Compare with similar skills

Test Failure Diagnosis 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.

Test Failure Diagnosis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Failure Diagnosis this skillaztfmod/terraform-provider-azurecaf188—~559Automated safety check: PassMIT
Swig Testswig/swig6.3k—~2.3kAutomated safety check: PassCustom licence
Triage CI FailureDataDog/datadog-agent3.8k—~2.3kAutomated safety check: PassApache-2.0
Dynamo Jira TicketDynamoDS/Dynamo2k—~1.1kAutomated safety check: PassApache-2.0
Fix Ready PRsfastrepl/anarlog9.5k—~1.4kAutomated safety check: PassMIT
Trx Analysismicrosoft/vstest969—~1.8kAutomated safety check: PassMIT

Similar skills

  • Swig Test

    swig/swig

    Run SWIG test suite for specific languages. An agent skill from swig/swig.

    6.3k GitHub stars~2.3k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Triage CI Failure

    DataDog/datadog-agent

    Official

    Classify a failed CI as either caused by an active incident, flakiness, or a true code regression.

    3.8k GitHub stars~2.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Dynamo Jira Ticket

    DynamoDS/Dynamo

    Create structured Jira tickets for Dynamo from bug reports, failing tests, or feature requests.

    2k GitHub stars~1.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Fix Ready PRs

    fastrepl/anarlog

    Inspect every open non-draft PR for CI failures and unresolved Cursor Bugbot findings, then fix them on the existing PR branches.

    9.5k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Trx Analysis

    microsoft/vstest

    Official

    Parse and analyze Visual Studio TRX test result files. An agent skill from microsoft/vstest.

    969 GitHub stars~1.8k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Wio

    workersio/skills

    Testing workflow skill for finding high-value test candidates, writing focused tests, generating realistic workloads, reviewing test value, and diagnosing test-suite health.

    200 GitHub stars~5.8k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed

More from aztfmod/terraform-provider-azurecaf

All 22 skills in this repo
  • Azure Caf Sync

    aztfmod/terraform-provider-azurecaf

    Fetch the latest CAF abbreviations page from Microsoft Learn and compare against resourceDefinition.json official.slug values.

    188 GitHub stars~464 tokensUpdated 18 days ago
    Auto-check passed
  • Changelog Update

    aztfmod/terraform-provider-azurecaf

    Update CHANGELOG.md with a new entry under the correct section.

    188 GitHub stars~642 tokensUpdated 18 days ago
    Auto-check passed
  • Docs Resource Sync

    aztfmod/terraform-provider-azurecaf

    Ensure documentation files under docs/resources/ and docs/data-sources/ reflect current resource types with accurate examples.

    188 GitHub stars~469 tokensUpdated 18 days ago
    Auto-check passed
  • Issue To Resource Spec

    aztfmod/terraform-provider-azurecaf

    Parse a 'new resource request' GitHub issue and extract the resource type, slug, and naming constraints to produce a draft resourceDefinition.json entry.

    188 GitHub stars~452 tokensUpdated 18 days ago
    Auto-check passed
  • Naming Rules Drift Check

    aztfmod/terraform-provider-azurecaf

    Re-fetch Azure naming rules for a set of resources and compare against current regex/length/scope values in resourceDefinition.json.

    188 GitHub stars~507 tokensUpdated 18 days ago
    Auto-check passed
  • Resource Bulk Import

    aztfmod/terraform-provider-azurecaf

    Accept a list of Azure resource types, batch-research each via azure-naming-research conventions, generate JSON entries, and insert all into resourceDefinition.json.

    188 GitHub stars~476 tokensUpdated 18 days ago
    Auto-check passed

Categories

Questions about Test Failure Diagnosis

What does Test Failure Diagnosis do?

Analyze test failure output to identify root cause and suggest fixes. Test Failure Diagnosis is an agent skill from aztfmod/terraform-provider-azurecaf. Analyze test failure output to identify root cause and suggest fixes.

When should I use Test Failure Diagnosis?

Test Failure Diagnosis fits situations like: test failures occur; : test failures.

How do I install Test Failure Diagnosis in Claude Code?

Run `npx skills add aztfmod/terraform-provider-azurecaf --skill test-failure-diagnosis -a claude-code`. Or copy the skill folder (.github/skills/test-failure-diagnosis in aztfmod/terraform-provider-azurecaf) into .claude/skills/test-failure-diagnosis in your project. Claude Code loads it when a task matches its description.

How do I install Test Failure Diagnosis in Codex?

Run `npx skills add aztfmod/terraform-provider-azurecaf --skill test-failure-diagnosis -a codex`. Or copy the skill folder (.github/skills/test-failure-diagnosis in aztfmod/terraform-provider-azurecaf) into .agents/skills/test-failure-diagnosis in your project. Codex loads it when a task matches its description.

Can I use Test Failure Diagnosis 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 aztfmod/terraform-provider-azurecaf --skill test-failure-diagnosis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-failure-diagnosis, .gemini/skills/test-failure-diagnosis, .github/skills/test-failure-diagnosis and .opencode/skills/test-failure-diagnosis in your project.

What does Test Failure Diagnosis need to run?

Going by SKILL.md and its folder, Test Failure Diagnosis needs the command-line tools its instructions call (python3 and go). Our summary lists: Python 3.

Does Test Failure Diagnosis 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 Test Failure Diagnosis 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 Test Failure Diagnosis use?

Test Failure Diagnosis 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 Test Failure Diagnosis use?

About 559 tokens (SKILL.md is roughly 2.2k 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 Test Failure Diagnosis?

Skills that share tags, products or a category with Test Failure Diagnosis: Swig Test (swig/swig, 6.3k stars), Triage CI Failure (DataDog/datadog-agent, 3.8k stars), Dynamo Jira Ticket (DynamoDS/Dynamo, 2k stars) and Fix Ready PRs (fastrepl/anarlog, 9.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Failure Diagnosis?

aztfmod (a GitHub organization) maintains it in aztfmod/terraform-provider-azurecaf, which has 188 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on September 21, 2026.

Source: aztfmod/terraform-provider-azurecaf on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.