Official agent skill

Reproduce Failure

by google in google/heir

Describes a decision tree of steps and skills to utilize when, starting from a test failure or the failure of bazel run command using heir-opt, you would like to produce a reproducing input IR that…

OfficialApache-2.0Auto-check passedTesting & QA

Install Reproduce Failure

skills CLI
$ npx skills add google/heir --skill reproduce-failure -a claude-code

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

GitHub CLI
$ gh skill install google/heir reproduce-failure --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/google/heir.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/reproduce_failure .claude/skills/reproduce-failure && 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
reproduce-failure
GitHub stars
929
Token cost
~1.4k tokens
SKILL.md length
634 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
Apache-2.0

At a glance

Describes a decision tree of steps and skills to utilize when, starting from a test failure or the failure of bazel run command using heir-opt, you would like to produce a reproducing input IR that…

  • Works in 5 steps: A direct bazel run command. → A lit test target or bazel test command… → A file path to a lit test, such as → …
  • Tasks that involve Failing and flaky tests
  • SKILL.md covers Overview, Usage and Gotchas
  • Calls bazel

What it does

Reproduce Failure is an agent skill from google/heir, published by the product's own GitHub organization. Describes a decision tree of steps and skills to utilize when, starting from a test failure or the failure of bazel run command using heir-opt, you would like to produce a reproducing input IR that fails on a particular compiler pass.

Its SKILL.md is about 1.4k 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: The compiler for homomorphic encryption. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Failing and flaky tests

Example prompts

  • “Use the reproduce-failure skill to describe a decision tree of steps and skills to utilize when, starting from a test failure or the failure of…”
  • “/reproduce-failure”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. A direct bazel run command.
  2. A lit test target or bazel test command pointing to such a target, such
  3. A file path to a lit test, such as
  4. An end-to-end test target, such as
  5. A filepath to an end-to-end test file, such as

What it can do on your machine

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

    • bazel

    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

Reproduce Failure loads about 1.4k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 634 words of instructions outside code blocks.

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

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 google/heir at commit 26da825, republished under its Apache-2.0 licence (© google). 634 words, ~1,397 tokens.

