mlir-development

mlir-development is a skill for Claude Code from gmh5225/awesome-llvm-security. It costs 54 tokens per session (2,503 once invoked), scanned A, original, MIT.

A development guide for MLIR, a compiler framework for representing and transforming programs at several abstraction levels, and CIR, an intermediate representation used with Clang. It covers domain-specific compilers and optimisation pipelines.

In plain words
What is it for?
Use it when building ML compilers, domain-specific languages, or multi-stage compilation pipelines. It helps structure custom dialects and progressively lower programs toward LLVM, GPU, or other target representations.
Why use it?
It gives a shared approach to moving code from high-level domain languages toward lower-level target code. The guide explains reusable compiler components, custom operation groups called dialects, types, and transformations.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when building ML compilers, domain-specific languages, or multi-stage compilation pipelines. It helps structure custom dialects and progressively lower programs toward LLVM, GPU, or other target representations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gmh5225/awesome-llvm-security/mlir-development
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gmh5225/awesome-llvm-security --skill mlir-development
Clone the repo
git clone --depth 1 https://github.com/gmh5225/awesome-llvm-security

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mlir-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/gmh5225/awesome-llvm-security/mlir-development/github.svg)](https://agentmods.dev/skills/gmh5225/awesome-llvm-security/mlir-development)
Your own site
<a href="https://agentmods.dev/skills/gmh5225/awesome-llvm-security/mlir-development"><img src="https://agentmods.dev/badge/skills/gmh5225/awesome-llvm-security/mlir-development/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mlir-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/gmh5225/awesome-llvm-security/mlir-development"><img src="https://agentmods.dev/badge/skills/gmh5225/awesome-llvm-security/mlir-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.02503
Opus 5 $0.00027 $0.01252
Sonnet 5 $0.00011 $0.00501
Haiku 4.5 $0.00005 $0.00250

Measured 9d ago against content hash 529f6f645c21, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

mlir-development scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/mlir-development/SKILL.md · 364 lines

How it starts

The opening of the file, as written. The whole thing — 364 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MLIR Development Skill

This skill covers MLIR (Multi-Level Intermediate Representation) development for building domain-specific compilers and high-level optimization pipelines.

MLIR Overview

What is MLIR?

MLIR is a compiler infrastructure that enables building reusable and extensible compiler components. It provides:

  • Hierarchical, multi-level IR representation
  • Extensible operation and type system
  • Progressive lowering between abstraction levels
  • Rich transformation infrastructure

Architecture

High-Level DSL
     ↓
Domain-Specific Dialects (e.g., TensorFlow, PyTorch)
     ↓
Mid-Level Dialects (e.g., Linalg, Affine)
     ↓
Low-Level Dialects (e.g., LLVM, GPU)
     ↓
Target Code

Core Concepts

Dialects

Dialects are groupings of operations, types, and attributes:

// Define a custom dialect
class MyDialect : public mlir::Dialect {
public:
    explicit MyDialect(mlir::MLIRContext *context)
        : Dialect("my_dialect", context, 
                  mlir::TypeID::get<MyDialect>()) {
        addOperations<
            MyAddOp,
            MyMulOp,
            MyFuncOp
        >();
        addTypes<MyTensorType>();
    }
    
    static llvm::StringRef getDialectNamespace() { 
        return "my_dialect"; 
    }
};

Operations

// Define using ODS (Operation Definition Specification)
// In TableGen file (.td)
def MyAddOp : Op<MyDialect, "add", [Pure]> {
    let summary = "Add two tensors";
    let description = [{
        Performs element-wise addition of two tensors.
    }];
    
    let arguments = (ins 
        AnyTensor:$lhs,
        AnyTensor:$rhs
    );
    
    let results = (outs 
        AnyTensor:$result
    );
    
    let assemblyFormat = [{
        $lhs `,` $rhs attr-dict `:` type($result)
    }];
}

Types and Attributes

// Custom type definition
class MyTensorType : public mlir::Type::TypeBase<
    MyTensorType, mlir::Type, MyTensorTypeStorage> {
public:
    using Base::Base;
    
    static MyTensorType get(mlir::MLIRContext *context,
                            llvm::ArrayRef<int64_t> shape,
                            mlir::Type elementType) {
        return Base::get(context, shape, elementType);
    }
    
    llvm::ArrayRef<int64_t> getShape() const;
    mlir::Type getElementType() const;
};

Read the full file on GitHub · 364 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 364 lines · 54 tokens per session scan A 529f6f645c21

Subscribe to this mod's changes

mlir-development is a skill published in the GitHub repository gmh5225/awesome-llvm-security (880 stars, last pushed 25d ago), licensed MIT. It adds 54 tokens to every session and 2,503 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

clangd-graph-rag

This skill enables deep semantic and structural analysis of C/C++ codebases using a pre-built Neo4j GraphRAG. It provides insights into call chains, class hierarchies, macro causality, and type aliases.

2015xli/clangd-graph-rag · 0 tokens

zoom-meeting-sdk-unreal

Zoom Meeting SDK for Unreal Engine wrapper integrations. Use when building Unreal projects that embed Zoom meetings with C++ and Blueprint wrappers, including wrapper-to-SDK mapping concerns.

anthropics/knowledge-work-plugins · 41 tokens

ax-cpp-gen

Use when writing C++ code with axllm for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.

ax-llm/ax · 48 tokens

doca-argp

Use this skill for hands-on DOCA Arg Parser CLI work on a shipped sample or new DOCA-using app — adding / removing / renaming flags; wiring docaargpinit → register params → docaargpstart → docaargpdestroy in order; picking a parameter type from the full public enum (DOCAARGPTYPESTRING, INT, BOOLEAN, DEVICE, DEVICEREP…

NVIDIA/skills · 267 tokens

cpu-kernels

Provides guidance for writing, optimizing, and benchmarking C++ CPU kernels with SIMD intrinsics (AVX2/AVX512) for the Hugging Face kernels ecosystem. Includes a two-phase workflow: Phase 1 correctness (generic → AVX2) and Phase 2 performance exploration (AVX512 with branching trial loop), runtime CPU dispatch, OpenMP…

huggingface/kernels · 89 tokens

embedded-stm32

Best practices for embedded C/C++ development on STM32 microcontrollers using the HAL, covering peripherals, DMA, interrupts, memory constraints, and hardware-focused testing. Use when writing STM32 HAL code, configuring peripherals generated by STM32CubeMX, working with interrupts or DMA, debugging with SWD/JTAG…

Mindrally/skills · 87 tokens