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.
npx agentmods add skills/rocm/aiter/flydsl-kernel-code-cleanupnpx skills add ROCm/aiter --skill flydsl-kernel-code-cleanupgit clone --depth 1 https://github.com/ROCm/aiterWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00173 | $0.07028 |
| Opus 5 | $0.00086 | $0.03514 |
| Sonnet 5 | $0.00035 | $0.01406 |
| Haiku 4.5 | $0.00017 | $0.00703 |
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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 512 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FlyDSL Kernel Code Cleanup
Maps legacy/deprecated kernel constructs to the current fx.* surface. Companion
to flydsl-kernel-authoring (API reference) and flydsl-tile-programming
(authoring wizard).
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.
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.
Do not add a second _run_compiled copy — reuse tensor_shim.py. Some older
wrappers such as moe_kernels.py still carry a local _run_compiled(exe, args)
with a list argument; new code should import from tensor_shim.
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.pyuses_scf.IfOp/_rawpervasively). Clean what the task touches. - Verify. Offset/type/SSA changes can shift results — run the kernel test
before/after; clear cache with
FLYDSL_RUNTIME_ENABLE_CACHE=0if unsure. expr/stays target-neutral: norocdl/llvm/buffer imports inpython/flydsl/expr/top-level (guarded bytest_expr_optional_rocdl.py).
1. ArithValue and index helpers (deprecated in expr/arith.py)
| Deprecated | Replacement |
|---|---|
ArithValue(x) (wrap for operators) |
fx.Int32/Int64/Float32/Vector — already overload + - * / % << >> == < > |
arith.unwrap(v) / arith._to_raw(v) |
v.ir_value(), only where a raw ir.Value is needed |
arith.index(n) / arith.index_cast(T.index, v) / fx.Index(n) |
fx.Int64(...) (or fx.Int32(...)) |
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.
- 2d ago First seen · 512 lines · 173 tokens per session scan A d508d00df187
flydsl-kernel-code-cleanup is a skill published in the GitHub repository ROCm/aiter (543 stars, last pushed 2d ago), licensed MIT. It adds 173 tokens to every session and 7,028 once invoked, about $0.0009 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.
Other skills, from other repositories
jupyter-notebook
Use when the user asks to create, scaffold, or edit Jupyter notebooks (.ipynb) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script newnotebook.py to generate a clean starting notebook.
biopython
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…
esm
Use when working directly with the esm Python SDK, ESM3 or ESMC model IDs, Forge/Biohub inference clients, or ESMFold2 folding workflows.
benchling-integration
Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.
marimo-pair
Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.
quantum-qiskit
Reference qiskit 2.x patterns for variational quantum machine learning. Covers data-encoding feature maps, variational quantum classifier (VQC) training, variational quantum eigensolver (VQE) for chemistry, matrix-product-state circuits, and noise model integration. Use when writing Python code that imports qiskit…