Agent skill

Add Ttir Builder Op

by tenstorrent in tenstorrent/tt-mlir

Add full builder API support (@tag, @parse, @split) for a TTIR op.

Apache-2.0Auto-check passedMarketing & SEO

Install Add Ttir Builder Op

skills CLI
$ npx skills add tenstorrent/tt-mlir --skill add-ttir-builder-op -a claude-code

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

GitHub CLI
$ gh skill install tenstorrent/tt-mlir add-ttir-builder-op --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/tenstorrent/tt-mlir.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-ttir-builder-op .claude/skills/add-ttir-builder-op && 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
add-ttir-builder-op
GitHub stars
314
Token cost
~1.6k tokens
SKILL.md length
660 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add full builder API support (@tag, @parse, @split) for a TTIR op.

  • Works in 6 steps: Verify the Op and Find a Reference → Ensure Golden Function Has Correct… → Add @tag, @parse, @split Methods → …
  • The user wants to add builder support for a new TTIR op
  • SKILL.md covers Overview of Files, Step 1: Verify the Op and Find…, Step 2: Ensure Golden Function… and Step 3: Add @tag, @parse,…, plus 4 more sections
  • Calls cmake and pytest

What it does

Add Ttir Builder Op is an agent skill from tenstorrent/tt-mlir. Add full builder API support (@tag, @parse, @split) for a TTIR op. Use this skill whenever the user wants to add builder support for a new TTIR op, upgrade an existing opproxy-based op to use @tag/@parse/@split decorators, or asks about how to add builder API for an op in ttirbuilder.py. Also trigger when the user mentions adding tag/parse/split for an op, or wants to make an op work with the parse/split test infrastructure.

Its SKILL.md is about 1.6k 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 Marketing & SEO, covering A/B testing. The repository describes itself as: Tenstorrent MLIR compiler. The licence is Apache-2.0.

When your agent uses it

  • The user wants to add builder support for a new TTIR op
  • Upgrade an existing opproxy-based op to use @tag/@parse/@split decorators
  • Asks about how to add builder API for an op in ttirbuilder.py
  • The user mentions adding tag/parse/split for an op

Example prompts

  • “/add-ttir-builder-op”

Requirements

  • Python 3

Workflow steps

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

  1. Verify the Op and Find a Reference
  2. Ensure Golden Function Has Correct Signature
  3. Add @tag, @parse, @split Methods
  4. Add MLIR Snippet for Parse/Split Tests
  5. Verify Test Wrapper Compatibility
  6. Build and Test

What it can do on your machine

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

    • cmake
    • pytest

    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

Add Ttir Builder Op loads about 1.6k tokens when it runs. Until then it costs about 113 tokens; SKILL.md has 660 words of instructions outside code blocks.

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

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 tenstorrent/tt-mlir at commit 78b7044, republished under its Apache-2.0 licence (© tenstorrent). 660 words, ~1,615 tokens.