Download SKILL.mdSave it as .claude/skills/reproduce-failure/SKILL.md (or your agent's skills folder).
name
reproduce-failure
description
Describes a decision tree of steps and skills to utilize when, starting from a test failure or the failure of `bazel run` command using heir-opt, you would like to produce a reproducing input IR that fails on a particular compiler pass.

Reproduce a test failure

Overview

This skill guides the agent in identifying an IR and compiler pass that reproduces a failure from a lit or e2e test target, or from a bazel run command that runs heir-opt.

Usage

To reproduce a failure, follow these steps.

Identify the starting point of the process

The user may input one of multiple "starting points" for a failure.

  1. A direct bazel run command.
  2. A lit test target or bazel test command pointing to such a target, such as //tests/Transforms/convert_to_ciphertext_semantics:assign_layout.mlir.test,
  3. A file path to a lit test, such as third_party/heir/tests/Transforms/convert_to_ciphertext_semantics/assign_layout.mlir
  4. An end-to-end test target, such as //tests/Examples/lattigo/ckks/dot_product_8f:dotproduct8f_test,
  5. A filepath to an end-to-end test file, such as third_party/heir/tests/Examples/lattigo/ckks/dot_product_8f/dot_product_8f_test.go

Reiterate to the user that you understand which of these options are the starting point, and if the user provides a starting point that doesn't fit into one of these options, warn them and then ask for confirmation when improvising how to convert their failure to a bazel run command in the next step.

Identify the right bazel run command

For option 1 (A direct bazel run command), nothing is needed, continue to the next step.

For option 2, use the lit_to_bazel skill.

For option 3, use the e2e_to_bazel skill.

At the end of this step, you should have a bazel run command that reproduces the user's error, but that command may run many compiler passes in a pipeline. The remaining steps will reduce the bazel run command to a more minimal reproducer.

Run it to ensure it reproduces the user's error.

Identify the specific IR, pass, and pass options

Use the dump_intermediate_ir skill to augment the bazel run command with appropriate flags, so that it writes relevant files that contain the IR and pass options.

Then inspect the right file (usually the last file dumped before an error occurs) to identify the IR and pass options. The dumped IR should include near the top of the file, a comment like

mlir
// -----// IR Dump Before CanonicalizerPass: canonicalize{cse-between-iterations=false max-iterations=5 max-num-rewrites=-1 region-simplify=normal test-convergence=false top-down=true} //----- //

The part after : is the relevant pass name and options that will be needed in the next step. The rest of the file content is the IR that will be needed in the next step.

Show full SKILL.md (273 more words)Show less
Construct the bazel run command for the individual pass

Given the information from previous steps, construct a bazel run command of the form:

bash
bazel run //tools:heir-opt -- \
--pass-pipeline="<PASS_AND_OPTIONS>" \
<IR_FILE>

where <PASS_AND_OPTIONS> corresponds to the "pass name and options" from the previous step, and <IR_FILE> corresponds to the dumped IR for that pass.

At this step, run the new bazel run command and make sure that it reproduces the error.

Create a reproducing lit test file

Copy the IR to a new lit regression test file with the bazel run command modified to a // RUN: line.

The new test should live in third_party/heir/tests/Regression/ and have at the top of the file a comment describing the origin of the reproducer along with the // RUN: line.

For example, if the reduced bazel run command from the previous step was

bash
bazel run //tools:heir-opt -- \
--pass-pipeline="canonicalze{cse-between-iterations=true}" \
/tmp/mlir/foo.mlir

and the original command was bazel run //tools:heir-opt -- --big-pipeline /path/to/file.mlir

Then the corresponding lit file should start with

mlir
// This file is a minimal reproducer of a failure originally produced with
//
//    heir-opt --big-pipeline /path/to/file.mlir
//
// RUN: heir-opt --pass-pipeline="canonicalze{cse-between-iterations=true}" %s

Below that header, place the reproducing IR from the previous step. Then confirm the test exercises the test failure once more by running bazel test //tests/Regression:<name_of_file.mlir>.test.

The <name_of_file.mlir> should be chosen appropriately according to the following heuristic:

  • If you know of a particular GitHub issue number, use the number, like issue_1480.mlir.
  • If you have a starting test file or target, name it similar to that file, e.g., dot_product_8f_regression.mlir
  • If it makes sense, incorporate the name of the pass, e.g., dot_product_secret_to_ckks.mlir
  • If no natural name makes sense, use RENAME_ME_regression_test.mlir

Gotchas

  • Ensure that at each step you can still reproduce the failure. If at any step, a newly reduced command fails to reproduce the failure, stop and report this to the user, asking for assistance.
markdown
Copy this checklist and track progress:

- [ ] Step 1: Identify the starting point of the process
- [ ] Step 2: Identify the right `bazel run` command
- [ ] Step 3: Identify the specific IR, pass, and pass options
- [ ] Step 4: Construct the `bazel run` command for the individual pass
- [ ] Step 5: Create a reproducing `lit` test file

Each step corresponds to a section mentioned above.
<!-- mdformat global-off -->

© google, Apache-2.0. 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 .agents/skills/reproduce_failure of google/heir.

Open the folder on GitHubat commit 26da825

Compare with similar skills

Reproduce Failure 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.

Reproduce Failure compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Reproduce Failure this skillgoogle/heir929—~1.4kAutomated safety check: PassApache-2.0
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 3 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 yesterday
    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 google/heir

  • Lit To Bazel

    google/heir

    Official

    Converts MLIR lit test files to bazel run commands. An agent skill from google/heir.

    929 GitHub stars~447 tokensUpdated today
    Auto-check passed
  • E2E To Bazel

    google/heir

    Official

    Converts end-to-end (e2e) test targets or paths to bazel run commands for heir-opt.

    929 GitHub stars~394 tokensUpdated today
    Auto-check passed
  • Official

    Augments a bazel run CLI command for heir-opt with additional flags that dump the IR before each compiler pass, allowing the agent to inspect intermediate IR during compilation, identify a…

    929 GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Categories

Questions about Reproduce Failure

What does Reproduce Failure do?

Describes a decision tree of steps and skills to utilize when, starting from a test failure or the failure of bazel run command using heir-opt, you would like to produce a reproducing input IR that…. Reproduce Failure is an agent skill from google/heir, published by the product's own GitHub organization. Describes a decision tree of steps and skills to utilize when, starting from a test failure or the failure of bazel run command using heir-opt, you would like to produce a reproducing input IR that fails on a particular compiler pass.

When should I use Reproduce Failure?

Reproduce Failure fits situations like: tasks that involve Failing and flaky tests.

How do I install Reproduce Failure in Claude Code?

Run `npx skills add google/heir --skill reproduce-failure -a claude-code`. Or copy the skill folder (.agents/skills/reproduce_failure in google/heir) into .claude/skills/reproduce-failure in your project. Claude Code loads it when a task matches its description.

How do I install Reproduce Failure in Codex?

Run `npx skills add google/heir --skill reproduce-failure -a codex`. Or copy the skill folder (.agents/skills/reproduce_failure in google/heir) into .agents/skills/reproduce-failure in your project. Codex loads it when a task matches its description.

Can I use Reproduce Failure 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 google/heir --skill reproduce-failure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/reproduce-failure, .gemini/skills/reproduce-failure, .github/skills/reproduce-failure and .opencode/skills/reproduce-failure in your project.

What does Reproduce Failure need to run?

Going by SKILL.md and its folder, Reproduce Failure needs the command-line tools its instructions call (bazel).

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

Reproduce Failure is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Reproduce Failure use?

About 1.4k tokens (SKILL.md is roughly 5.6k 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 Reproduce Failure?

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

google (a GitHub organization, an official publisher) maintains it in google/heir, which has 929 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 9, 2026.

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