Official agent skill

Lit To Bazel

by google in google/heir

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

OfficialApache-2.0Auto-check passedDevelopment

Install Lit To Bazel

skills CLI
$ npx skills add google/heir --skill lit-to-bazel -a claude-code

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

GitHub CLI
$ gh skill install google/heir lit-to-bazel --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/lit_to_bazel .claude/skills/lit-to-bazel && 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
lit-to-bazel
GitHub stars
929
Token cost
~447 tokens
SKILL.md length
184 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Development work in your project
  • SKILL.md covers Overview, Usage and Gotchas
  • Calls bazel

What it does

Lit To Bazel is an agent skill from google/heir, published by the product's own GitHub organization. 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.

Its SKILL.md is about 450 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 Development. The repository describes itself as: The compiler for homomorphic encryption. The licence is Apache-2.0.

When your agent uses it

  • Development work in your project

Example prompts

  • “Use the lit-to-bazel skill to convert MLIR lit test files to bazel run commands. An agent skill from google/heir”
  • “/lit-to-bazel”

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

Lit To Bazel loads about 447 tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 184 words of instructions outside code blocks.

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

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). 184 words, ~447 tokens.

Download SKILL.mdSave it as .claude/skills/lit-to-bazel/SKILL.md (or your agent's skills folder).
name
lit-to-bazel
description
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.

Lit To Bazel

Overview

This skill guides the agent in using the lit_to_bazel tool to convert MLIR test files to executable commands.

Usage

Converting a Test File

To convert a lit test file to a bazel run command, use the following command recipes:

bash
bazel run //third_party/heir/scripts:lit_to_bazel -- {test_file_path}

Replace {test_file_path} with the absolute path to the test file. The absolute path is necessary because the bazel run command runs relative to its runfiles directory, and so a relative path will not be relative to the VCS root of the project.

Gotchas

  • Absolute Paths: The tool replaces %s in RUN lines with the absolute path of the test file to ensure it works in the sandbox.
  • Piped RUN commands: The tool supports piped RUN lines, such as piping heir-opt into heir-translate.
  • Complex RUN commands: Some very complex RUN lines are not supported, such as lit test files with multiple RUN lines that interact via writing to and reading from temporary files. When encountering situations like this, you should stop and warn the user.
  • Non-lit tests: Some test targets are not lit tests, and these do not need the lit_to_bazel tool.
markdown
Copy this checklist and track progress:

- [ ] Step 1: Identify the test file to convert.
- [ ] Step 2: Run the `lit_to_bazel` tool on the file.
- [ ] Step 3: Inspect the generated command or run it.
- [ ] Step 4: Verify execution results.
<!-- 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/lit_to_bazel of google/heir.

Open the folder on GitHubat commit 26da825

Compare with similar skills

Lit To Bazel 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.

Lit To Bazel compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lit To Bazel this skillgoogle/heir929—~447Automated safety check: PassApache-2.0
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from google/heir

  • 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
  • Official

    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…

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

Categories

Questions about Lit To Bazel

What does Lit To Bazel do?

Converts MLIR lit test files to bazel run commands. An agent skill from google/heir. Lit To Bazel is an agent skill from google/heir, published by the product's own GitHub organization. Converts MLIR lit test files to bazel run commands.

When should I use Lit To Bazel?

Lit To Bazel fits situations like: development work in your project.

How do I install Lit To Bazel in Claude Code?

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

How do I install Lit To Bazel in Codex?

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

Can I use Lit To Bazel 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 lit-to-bazel -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lit-to-bazel, .gemini/skills/lit-to-bazel, .github/skills/lit-to-bazel and .opencode/skills/lit-to-bazel in your project.

What does Lit To Bazel need to run?

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

Does Lit To Bazel 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 Lit To Bazel 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 Lit To Bazel use?

Lit To Bazel 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 Lit To Bazel use?

About 447 tokens (SKILL.md is roughly 1.8k 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 Lit To Bazel?

Skills that share tags, products or a category with Lit To Bazel: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lit To Bazel?

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.