Agent skill

Kernel Code Cleanup

by ROCm in ROCm/FlyDSL

Clean up FlyDSL kernels and shared helpers while preserving numerical behavior and performance.

Custom licenceAuto-check: notesData & Analytics

Install Kernel Code Cleanup

skills CLI
$ npx skills add ROCm/FlyDSL --skill kernel-code-cleanup -a claude-code

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

GitHub CLI
$ gh skill install ROCm/FlyDSL kernel-code-cleanup --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/ROCm/FlyDSL.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/kernel-code-cleanup .claude/skills/kernel-code-cleanup && 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
kernel-code-cleanup
GitHub stars
287
Token cost
~6.5k tokens
SKILL.md length
2,371 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
Custom licence

At a glance

Clean up FlyDSL kernels and shared helpers while preserving numerical behavior and performance.

  • Works in 10 steps: ArithValue and index helpers (deprecated… → buffer_ops → make_buffer_tensor + copy… → Raw upstream dialects → fx.* and Python → …
  • Raw-IR migrations
  • SKILL.md covers Cautions, 1. ArithValue and index…, 2. buffer_ops →… and 3. Raw upstream dialects →…, plus 8 more sections
  • Calls rg, git and bash

What it does

Kernel Code Cleanup is an agent skill from ROCm/FlyDSL. Clean up FlyDSL kernels and shared helpers while preserving numerical behavior and performance. Use for raw-IR migrations, helper deduplication, dead-code removal, and reviews of those changes against the checkout API.

Its SKILL.md is about 6.5k 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 Data & Analytics, covering Data cleaning. It works with Python. The repository describes itself as: FlyDSL is the Python front‑end of the project: a Flexible Layout Python DSL for expressing tiling, partitioning, data movement, and kernel structure at a high level.

When your agent uses it

  • Raw-IR migrations
  • Helper deduplication
  • Dead-code removal
  • Reviews of those changes against the checkout API

Example prompts

  • “/kernel-code-cleanup”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Edit, Bash, Grep, Glob, Agent

Workflow steps

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

  1. ArithValue and index helpers (deprecated in expr/arith.py)
  2. buffer_ops → make_buffer_tensor + copy atoms
  3. Raw upstream dialects → fx.* and Python
  4. SmemAllocator / SmemPtr → SharedAllocator
  5. Runtime branches inside helper functions
  6. Raw rocdl.mfma_* → MMA atom + fx.gemm
  7. Tiled copy/MMA: build from a TV layout, iterate with fx.copy / fx.gemm
  8. Trim comments and dead code
  9. Cut launch overhead with _run_compiled
  10. Procedure

What it can do on your machine

Read from SKILL.md and the folder at commit 1941889. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Edit
    • Bash
    • Grep
    • Glob
    • Agent

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg
    • git
    • bash
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

Kernel Code Cleanup loads about 6.5k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 2,371 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Edit, Bash, Grep, Glob, Agent

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 2,371 words (~6,510 tokens).

“Maps legacy kernel constructs to the current fx.* surface. Companion to flydsl-kernel-authoring (API reference) and flydsl-tile-programming (authoring wizard).”

— opening of SKILL.md by ROCm, Custom licence
name
kernel-code-cleanup
allowed-tools
Read, Edit, Bash, Grep, Glob, Agent

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .claude/skills/kernel-code-cleanup of ROCm/FlyDSL.

Open the folder on GitHubat commit 1941889

Compare with similar skills

Kernel Code Cleanup 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.

Kernel Code Cleanup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kernel Code Cleanup this skillROCm/FlyDSL287—~6.5kAutomated safety check: NotesCustom licence
Pandas ProJeffallan/claude-skills12k1 repos~1.5kAutomated safety check: PassMIT
Openbb Data Fetchermonarchjuno/vibe-investing299—~2.9kAutomated safety check: NotesMIT
Credit Risk Data Cleaninggithub/awesome-copilot40k1 repos~1.5kAutomated safety check: PassMIT
Aic Collector Op Developmentai-dynamo/aiconfigurator454—~3kAutomated safety check: PassApache-2.0
Code EngineeropenJiuwen-ai/sciencediscovery148—~2.8kAutomated safety check: PassApache-2.0

Similar skills

  • Pandas Pro

    Jeffallan/claude-skills

    Handles pandas DataFrame work: cleaning, merging, groupby aggregation, pivots, time-series resampling and memory tuning, with checks on dtypes, shapes and nulls.

    12k GitHub starsUsed in 1 repo~1.5k tokens
    Data & AnalyticsAuto-check passed
  • Openbb Data Fetcher

    monarchjuno/vibe-investing

    Fetch financial, market, economic, fundamental, news, options, crypto, ETF, index, and macro data through the OpenBB Python interface instead of the OpenBB MCP server.

    299 GitHub stars~2.9k tokensUpdated 5 mo ago
    Data & AnalyticsAuto-check: notes
  • Credit Risk Data Cleaning

    github/awesome-copilot

    Official

    Cleans raw credit data and screens variables before loan modeling, dropping unstable, noisy or redundant features and writing an Excel report of every step.

    40k GitHub starsUsed in 1 repo~1.5k tokens
    Data & AnalyticsAuto-check passed
  • Aic Collector Op Development

    ai-dynamo/aiconfigurator

    Design, add, review, or modify AIC Collector operations and their case population.

    454 GitHub stars~3k tokensUpdated 19 days ago
    Data & AnalyticsAuto-check passed
  • Code Engineer

    openJiuwen-ai/sciencediscovery

    A skill your agent uses when you need to write and execute Python/R code to process, transform, and analyze data, delivering reproducible computational results with complete code-level methodology…

    148 GitHub stars~2.8k tokensUpdated 6 days ago
    Data & AnalyticsAuto-check passed
  • Authoritative Data Harvester

    yushui2022/MathModel-Skill

    Finds authoritative public data sources for modeling tasks, prefers official APIs and bulk downloads, and outputs a reproducible fetch and cleaning plan with citations.

    452 GitHub starsUsed in 1 repo~1.1k tokens
    Data & AnalyticsAuto-check passed

More from ROCm/FlyDSL

All 19 skills in this repo
  • Llvm

    ROCm/FlyDSL

    Tune and analyse a FlyDSL kernel at the LLVM level: pick a compile hint, function attribute, or AMDGPU backend flag, then PROVE it reached codegen.

    287 GitHub stars~4.9k tokensUpdated today
    Auto-check: notes
  • Detect per-kernel GPU resource regressions (VGPR, SGPR, register spills, scratch, static LDS) by diffing the final ISA before and after a change, using its isaresourcetable.py helper.

    287 GitHub stars~2.7k tokensUpdated today
    Auto-check: notes
  • API Stability

    ROCm/FlyDSL

    Review a FlyDSL PR, commit, branch, kernel, or consuming module for API-stability compliance.

    287 GitHub stars~3.2k tokensUpdated today
    Auto-check: notes
  • Build Rocm Image

    ROCm/FlyDSL

    Connect to a remote host via SSH and build a Docker image with rocprofv3, aiter, and FlyDSL.

    287 GitHub stars~1.2k tokensUpdated today
    Auto-check: notes
  • Debug FlyDSL GPU kernels that produce NaN, inf, wrong results, or crash.

    287 GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Guided step-by-step wizard for producing a new FlyDSL GPU kernel from a requirement: classify the kernel type, pick a skeleton, fill in compute, add control flow / sync / LDS, then test on GPU.

    287 GitHub stars~4.6k tokensUpdated today
    Auto-check: notes

Works with

Questions about Kernel Code Cleanup

What does Kernel Code Cleanup do?

Clean up FlyDSL kernels and shared helpers while preserving numerical behavior and performance. Kernel Code Cleanup is an agent skill from ROCm/FlyDSL. Clean up FlyDSL kernels and shared helpers while preserving numerical behavior and performance.

When should I use Kernel Code Cleanup?

Kernel Code Cleanup fits situations like: raw-IR migrations; helper deduplication; dead-code removal; reviews of those changes against the checkout API.

How do I install Kernel Code Cleanup in Claude Code?

Run `npx skills add ROCm/FlyDSL --skill kernel-code-cleanup -a claude-code`. Or copy the skill folder (.claude/skills/kernel-code-cleanup in ROCm/FlyDSL) into .claude/skills/kernel-code-cleanup in your project. Claude Code loads it when a task matches its description.

How do I install Kernel Code Cleanup in Codex?

Run `npx skills add ROCm/FlyDSL --skill kernel-code-cleanup -a codex`. Or copy the skill folder (.claude/skills/kernel-code-cleanup in ROCm/FlyDSL) into .agents/skills/kernel-code-cleanup in your project. Codex loads it when a task matches its description.

Can I use Kernel Code Cleanup 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 ROCm/FlyDSL --skill kernel-code-cleanup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kernel-code-cleanup, .gemini/skills/kernel-code-cleanup, .github/skills/kernel-code-cleanup and .opencode/skills/kernel-code-cleanup in your project.

What does Kernel Code Cleanup need to run?

Going by SKILL.md and its folder, Kernel Code Cleanup needs the command-line tools its instructions call (rg, git, bash and python3). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Edit, Bash, Grep, Glob, Agent.

Does Kernel Code Cleanup access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Kernel Code Cleanup safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Kernel Code Cleanup use?

Kernel Code Cleanup has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Kernel Code Cleanup use?

About 6.5k tokens (SKILL.md is roughly 26k 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 Kernel Code Cleanup?

Skills that share tags, products or a category with Kernel Code Cleanup: Pandas Pro (Jeffallan/claude-skills, 12k stars), Openbb Data Fetcher (monarchjuno/vibe-investing, 299 stars), Credit Risk Data Cleaning (github/awesome-copilot, 40k stars) and Aic Collector Op Development (ai-dynamo/aiconfigurator, 454 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kernel Code Cleanup?

ROCm (a GitHub organization) maintains it in ROCm/FlyDSL, which has 287 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 7, 2026.

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