Download SKILL.mdSave it as .claude/skills/add-ttir-builder-op/SKILL.md (or your agent's skills folder).
name
add-ttir-builder-op
description
Add full builder API support (@tag, @parse, @split) for a TTIR op. Use this skill whenever the user wants to add builder support for a new TTIR op, upgrade an existing _op_proxy-based op to use @tag/@parse/@split decorators, or asks about how to add builder API for an op in ttir_builder.py. Also trigger when the user mentions adding tag/parse/split for an op, or wants to make an op work with the parse/split test infrastructure.

Adding TTIR Builder Op Support

This skill walks through adding full @tag, @parse, and @split builder support for a TTIR op. The process touches 3 files and creates 1 test file.

Overview of Files

FilePurpose
tools/builder/ttir/ttir_builder.pyBuilder methods (@tag, @parse, @split)
tools/golden/mapping.pyGolden function mappings (torch reference implementations)
test/python/golden/mlir_snippets/ttir/ttir_<op_name>.mlirMLIR snippet for parse/split tests
include/ttmlir/Dialect/TTIR/IR/TTIROps.tdOp definitions (read-only reference)

Step 1: Verify the Op and Find a Reference

Check include/ttmlir/Dialect/TTIR/IR/TTIROps.td for the op definition to understand its type (unary, binary, reduction, convolution, etc.) and any special attributes.

Then find an existing op of the same type that already has full @tag/@parse/@split support in tools/builder/ttir/ttir_builder.py. This is your reference implementation. Some examples:

  • Unary elementwise (1 input): sigmoid (~line 7591), cos (~line 2459)
  • Binary elementwise (2 inputs): add (~line 7467), multiply (~line 7077)
  • Ops with extra attributes: sort (~line 3689), rearrange (~line 1083)
  • Reduction ops: sum (~line 7325), reduce_and (~line 1208)
  • Multi-output ops: max_pool2d_with_indices (~line 4224)
  • Conv/matmul ops: conv2d (~line 11102), matmul (~line 12349)

Search for @tag(ttir. in ttir_builder.py to find all ops with full support. Pick the closest match to your new op and use it as a template throughout the remaining steps.

Step 2: Ensure Golden Function Has Correct Signature

Check tools/golden/mapping.py for the op's entry in the golden mapping dict.

The golden function MUST match how the @tag method calls it. The @tag method passes all input golden tensors followed by mlir_output_type as the last argument. If the mapping points directly to a bare torch function (e.g., torch.nn.functional.gelu), it will fail at runtime because those don't accept an output type parameter.

Fix: Create a wrapper golden function

Look at how the reference op's golden function is defined in tools/golden/mapping.py and follow the same pattern. The wrapper calls the underlying torch function and converts the output dtype:

python
def ttir_<op_name>_golden(
    input_tensor: GoldenMapTensor, ..., output_type_mlir: Type
) -> GoldenMapTensor:
    output_dtype = mlir_type_to_torch_dtype(output_type_mlir)
    return torch.<op_function>(input_tensor, ...).to(output_dtype)

The number and type of parameters before output_type_mlir depends on the op — match your reference op's golden function signature.

Then update the mapping dict to point to the new wrapper.

If the golden function already has the correct signature, no changes are needed.

Show full SKILL.md (319 more words)Show less

Step 3: Add @tag, @parse, @split Methods

In tools/builder/ttir/ttir_builder.py, replace the existing _op_proxy method (if any) or add new methods. Follow your reference op's implementation closely, substituting:

  • The op class name (e.g., SigmoidOp -> <OpName>Op)
  • Method names (e.g., sigmoid -> <op_name>)
  • Module/builder variable names in split (e.g., sigmoid_module -> <op_name>_module)
  • Input accessors in parse/split (unary uses old_op.input, binary uses old_op.lhs/old_op.rhs — check your reference)

Key points that apply to all op types:

  • The @tag method must return OpResult (not OpView)
  • get_opview_from_method, get_opview_from_parser, get_opview_from_split retrieve the MLIR op class from the decorator metadata
  • Golden tensors must be computed and set via _set_golden_tensor in all three methods
  • Input operands must be presharded if necessary via _annotate_presharded_arg in all @split methods
  • The @split method creates an isolated Module with its own TTIRBuilder instance

Step 4: Add MLIR Snippet for Parse/Split Tests

Create test/python/golden/mlir_snippets/ttir/ttir_<op_name>.mlir.

The test_parse_split_ops.py test auto-discovers all .mlir files in this directory — no test code changes needed.

Look at an existing snippet for a similar op to get the right format. The snippet should define a minimal module with a func.func that exercises the op. For example, find existing snippets with:

bash
ls test/python/golden/mlir_snippets/ttir/

Step 5: Verify Test Wrapper Compatibility

Check the relevant test file (e.g., test/python/golden/ttir_ops/eltwise/test_ttir_unary.py for elementwise ops) for the existing test wrapper. Since output_type and loc are added as optional parameters, existing wrappers that call builder.<op_name>(in0, unit_attrs=unit_attrs) remain backward-compatible.

If no test wrapper exists yet, add one following the pattern of nearby ops in the same test file.

Step 6: Build and Test

bash
# Rebuild (copies source to build/python_packages/)
cmake --build build

# Test parse/split (auto-discovered from MLIR snippet)
pytest test/python/golden/test_parse_split_ops.py -k "ttir_<op_name>"

# Test builder (adjust test file path based on op type)
export SYSTEM_DESC_PATH=$(pwd)/ttrt-artifacts/system_desc.ttsys
pytest test/python/golden/ttir_ops/eltwise/test_ttir_unary.py -k "<op_name>"

The rebuild step is essential because tests run against build/python_packages/, not the source files.

Checklist

  • Op exists in TTIROps.td — identified op type and found reference implementation
  • Golden function in tools/golden/mapping.py accepts output_type_mlir as last arg
  • @tag method added in ttir_builder.py (returns OpResult, not OpView)
  • @parse method added in ttir_builder.py
  • @split method added in ttir_builder.py
  • MLIR snippet created in test/python/golden/mlir_snippets/ttir/
  • cmake --build build run to install changes
  • Parse/split tests pass
  • Builder tests pass

© tenstorrent, 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 .claude/skills/add-ttir-builder-op of tenstorrent/tt-mlir.

Open the folder on GitHubat commit 78b7044

Compare with similar skills

Add Ttir Builder Op 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.

Add Ttir Builder Op compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Ttir Builder Op this skilltenstorrent/tt-mlir314—~1.6kAutomated safety check: PassApache-2.0
Ab Testingcoreyhaines31/marketingskills54k3 repos~3.1kAutomated safety check: PassMIT
AnalyticsNexus-JPF/note-companion8707 repos~2.2kAutomated safety check: PassMIT
Ad Test Designeraaron-he-zhu/aaron-marketing-skills2.9k2 repos~2.8kAutomated safety check: PassApache-2.0
Ab Test Analyzeririnabuht12-oss/marketing-skills4.1k—~1.4kAutomated safety check: PassNone
Ab Test Store Listingappeeky/aso-skills2.2k—~1.8kAutomated safety check: PassMIT

Similar skills

  • Ab Testing

    coreyhaines31/marketingskills

    When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program.

    54k GitHub starsUsed in 3 repos~3.1k tokens
    Marketing & SEOAuto-check passed
  • Analytics

    Nexus-JPF/note-companion

    When the user wants to set up, improve, or audit analytics tracking and measurement.

    870 GitHub starsUsed in 7 repos~2.2k tokens
    Marketing & SEOAuto-check passed
  • Ad Test Designer

    aaron-he-zhu/aaron-marketing-skills

    A skill your agent uses when the user asks to "design an A/B test", "set up a creative/landing test", "run an incrementality test", or "is this result statistically and practically material?"…

    2.9k GitHub starsUsed in 2 repos~2.8k tokens
    Marketing & SEOAuto-check passed
  • Ab Test Analyzer

    irinabuht12-oss/marketing-skills

    Statistical significance calculator for A/B test results with sample size requirements, segment breakdowns, and hypothesis generation.

    4.1k GitHub stars~1.4k tokensUpdated 17 days ago
    Marketing & SEOAuto-check passed
  • Ab Test Store Listing

    appeeky/aso-skills

    When the user wants to A/B test App Store product page elements to improve conversion rate.

    2.2k GitHub stars~1.8k tokensUpdated 4 days ago
    Marketing & SEOAuto-check passed
  • Ab Test Setup

    freekmurze/dotfiles

    When the user wants to plan, design, or implement an A/B test or experiment.

    1k GitHub starsUsed in 14 repos~1.8k tokens
    Marketing & SEOAuto-check passed

More from tenstorrent/tt-mlir

All 9 skills in this repo
  • Add Op

    tenstorrent/tt-mlir

    How to add a new operation (op) to the tt-mlir compiler across all layers: TTIR/TTNN dialect definitions, StableHLO composite conversion, TTIR-to-TTNN conversion, EmitC/EmitPy conversions…

    314 GitHub stars~11k tokensUpdated yesterday
    Auto-check passed
  • Run Ops Mlir Snippets

    tenstorrent/tt-mlir

    Compile and optionally execute every func.func in an ops.mlir-style snippet file (or every .mlir file in a directory) using runopsmlirsnippets.py.

    314 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Add a new composite op decomposition pattern to the TTMetal pipeline.

    314 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Uplift Ttsim CI

    tenstorrent/tt-mlir

    Uplift the TTSim version used by tt-mlir CI and refresh WH/BH simulator skips.

    314 GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Validate a tt-mlir PR against tt-xla by creating a cherry-picked branch and triggering CI.

    314 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check passed
  • Triage Tt Metal Asserts

    tenstorrent/tt-mlir

    Triage a tt-metal uplift diff or digest of TTFATAL validation changes against what tt-mlir guarantees at each optimization level (0: workarounds only, 1: optimizer with DRAM-only fallback, 2: L1…

    314 GitHub stars~7.8k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Add Ttir Builder Op

What does Add Ttir Builder Op do?

Add full builder API support (@tag, @parse, @split) for a TTIR op. Add Ttir Builder Op is an agent skill from tenstorrent/tt-mlir. Add full builder API support (@tag, @parse, @split) for a TTIR op.

When should I use Add Ttir Builder Op?

Add Ttir Builder Op fits situations like: the user wants to add builder support for a new TTIR op; upgrade an existing opproxy-based op to use @tag/@parse/@split decorators; asks about how to add builder API for an op in ttirbuilder.py; the user mentions adding tag/parse/split for an op.

How do I install Add Ttir Builder Op in Claude Code?

Run `npx skills add tenstorrent/tt-mlir --skill add-ttir-builder-op -a claude-code`. Or copy the skill folder (.claude/skills/add-ttir-builder-op in tenstorrent/tt-mlir) into .claude/skills/add-ttir-builder-op in your project. Claude Code loads it when a task matches its description.

How do I install Add Ttir Builder Op in Codex?

Run `npx skills add tenstorrent/tt-mlir --skill add-ttir-builder-op -a codex`. Or copy the skill folder (.claude/skills/add-ttir-builder-op in tenstorrent/tt-mlir) into .agents/skills/add-ttir-builder-op in your project. Codex loads it when a task matches its description.

Can I use Add Ttir Builder Op 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 tenstorrent/tt-mlir --skill add-ttir-builder-op -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-ttir-builder-op, .gemini/skills/add-ttir-builder-op, .github/skills/add-ttir-builder-op and .opencode/skills/add-ttir-builder-op in your project.

What does Add Ttir Builder Op need to run?

Going by SKILL.md and its folder, Add Ttir Builder Op needs the command-line tools its instructions call (cmake and pytest). Our summary lists: Python 3.

Does Add Ttir Builder Op 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 Add Ttir Builder Op 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 Add Ttir Builder Op use?

Add Ttir Builder Op 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 Add Ttir Builder Op use?

About 1.6k tokens (SKILL.md is roughly 6.5k 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 Add Ttir Builder Op?

Skills that share tags, products or a category with Add Ttir Builder Op: Ab Testing (coreyhaines31/marketingskills, 54k stars), Analytics (Nexus-JPF/note-companion, 870 stars), Ad Test Designer (aaron-he-zhu/aaron-marketing-skills, 2.9k stars) and Ab Test Analyzer (irinabuht12-oss/marketing-skills, 4.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Ttir Builder Op?

tenstorrent (a GitHub organization) maintains it in tenstorrent/tt-mlir, which has 314 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 10, 2026.

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