[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6997B7NY7K5V08MMTMAE1ZS":3,"skill-same:01M6997B7NY7K5V08MMTMAE1ZS":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M6997B7NY7K5V08MMTMAE1ZS","reproduce-failure",null,"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.","google\u002Fheir","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M69973GM7GX7K1C2GYBW099F",948,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fheir\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freproduce_failure\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"reproduce failure","reproduce","test","run","produce","compiler","bazel","decision","command","input","you","tree","when","opt","2026-11-10 10:12:30",false,"---\nname: reproduce-failure\ndescription: >-\n  Describes a decision tree of steps and skills to utilize when, starting from a\n  test failure or the failure of `bazel run` command using heir-opt, you would\n  like to produce a reproducing input IR that fails on a particular compiler\n  pass.\n---\n\n# Reproduce a test failure\n\n## Overview\n\nThis skill guides the agent in identifying an IR and compiler pass that\nreproduces a failure from a lit or e2e test target, or from a `bazel run`\ncommand that runs `heir-opt`.\n\n## Usage\n\nTo reproduce a failure, follow these steps.\n\n### Identify the starting point of the process\n\nThe user may input one of multiple \"starting points\" for a failure.\n\n1. A direct `bazel run` command.\n1. A `lit` test target or `bazel test` command pointing to such a target, such\n   as\n   `\u002F\u002Ftests\u002FTransforms\u002Fconvert_to_ciphertext_semantics:assign_layout.mlir.test`,\n1. A file path to a lit test, such as\n   `third_party\u002Fheir\u002Ftests\u002FTransforms\u002Fconvert_to_ciphertext_semantics\u002Fassign_layout.mlir`\n1. An end-to-end test target, such as\n   `\u002F\u002Ftests\u002FExamples\u002Flattigo\u002Fckks\u002Fdot_product_8f:dotproduct8f_test`,\n1. A filepath to an end-to-end test file, such as\n   `third_party\u002Fheir\u002Ftests\u002FExamples\u002Flattigo\u002Fckks\u002Fdot_product_8f\u002Fdot_product_8f_test.go`\n\nReiterate to the user that you understand which of these options are the\nstarting point, and if the user provides a starting point that doesn't fit into\none of these options, warn them and then ask for confirmation when improvising\nhow to convert their failure to a `bazel run` command in the next step.\n\n### Identify the right `bazel run` command\n\nFor option 1 (A direct `bazel run` command), nothing is needed, continue to the\nnext step.\n\nFor option 2, use the `lit_to_bazel` skill.\n\nFor option 3, use the `e2e_to_bazel` skill.\n\nAt the end of this step, you should have a `bazel run` command that reproduces\nthe user's error, but that command may run many compiler passes in a pipeline.\nThe remaining steps will reduce the `bazel run` command to a more minimal\nreproducer.\n\nRun it to ensure it reproduces the user's error.\n\n### Identify the specific IR, pass, and pass options\n\nUse the `dump_intermediate_ir` skill to augment the `bazel run` command with\nappropriate flags, so that it writes relevant files that contain the IR and pass\noptions.\n\nThen inspect the right file (usually the last file dumped before an error\noccurs) to identify the IR and pass options. The dumped IR should include near\nthe top of the file, a comment like\n\n```mlir\n\u002F\u002F -----\u002F\u002F 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} \u002F\u002F----- \u002F\u002F\n```\n\nThe part after `:` is the relevant pass name and options that will be needed in\nthe next step. The rest of the file content is the IR that will be needed in the\nnext step.\n\n### Construct the `bazel run` command for the individual pass\n\nGiven the information from previous steps, construct a `bazel run` command of\nthe form:\n\n```bash\nbazel run \u002F\u002Ftools:heir-opt -- \\\n--pass-pipeline=\"\u003CPASS_AND_OPTIONS>\" \\\n\u003CIR_FILE>\n```\n\nwhere `\u003CPASS_AND_OPTIONS>` corresponds to the \"pass name and options\" from the\nprevious step, and `\u003CIR_FILE>` corresponds to the dumped IR for that pass.\n\nAt this step, run the new `bazel run` command and make sure that it reproduces\nthe error.\n\n### Create a reproducing `lit` test file\n\nCopy the IR to a new `lit` regression test file with the `bazel run` command\nmodified to a `\u002F\u002F RUN:` line.\n\nThe new test should live in `third_party\u002Fheir\u002Ftests\u002FRegression\u002F` and have at the\ntop of the file a comment describing the origin of the reproducer along with the\n`\u002F\u002F RUN:` line.\n\nFor example, if the reduced `bazel run` command from the previous step was\n\n```bash\nbazel run \u002F\u002Ftools:heir-opt -- \\\n--pass-pipeline=\"canonicalze{cse-between-iterations=true}\" \\\n\u002Ftmp\u002Fmlir\u002Ffoo.mlir\n```\n\nand the original command was\n`bazel run \u002F\u002Ftools:heir-opt -- --big-pipeline \u002Fpath\u002Fto\u002Ffile.mlir`\n\nThen the corresponding lit file should start with\n\n```mlir\n\u002F\u002F This file is a minimal reproducer of a failure originally produced with\n\u002F\u002F\n\u002F\u002F    heir-opt --big-pipeline \u002Fpath\u002Fto\u002Ffile.mlir\n\u002F\u002F\n\u002F\u002F RUN: heir-opt --pass-pipeline=\"canonicalze{cse-between-iterations=true}\" %s\n```\n\nBelow that header, place the reproducing IR from the previous step. Then confirm\nthe test exercises the test failure once more by running\n`bazel test \u002F\u002Ftests\u002FRegression:\u003Cname_of_file.mlir>.test`.\n\nThe `\u003Cname_of_file.mlir>` should be chosen appropriately according to the\nfollowing heuristic:\n\n- If you know of a particular GitHub issue number, use the number, like\n  `issue_1480.mlir`.\n- If you have a starting test file or target, name it similar to that file,\n  e.g., `dot_product_8f_regression.mlir`\n- If it makes sense, incorporate the name of the pass, e.g.,\n  `dot_product_secret_to_ckks.mlir`\n- If no natural name makes sense, use `RENAME_ME_regression_test.mlir`\n\n## Gotchas\n\n- Ensure that at each step you can still reproduce the failure. If at any step,\n  a newly reduced command fails to reproduce the failure, stop and report this\n  to the user, asking for assistance.\n\n```markdown\nCopy this checklist and track progress:\n\n- [ ] Step 1: Identify the starting point of the process\n- [ ] Step 2: Identify the right `bazel run` command\n- [ ] Step 3: Identify the specific IR, pass, and pass options\n- [ ] Step 4: Construct the `bazel run` command for the individual pass\n- [ ] Step 5: Create a reproducing `lit` test file\n\nEach step corresponds to a section mentioned above.\n```\n\n\u003C!-- mdformat global-off -->\n","# Reproduce a test failure\n\n## Overview\n\nThis skill guides the agent in identifying an IR and compiler pass that\nreproduces a failure from a lit or e2e test target, or from a `bazel run`\ncommand that runs `heir-opt`.\n\n## Usage\n\nTo reproduce a failure, follow these steps.\n\n### Identify the starting point of the process\n\nThe user may input one of multiple \"starting points\" for a failure.\n\n1. A direct `bazel run` command.\n1. A `lit` test target or `bazel test` command pointing to such a target, such\n   as\n   `\u002F\u002Ftests\u002FTransforms\u002Fconvert_to_ciphertext_semantics:assign_layout.mlir.test`,\n1. A file path to a lit test, such as\n   `third_party\u002Fheir\u002Ftests\u002FTransforms\u002Fconvert_to_ciphertext_semantics\u002Fassign_layout.mlir`\n1. An end-to-end test target, such as\n   `\u002F\u002Ftests\u002FExamples\u002Flattigo\u002Fckks\u002Fdot_product_8f:dotproduct8f_test`,\n1. A filepath to an end-to-end test file, such as\n   `third_party\u002Fheir\u002Ftests\u002FExamples\u002Flattigo\u002Fckks\u002Fdot_product_8f\u002Fdot_product_8f_test.go`\n\nReiterate to the user that you understand which of these options are the\nstarting point, and if the user provides a starting point that doesn't fit into\none of these options, warn them and then ask for confirmation when improvising\nhow to convert their failure to a `bazel run` command in the next step.\n\n### Identify the right `bazel run` command\n\nFor option 1 (A direct `bazel run` command), nothing is needed, continue to the\nnext step.\n\nFor option 2, use the `lit_to_bazel` skill.\n\nFor option 3, use the `e2e_to_bazel` skill.\n\nAt the end of this step, you should have a `bazel run` command that reproduces\nthe user's error, but that command may run many compiler passes in a pipeline.\nThe remaining steps will reduce the `bazel run` command to a more minimal\nreproducer.\n\nRun it to ensure it reproduces the user's error.\n\n### Identify the specific IR, pass, and pass options\n\nUse the `dump_intermediate_ir` skill to augment the `bazel run` command with\nappropriate flags, so that it writes relevant files that contain the IR and pass\noptions.\n\nThen inspect the right file (usually the last file dumped before an error\noccurs) to identify the IR and pass options. The dumped IR should include near\nthe top of the file, a comment like\n\n```mlir\n\u002F\u002F -----\u002F\u002F 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} \u002F\u002F----- \u002F\u002F\n```\n\nThe part after `:` is the relevant pass name and options that will be needed in\nthe next step. The rest of the file content is the IR that will be needed in the\nnext step.\n\n### Construct the `bazel run` command for the individual pass\n\nGiven the information from previous steps, construct a `bazel run` command of\nthe form:\n\n```bash\nbazel run \u002F\u002Ftools:heir-opt -- \\\n--pass-pipeline=\"\u003CPASS_AND_OPTIONS>\" \\\n\u003CIR_FILE>\n```\n\nwhere `\u003CPASS_AND_OPTIONS>` corresponds to the \"pass name and options\" from the\nprevious step, and `\u003CIR_FILE>` corresponds to the dumped IR for that pass.\n\nAt this step, run the new `bazel run` command and make sure that it reproduces\nthe error.\n\n### Create a reproducing `lit` test file\n\nCopy the IR to a new `lit` regression test file with the `bazel run` command\nmodified to a `\u002F\u002F RUN:` line.\n\nThe new test should live in `third_party\u002Fheir\u002Ftests\u002FRegression\u002F` and have at the\ntop of the file a comment describing the origin of the reproducer along with the\n`\u002F\u002F RUN:` line.\n\nFor example, if the reduced `bazel run` command from the previous step was\n\n```bash\nbazel run \u002F\u002Ftools:heir-opt -- \\\n--pass-pipeline=\"canonicalze{cse-between-iterations=true}\" \\\n\u002Ftmp\u002Fmlir\u002Ffoo.mlir\n```\n\nand the original command was\n`bazel run \u002F\u002Ftools:heir-opt -- --big-pipeline \u002Fpath\u002Fto\u002Ffile.mlir`\n\nThen the corresponding lit file should start with\n\n```mlir\n\u002F\u002F This file is a minimal reproducer of a failure originally produced with\n\u002F\u002F\n\u002F\u002F    heir-opt --big-pipeline \u002Fpath\u002Fto\u002Ffile.mlir\n\u002F\u002F\n\u002F\u002F RUN: heir-opt --pass-pipeline=\"canonicalze{cse-between-iterations=true}\" %s\n```\n\nBelow that header, place the reproducing IR from the previous step. Then confirm\nthe test exercises the test failure once more by running\n`bazel test \u002F\u002Ftests\u002FRegression:\u003Cname_of_file.mlir>.test`.\n\nThe `\u003Cname_of_file.mlir>` should be chosen appropriately according to the\nfollowing heuristic:\n\n- If you know of a particular GitHub issue number, use the number, like\n  `issue_1480.mlir`.\n- If you have a starting test file or target, name it similar to that file,\n  e.g., `dot_product_8f_regression.mlir`\n- If it makes sense, incorporate the name of the pass, e.g.,\n  `dot_product_secret_to_ckks.mlir`\n- If no natural name makes sense, use `RENAME_ME_regression_test.mlir`\n\n## Gotchas\n\n- Ensure that at each step you can still reproduce the failure. If at any step,\n  a newly reduced command fails to reproduce the failure, stop and report this\n  to the user, asking for assistance.\n\n```markdown\nCopy this checklist and track progress:\n\n- [ ] Step 1: Identify the starting point of the process\n- [ ] Step 2: Identify the right `bazel run` command\n- [ ] Step 3: Identify the specific IR, pass, and pass options\n- [ ] Step 4: Construct the `bazel run` command for the individual pass\n- [ ] Step 5: Create a reproducing `lit` test file\n\nEach step corresponds to a section mentioned above.\n```\n\n\u003C!-- mdformat global-off -->\n",{"name":5,"description":7},"main","016c0b1e281a20df45b81c31ec893cf1198ff10b",".agents\u002Fskills\u002Freproduce_failure",185,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fheir","https:\u002F\u002Fheir.dev\u002F","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-15 00:27:48",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add google\u002Fheir --skill reproduce-failure",{"tool":54,"command":55},"bunx","bunx skills add google\u002Fheir --skill reproduce-failure",{"tool":57,"command":58},"pnpm","pnpm dlx skills add google\u002Fheir --skill reproduce-failure","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fheir\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freproduce_failure\u002FSKILL.md",true,[62],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"scripts\u002Fschedule_video_meeting.py","SCRIPT","脚本",3277,"https:\u002F\u002Fgithub.com\u002FChangyYou\u002FCua-Lark\u002Fblob\u002Fmain\u002Fskills\u002Fschedule-video-meeting\u002Fscripts\u002Fschedule_video_meeting.py",[69,90,109],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":33},"01M69979ENN9XYV6AZACX1RK06","lit-to-bazel","Converts MLIR lit test files to `bazel run` commands. Use when you need to convert a failing MLIR lit test target (containing RUN lines) to a shell command whose flags can be modified for further analysis and debugging.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fheir\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Flit_to_bazel\u002FSKILL.md",[],[76,25,77,78,21,79,22,80,81,82,83,27,84,85,86,29,87,88,89,31],"lit to bazel","lit","mlir","debugging","failing","analysis","shell","convert","use","files","commands","can","for","shell command",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":101,"publishedAt":33},"01M699782STZMR7Y5YT8M2EM4Q","e2e-to-bazel","Converts end-to-end (e2e) test targets or paths to `bazel run` commands for `heir-opt`. Use when you need to convert an e2e test target (where flags are defined in the BUILD file) to a shell command whose flags can be modified for further analysis and debugging.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fheir\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fe2e_to_bazel\u002FSKILL.md",[96],{"categoryNo":97,"categoryName":98,"taxonomyType":99,"taxonomyTypeDesc":100},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[102,25,103,32,29,31,89,88,87,104,21,79,105,81,83,27,84,106,107,108],"e2e to bazel","e2e","targets","file","e2e test","build","end",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":33},"01M69976BPZSY7W3H87Q5ER5R1","dump-intermediate-ir","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 particular pass at which the pipeline fails, or extract the corresponding IR input to a particular pass for further debugging.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fheir\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdump_intermediate_ir\u002FSKILL.md",[],[116,117,118,119,120,79,22,24,25,121,27,122,123,28,124,125,126,88,32],"intermediate","dump","dump intermediate ir","cli","at","pipeline","extract","flags","with","which","inspect"]