flashkda-delta-attention — Claude Code skill: install
This skill guides FlashKDA setup for Kimi Delta Attention CUDA kernels, with direct flash_kda.fwd use and chunk_kda integration.
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a claude-codeWhat flashkda-delta-attention does
The skill covers FlashKDA, a CUTLASS-based CUDA kernel package for Kimi Delta Attention and recurrent-state inference. It explains the low-level flash_kda.fwd call and the recommended path through flash-linear-attention, where chunk_kda can dispatch to the FlashKDA backend.
The setup needs an SM90-or-newer GPU such as H100 or H20, CUDA 12.9+, PyTorch 2.4+, and Python 3.8+. The flash-linear-attention integration at version 0.5.0 or newer is recommended. Hardware below SM90 does not meet the backend requirement.
The package build uses https://github.com/MoonshotAI/FlashKDA.git, initializes its submodules, and runs pip install -v .. Kernel inputs require K == V == 128; packed variable-length input with cu_seqlens requires batch size 1.
What it helps with
- wire FlashKDA into
chunk_kda - call the low-level
flash_kda.fwdkernel - carry an initial state and collect the final state
- run packed sequences with
cu_seqlens
Example prompts for the agent
- Use
flashkda-delta-attentionto connect FlashKDA tochunk_kda. - Show a
flash_kda.fwdcall that passesinitial_stateand returnsfinal_state. - Check the GPU, CUDA, and tensor-shape requirements for a Kimi Delta Attention implementation.
How to install flashkda-delta-attention
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a claude-code2Manually: put the files in place
~/.claude/skills/flashkda-delta-attention/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/flashkda-delta-attention/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a codex2Manually: put the files in place
.agents/skills/flashkda-delta-attention/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a cursor2Manually: put the files in place
.cursor/skills/flashkda-delta-attention/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills flashkda-delta-attention2Manually: put the files in place
.github/skills/flashkda-delta-attention/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/flashkda-delta-attentionManually: put the files in place
.devin/skills/flashkda-delta-attention/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about flashkda-delta-attention
How do I install flashkda-delta-attention in Claude Code?
Run npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a claude-code, then check ~/.claude/skills/flashkda-delta-attention/SKILL.md.
What does flashkda-delta-attention do?
It provides guidance for using FlashKDA CUDA kernels with Kimi Delta Attention, either through flash_kda.fwd or the chunk_kda backend.
What constraints does FlashKDA have?
It requires an SM90+ GPU and K == V == 128. With cu_seqlens, batch size must be 1, and initial_state and final_state must use matching dtypes.