aiter: Skill for Claude Code

.claude/skills/flydsl-kernel-code-cleanup/SKILL.md

flydsl-kernel-code-cleanup is a skill for Claude Code from ROCm/aiter. It costs 53 tokens per session (8,208 once invoked), scanned A, original, MIT.

A refactoring guide for updating FlyDSL GPU kernel code from older low-level constructs to the current `fx.*` interface. FlyDSL is a Python-based language and compiler for writing GPU kernels.

In plain words
What is it for?
Use it when cleaning up kernels, replacing deprecated operations, updating launch wrappers, or checking related correctness and performance tests in the AITER project.
Why use it?
It helps modernize existing kernels while keeping behavior changes small and avoiding duplicated helper code. It also clarifies when low-level code is still necessary.

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-code-cleanup/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-code-cleanup

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rocm/aiter/flydsl-kernel-code-cleanup"><img src="https://agentmods.dev/badge/skills/rocm/aiter/flydsl-kernel-code-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,208 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.00053 $0.08208
Opus 5.5 $0.00021 $0.03283
Sonnet 5.5 $0.00011 $0.01642
Haiku 4.5 $0.00005 $0.00821

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

Security

Grade A, and why

flydsl-kernel-code-cleanup 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 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.

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/flydsl-kernel-code-cleanup/SKILL.md · 592 lines

How it starts

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

FlyDSL Kernel Code Cleanup

Maps legacy kernel constructs to the fx.* surface available in aiter's pinned FlyDSL version. See the in-tree flydsl-kernel-authoring skill for API guidance.

Golden rule: in @flyc.kernel / @flyc.jit bodies, use fx.* and Python operators first. Drop to a raw dialect only at a hard boundary with no wrapper, and localize it.

Before applying the recipes, check requirements.txt and the imported FlyDSL version and module path. A sibling FlyDSL checkout can expose newer APIs than aiter supports. Kernel cleanup does not require a dependency bump or edits to FlyDSL itself; honor the task's explicit version, architecture and single-/multi- GPU scope.

Aiter layout

Location Role
aiter/ops/flydsl/kernels/ @flyc.kernel device kernels and shared helpers (tensor_shim.py, kernels_common.py, …)
aiter/ops/flydsl/*.py Launch wrappers, compile helpers, public op entry points
op_tests/test_flydsl_*.py Top-level FlyDSL correctness / perf tests
op_tests/flydsl_tests/ Additional FlyDSL kernel tests

Prefer from aiter.ops.flydsl.kernels.tensor_shim import _run_compiled, ptr_arg. Reuse tensor_shim.py for compilation, cached dispatch and failure recovery. moe_kernels._run_compiled(exe, args) is a tuple-argument adapter for existing MoE/AOT callers; preserve that contract when consolidating launch code.

Reuse existing owners before adding helpers: act.py for activations; tensor_shim.py for pointer/base/dtype extraction; kernels_common.py for LOG2E and host or wrapping integer ceildiv; family common modules for reductions and specialized memory operations. Prefer typed fx.min/fx.max and fx.ceildiv where their signedness, NaN and overflow semantics match.

Cautions

  • Surgical, behavior-preserving. Migration is a refactor: minimal diffs, match local style.
  • Don't mass-rewrite heavily-legacy kernels unless asked (e.g. flash_attn_gfx950.py uses _scf.IfOp/_raw pervasively). Clean what the task touches.
  • Verify. Offset/type/SSA changes can shift results. Compare before/after numerics and generated code with FLYDSL_RUNTIME_ENABLE_CACHE=0; use a fresh dump directory per specialization so one shape cannot overwrite another.
  • Raw boundaries are semantic. Retain exact scope/ordering, volatile and alias metadata, raw SSA contracts, or integer widths unsupported by the pinned API. Record the specific reason; do not merely hide a dialect in a new facade.

Read the full file on GitHub · 592 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 · +5 lines 0120913e9ff5
  2. 16d ago Changed · +35 lines 1fc2dc4c3242
  3. 1mo ago Changed · +40 lines · -120 tokens per session f108051dbb64
  4. 2mo ago First seen · 512 lines · 173 tokens per session scan A d508d00df187

Subscribe to this mod's changes

flydsl-kernel-code-cleanup is a skill published in the GitHub repository ROCm/aiter (598 stars, last pushed today), licensed MIT. It adds 53 tokens to every session and 8,208 once invoked, about $0.0002 per session on Opus 5.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

jupyter-notebook

Iterative Python via live Jupyter kernel (hamelnb).

NousResearch/hermes-agent · 18 tokens

matlab

Builds, reviews, migrates, and plans MATLAB or GNU Octave numerical workflows. Use for arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 44 tokens

pennylane

Builds and differentiates PennyLane quantum circuits, hybrid PyTorch or JAX models, molecular VQE and QAOA workflows. Use for variational quantum algorithms, quantum machine learning, simulator validation, and moving validated circuits to provider plugins. For hardware-specific compilation use qiskit or cirq; for…

K-Dense-AI/scientific-agent-skills · 74 tokens

cuopt-numerical-optimization-api

LP, MILP, and QP (beta) with cuOpt — Python, C, and CLI. Use when the user is solving LP, MILP, or QP with any cuOpt interface.

NVIDIA/skills · 51 tokens

rocm-kernels

Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…

huggingface/kernels · 93 tokens

gh-address-comments

Help address review/issue comments on the open GitHub PR for the current branch using gh CLI; verify gh auth first and prompt the user to authenticate if not logged in.

foryourhealth111-pixel/Vibe-Skills · 39 tokens