aiter: Skill for Claude Code

.claude/skills/flydsl-kernel-authoring/SKILL.md

flydsl-kernel-authoring is a skill for Claude Code from ROCm/aiter. It costs 66 tokens per session (11,288 once invoked), scanned C, original, MIT.

A reference guide for writing FlyDSL GPU kernels on AMD GPUs. It explains how FlyDSL controls layouts, tiled data movement, matrix operations, shared memory, loops, and tuning.

In plain words
What is it for?
Use it to look up FlyDSL APIs while writing or reviewing kernels, including memory movement, matrix multiplication, shared-memory allocation, autotuning, and troubleshooting.
Why use it?
It provides the details needed to understand or author kernels without guessing how FlyDSL's operations and layout system work.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is ROCm/aiter's own configuration. It tells Claude Code how to work on aiter itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything aiter configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ROCm/aiter. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ROCm/aiter/main/.claude/skills/flydsl-kernel-authoring/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ROCm/aiter

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 flydsl-kernel-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/rocm/aiter/flydsl-kernel-authoring/github.svg)](https://agentmods.dev/skills/rocm/aiter/flydsl-kernel-authoring)
Your own site
<a href="https://agentmods.dev/skills/rocm/aiter/flydsl-kernel-authoring"><img src="https://agentmods.dev/badge/skills/rocm/aiter/flydsl-kernel-authoring/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 flydsl-kernel-authoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/rocm/aiter/flydsl-kernel-authoring"><img src="https://agentmods.dev/badge/skills/rocm/aiter/flydsl-kernel-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 11,288 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 844
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 844
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
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.00066 $0.11288
Opus 5.5 $0.00026 $0.04515
Sonnet 5.5 $0.00013 $0.02258
Haiku 4.5 $0.00007 $0.01129

Measured yesterday against content hash 45108affebbf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

flydsl-kernel-authoring scanned grade C with 1 finding 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

FLYDSL_RUNTIME_ENABLE_CACHE=0 python my_kernel.py # or: rm -rf ~/.flydsl/cache
.claude/skills/flydsl-kernel-authoring/SKILL.md · 996 lines

How it starts

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

FlyDSL Kernel Authoring Skill

Overview

FlyDSL is a Python DSL and MLIR-based compiler for writing AMD GPU kernels. It provides explicit layout algebra for controlling data movement, tiling, and memory access patterns.

Aiter dependency: check requirements.txt first (flydsl==0.3.4.1 as of this update). Use python -c 'import flydsl; print(flydsl.__file__)' to find the imported package; an editable checkout may differ from the pinned wheel. Targets in aiter: gfx942 (CDNA3), gfx950 (CDNA4), and gfx1250 (wave32). Check the chosen operation on the target architecture; not every fx.rocdl wrapper supports all three.

Scope (read this first): This skill is the authoring reference for aiter's pinned FlyDSL API. For migration of an existing kernel from raw dialects, ArithValue, buffer_ops, or SmemPtr, use the in-tree flydsl-kernel-code-cleanup skill. Keep fx.Index where an API requires MLIR index; it is not a blanket migration target.


1. Architecture and Compilation

Pipeline

Python (@flyc.kernel/@flyc.jit)
  -> AST Rewriting (for/if -> scf.for/scf.if)
  -> MLIR Tracing (generates Fly dialect + gpu/arith/scf/memref/vector ops)
  -> MlirCompiler.compile() (Fly -> ROCDL -> LLVM -> HSACO binary)
  -> JITCFunction (ExecutionEngine wrapper)

Key Passes

Pipeline is built by RocmBackend._pipeline_parts() and split into three stages — see docs/architecture_guide.md §3 for the per-pass table. Highlights:

  1. fly-rewrite-func-signature - Rewrite DSL types at function / SCF boundaries to packed LLVM structs
  2. fly-layout-lowering - Lower layout algebra (fly.crd2idx, partitions, divides) to arithmetic
  3. fly-convert-atom-call-to-ssa-form + fly-promote-regmem-to-vectorssa - Lift copy/MMA atom calls and register memory to vector SSA
  4. convert-fly-to-rocdl - Fly ops -> ROCDL intrinsics
  5. gpu-module-to-binary{format=fatbin} - Emit HSACO binary via LLVM AMDGPU backend

Key Source Paths

  • python/flydsl/compiler/ - JIT compilation (jit_function.py, kernel_function.py)
  • python/flydsl/expr/ - DSL expression API (primitive.py, derived.py, typing.py)
  • python/flydsl/expr/primitive.py - All layout algebra functions
  • python/flydsl/expr/derived.py - CopyAtom, MmaAtom, TiledCopy, TiledMma wrappers
  • python/flydsl/expr/gpu.py - typed thread_idx/block_idx, raw thread_id/block_id, barrier, and SharedAllocator
  • python/flydsl/expr/llvm.py and expr/rocdl/universal.py - typed memory operations and buffer-resource views
  • python/flydsl/expr/rocdl/ - MFMA/WMMA and other ROCm intrinsics (package: cdna4, cluster, inline_asm, tdm_ops, universal)
  • python/flydsl/utils/smem_allocator.py - legacy SmemAllocator (un-migrated kernels only)
  • aiter/ops/flydsl/kernels/ - aiter's kernel examples and its legacy buffer_ops.py compatibility layer

Read the full file on GitHub · 996 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. yesterday Changed · +22 lines 45108affebbf
  2. 16d ago Changed · +3 lines c7df12c2d084
  3. 2mo ago First seen · 971 lines · 66 tokens per session scan C 320c7788e8f5

Subscribe to this mod's changes

flydsl-kernel-authoring is a skill published in the GitHub repository ROCm/aiter (598 stars, last pushed today), licensed MIT. It adds 66 tokens to every session and 11,288 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). 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

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 · 277 tokens

holoscan-module-lifecycle

Develop external Holoscan Modules with the Holoscan CLI and use them in Holoscan applications: scaffold, test, Python bindings, DEB/WHEEL packaging, and clean-consumer proof.

NVIDIA/skills · 47 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

acad-arx-wizard

Agentic ObjectARX project scaffolding for AutoCAD 2027 / Visual Studio 2026. Replaces the broken .vsz VsWizardEngine wizard with a PowerShell script that generates identical C++ project files. Works for new ARX/DBX/CRX projects and add-on class wizards (Jig, Reactors, Custom Object, MFC, .NET Wrapper, COM Wrapper…

autodesk-platform-services/skills · 92 tokens

hls-c2rtl

Translate C / C++ / SystemC algorithmic descriptions into synthesizable RTL via High-Level Synthesis. Use when the user says "HLS", "C to RTL", "C++ to Verilog", "Vitis HLS", "Catapult", "XLS", "algorithmic design", or provides a reference implementation in software and asks for hardware.

vibeic/vibe-ic · 79 tokens

cortex-m-patterns

Cortex-M code patterns for SysTick, NVIC priority grouping, FPU enable, MPU regions, AAPCS inline assembly, DWT cycle counting, vector table relocation, and WFI sleep entry. Use when writing core-level Cortex-M code or checking it against a known-good pattern.

HermeticOrmus/LibreEmbed-Claude-Code · 65 tokens