Kubeshark Installer
kubeshark/kubeshark
Installs and configures Kubeshark on a Kubernetes cluster, choosing between the quick CLI path and a Helm install with custom values.
Phase 4 of LLM deployment — apply the shared optimization skillset to a Phase-3-correct prefill pipeline (multi-launch merge, BO pre-loading + intermediate buffer reuse, seq-first layout).
$ npx skills add Xilinx/mlir-air --skill phase-4-prefill-optimization -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Xilinx/mlir-air phase-4-prefill-optimization --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Xilinx/mlir-air.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/phase-4-prefill-optimization .claude/skills/phase-4-prefill-optimization && rm -rf skills-srcUse ~/.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/
Install the "phase-4-prefill-optimization" agent skill from https://github.com/Xilinx/mlir-air/tree/main/.claude/skills/phase-4-prefill-optimization into .claude/skills/phase-4-prefill-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phase-4-prefill-optimization", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Xilinx/mlir-air/tree/main/.claude/skills/phase-4-prefill-optimizationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Xilinx/mlir-air --skill phase-4-prefill-optimization -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Xilinx/mlir-air phase-4-prefill-optimization --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xilinx/mlir-air.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/phase-4-prefill-optimization .agents/skills/phase-4-prefill-optimization && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "phase-4-prefill-optimization" agent skill from https://github.com/Xilinx/mlir-air/tree/main/.claude/skills/phase-4-prefill-optimization into .agents/skills/phase-4-prefill-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phase-4-prefill-optimization", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Xilinx/mlir-air --skill phase-4-prefill-optimization -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Xilinx/mlir-air phase-4-prefill-optimization --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xilinx/mlir-air.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/phase-4-prefill-optimization .cursor/skills/phase-4-prefill-optimization && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "phase-4-prefill-optimization" agent skill from https://github.com/Xilinx/mlir-air/tree/main/.claude/skills/phase-4-prefill-optimization into .cursor/skills/phase-4-prefill-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phase-4-prefill-optimization", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Xilinx/mlir-air.git --path .claude/skills/phase-4-prefill-optimization--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Xilinx/mlir-air --skill phase-4-prefill-optimization -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Xilinx/mlir-air phase-4-prefill-optimization --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xilinx/mlir-air.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/phase-4-prefill-optimization .gemini/skills/phase-4-prefill-optimization && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "phase-4-prefill-optimization" agent skill from https://github.com/Xilinx/mlir-air/tree/main/.claude/skills/phase-4-prefill-optimization into .gemini/skills/phase-4-prefill-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phase-4-prefill-optimization", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Xilinx/mlir-air phase-4-prefill-optimizationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Xilinx/mlir-air --skill phase-4-prefill-optimization -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Xilinx/mlir-air.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/phase-4-prefill-optimization .github/skills/phase-4-prefill-optimization && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "phase-4-prefill-optimization" agent skill from https://github.com/Xilinx/mlir-air/tree/main/.claude/skills/phase-4-prefill-optimization into .github/skills/phase-4-prefill-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phase-4-prefill-optimization", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Xilinx/mlir-air --skill phase-4-prefill-optimization -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Xilinx/mlir-air phase-4-prefill-optimization --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xilinx/mlir-air.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/phase-4-prefill-optimization .opencode/skills/phase-4-prefill-optimization && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "phase-4-prefill-optimization" agent skill from https://github.com/Xilinx/mlir-air/tree/main/.claude/skills/phase-4-prefill-optimization into .opencode/skills/phase-4-prefill-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "phase-4-prefill-optimization", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
phase-4-prefill-optimizationPhase 4 of LLM deployment — apply the shared optimization skillset to a Phase-3-correct prefill pipeline (multi-launch merge, BO pre-loading + intermediate buffer reuse, seq-first layout).
Phase 4 Prefill Optimization is an agent skill from Xilinx/mlir-air. Phase 4 of LLM deployment — apply the shared optimization skillset to a Phase-3-correct prefill pipeline (multi-launch merge, BO pre-loading + intermediate buffer reuse, seq-first layout). Thin orchestrator that dispatches opt-merge-multi-launch-kernels, opt-buffer-object-reuse, and opt-layout-alignment. Each step preserves correctness by re-running the Phase 3 gate — make verify (token-set vs HF bf16) is the PASS/FAIL gate; make diagnosis per-layer cosine is the informational lens used to localize a regression…
Its SKILL.md is about 2.3k 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 DevOps & Cloud, covering Deployment. The licence is MIT.
Read from SKILL.md and the folder at commit bca27e5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
makeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Phase 4 Prefill Optimization loads about 2.3k tokens when it runs. Until then it costs about 146 tokens; SKILL.md has 1,046 words of instructions outside code blocks.
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.
The automated check found no risky patterns in SKILL.md.
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.
The full file from Xilinx/mlir-air at commit bca27e5, republished under its MIT licence (© Xilinx). 1,046 words, ~2,295 tokens.
.claude/skills/phase-4-prefill-optimization/SKILL.md (or your agent's skills folder).Phase 1-3 produced a functionally correct NPU pipeline (kernel-by-kernel
in Phase 1, layer-by-layer in Phase 2-3, all numerically aligned with
the HF bf16 reference). Phase 4 keeps that correctness while applying
the shared optimization skillset to reduce prefill latency. This phase
is a thin orchestrator: it dispatches three now-independent optimization
skills — opt-merge-multi-launch-kernels (ELF-merging),
opt-buffer-object-reuse (host↔NPU runtime-overhead reduction), and
opt-layout-alignment (host-side layout) — each of which owns its own recipe
and failure modes. These wins are things you compose from the kernels,
not behaviors inherited from a reference; the reference's builders are
worked examples. Every optimization is an experiment: apply, re-measure,
re-run Phase 3 gate; revert if correctness regresses.
For scale, the reference deployment llama3.2-1B took prefill from 18.67 s → 1.30 s (14×) by composing these optimizations — an illustrative datapoint for what they buy on one model, not a target every deployment must hit.
make verify
(the token-set gate vs HF bf16) still PASSES — this is the Phase 3
correctness gate, re-run between optimization skills. make diagnosis
per-layer cosine is NOT a gate (the verify subsystem retired
threshold-based diagnosis; compare_pair reports cosine with no
pass/fail); run it only to localize a regression when verify breaks
(which optimization / which layer the cosine cliff appears at). If
make verify regresses to FAIL, revert the change and document why
it doesn't apply to this model.<model>/docs/development_progress/phase4_prefill.md: for each
optimization skill it invoked, record applied / skipped / reverted,
the latency delta, and a one-line reason.The "≥ N optimization skills applied" check is NOT a gate — some models
legitimately need only 1-2 (e.g., the model is already seq-first by
construction → opt-layout-alignment N/A). The gate is the outcome (perf
improved + correctness preserved), not the process count.
PRIMARY:
programming_examples/llms/llama32_1b/docs/profile.md — the reference
deployment's profiling breakdown; the reference for what "good" looks likeprogramming_examples/llms/<model>/docs/development_progress/phase3_full.md
— Phase 3 baseline timings + cosine numbers (the "before" state to
measure against and preserve)programming_examples/llms/llama_kernel_builder/cache.py — the
KernelCache host-optimization knobs (static_input_indices,
intermediate_indices); the opt-buffer-object-reuse skill owns how to
wire them, this is just the source file it touchesREFERENCE EXEMPLARS (read/mirror to compose your own fused ELFs; import directly only on a bit-for-bit kernel-sequence match):
programming_examples/llms/llama32_1b/multi_launch_builder/ — the full set
of fused-ELF builders, the worked example of how registry leaf kernels
stitch into multi-launch ELFs. Mirror these for your model's kernel
sequence. Two representative ones:rms_gemms_rope_multi.py — fused 6-launch ELF for RMSNorm + Q/K/V GEMM + RoPE Q/Ko_ffn_multi.py — fused 8-launch ELF for O + add + RMSNorm + Gate/Up + SwiGLU + Down + addprogramming_examples/llms/llama_kernel_builder/ — the shared toolkit
(KernelCache, stitching, external_kernels) every fused-ELF build uses,
inheritance or kernel-first alike.Before invoking any optimization skill, capture the baseline prefill time — this is the number every skill must beat:
cd programming_examples/llms/<model>
flock -x -w 1800 /tmp/mlir-air-npu.lock make profileRecord: kernel time (ms) + wall time as the baseline. Also note the Phase 3 per-layer cosine table as a baseline to compare against if a later optimization breaks verify (it's the localization reference, not a gate).
prefill draws on the shared optimization skillset. For each, decide if it
applies, invoke the skill, then re-run the gate (Step 3). Skip with a logged
reason if the trigger condition isn't met — "≥ N applied" is NOT the gate;
the gate is the outcome (faster + make verify still PASSES).
| Optimization skill | When it applies to prefill | What it does |
|---|---|---|
opt-merge-multi-launch-kernels | almost always (the dominant win) | stitch each leaf kernel's air.launch into one fused ELF per kernel-group → one xrt.run() per group instead of per kernel (llama3: 16→3 calls/layer). Build the model's multi_launch_builder/ (kernel-first) or reuse llama's fused ELFs (bit-for-bit inheritance — the verdict made in phase-2-single-block-validation Step 1). |
opt-buffer-object-reuse | always | pre-load per-layer weight BOs once (static_input_indices) + reuse intermediate BOs (intermediate_indices); removes redundant host↔NPU uploads. |
opt-layout-alignment | only if a host transpose still sits between two kernels | choose seq-first layouts so RoPE/FA/O-proj hand off on-device; skip if the model already runs seq-first end-to-end (most inheritance deployments do). |
Each skill owns its own recipe, success self-check, and failure modes — this phase does not restate them. Invoke the skill, read its result, then gate.
After every applied (or attempted) optimization skill, re-run the gate:
flock -x -w 1800 /tmp/mlir-air-npu.lock make verify # GATE: token-set, exit 1 on FAILmake verify PASS is the correctness gate. If it regresses to FAIL,
revert the change and document why.
Only when verify FAILs, run diagnosis to localize the break:
flock -x -w 1800 /tmp/mlir-air-npu.lock make diagnosis # informational: per-layer cosine tableA cosine cliff at layer i points at the broken assumption there (e.g. a
transpose opt-layout-alignment removed that this model actually needed).
diagnosis does not PASS/FAIL — it is the microscope, verify is the gate.
| Symptom | Likely cause | Where to look |
|---|---|---|
| Multi-launch merge compile fails (BD exhaustion, channel routing, herd shape conflict, bare-herd, DMA stride, IR/compile blowup) | non-1024-aligned dim (see the kernel's details/<Kernel>_bf16.md) OR wrong stitching boundary | Invoke debug-multi-launch-merge — it discriminates the 6 known compile blockers |
| Output corruption after BO pre-loading (correct first call, NaN/garbage on subsequent calls) | Per-layer BO key collision OR static_input_indices set wrong | Invoke debug-bo-corruption |
FA hang (ERT_CMD_STATE_TIMEOUT) at head_dim ≥ 128 | Seq-first dk_chunks > 1 path bug | Invoke debug-fa-runtime-failure; the head-first wrapper (routed by opt-layout-alignment) is the workaround |
| FA all-NaN at runtime | Compile-flag mismatch on attn_npu2.cc macros (LESSON 3 — -Dlqp must be per-tile, not per-launch) | Invoke debug-fa-runtime-failure; compile_attn_npu2_split derives correct flags |
| Cosine drops after an optimization skill | the skill has a layout/type assumption your model violates | Revert the change; check whether the assumption (e.g., seq-first only, all weights pre-transposed) holds |
Latency unchanged after opt-merge-multi-launch-kernels | Multi-launch ELF compiled but XRT call count didn't drop | Check xrt-smi top for actual call count; verify the new fused ELF is what _run_cached actually invokes (not falling back to per-kernel path) |
For any failure not in the table, invoke superpowers:systematic-debugging.
On Phase 4 PASS:
<model>/docs/development_progress/phase4_prefill.md: per-skill
table with applied / skipped / reverted, latency delta, reason<model>/TODO.md: mark Phase 4, append final prefill kernel time +
speedup vs Phase 3 baselineopt-merge-multi-launch-kernels), surface to Phase 6 for potential
promotion to a shared location if a second deployment validates the
same pattern© Xilinx, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/phase-4-prefill-optimization of Xilinx/mlir-air.
Open the folder on GitHubat commit bca27e5
Phase 4 Prefill Optimization 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Phase 4 Prefill Optimization this skillXilinx/mlir-air | 150 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Kubeshark Installerkubeshark/kubeshark | 12k | — | ~3.6k | Automated safety check: Notes | Apache-2.0 | |
| GreptimeDB Dev Docker ImageGreptimeTeam/greptimedb | 6.7k | — | ~4k | Automated safety check: Notes | Apache-2.0 | |
| KubeSphere ServiceMesh Managerkubesphere/kubesphere | 17k | — | ~2.4k | Automated safety check: Pass | Custom licence | |
| Vercelremotion-dev/remotion | 62k | — | ~1.2k | Automated safety check: Pass | Custom licence | |
| AWS Cdk Developmentzxkane/aws-skills | 367 | 2 repos | ~2.5k | Automated safety check: Pass | MIT |
kubeshark/kubeshark
Installs and configures Kubeshark on a Kubernetes cluster, choosing between the quick CLI path and a Helm install with custom values.
GreptimeTeam/greptimedb
Packages a locally built GreptimeDB debug binary into a development-only Docker image for local-cluster testing, with an optional push to a dev registry.
kubesphere/kubesphere
Installs, checks and troubleshoots the KubeSphere ServiceMesh extension (Istio, Kiali, Jaeger), including grayscale release, sidecar injection, topology and tracing issues.
remotion-dev/remotion
Set up a Codex monitor for Vercel deployments and preview URLs.
zxkane/aws-skills
AWS Cloud Development Kit (CDK) expert for building cloud infrastructure with TypeScript/Python.
maslennikov-ig/claude-code-orchestrator-kit
Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…
Xilinx/mlir-air
A skill your agent uses when an NPU kernel passes its standalone shape test but produces NaN, garbage, or stale values when invoked as part of a larger pipeline.
Xilinx/mlir-air
A skill your agent uses when NPU FlashAttention hangs (ERTCMDSTATETIMEOUT) or produces NaN at headdim ≥ 128.
Xilinx/mlir-air
A skill your agent uses when stitching kernels into a multi-launch ELF and the AIE compiler rejects the merged module (BD exhaustion, channel routing, herd shape conflict, IR validation error, DMA…
Xilinx/mlir-air
Entry point for deploying a new decoder-only LLM on AMD NPU2.
Xilinx/mlir-air
Optimization skill — reuse NPU BufferObjects across calls instead of re-allocating/re-writing them.
Xilinx/mlir-air
Optimization skill — choose activation layouts so consecutive kernels hand off on-device without a host-side transpose.
Categories
Phase 4 of LLM deployment — apply the shared optimization skillset to a Phase-3-correct prefill pipeline (multi-launch merge, BO pre-loading + intermediate buffer reuse, seq-first layout). Phase 4 Prefill Optimization is an agent skill from Xilinx/mlir-air. Phase 4 of LLM deployment — apply the shared optimization skillset to a Phase-3-correct prefill pipeline (multi-launch merge, BO pre-loading + intermediate buffer reuse, seq-first layout).
Phase 4 Prefill Optimization fits situations like: tasks that involve Deployment.
Run `npx skills add Xilinx/mlir-air --skill phase-4-prefill-optimization -a claude-code`. Or copy the skill folder (.claude/skills/phase-4-prefill-optimization in Xilinx/mlir-air) into .claude/skills/phase-4-prefill-optimization in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Xilinx/mlir-air --skill phase-4-prefill-optimization -a codex`. Or copy the skill folder (.claude/skills/phase-4-prefill-optimization in Xilinx/mlir-air) into .agents/skills/phase-4-prefill-optimization in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Xilinx/mlir-air --skill phase-4-prefill-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/phase-4-prefill-optimization, .gemini/skills/phase-4-prefill-optimization, .github/skills/phase-4-prefill-optimization and .opencode/skills/phase-4-prefill-optimization in your project.
Going by SKILL.md and its folder, Phase 4 Prefill Optimization needs the command-line tools its instructions call (make).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Phase 4 Prefill Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Phase 4 Prefill Optimization: Kubeshark Installer (kubeshark/kubeshark, 12k stars), GreptimeDB Dev Docker Image (GreptimeTeam/greptimedb, 6.7k stars), KubeSphere ServiceMesh Manager (kubesphere/kubesphere, 17k stars) and Vercel (remotion-dev/remotion, 62k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Xilinx (a GitHub organization) maintains it in Xilinx/mlir-air, which has 150 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 7, 2026.
Source: Xilinx/mlir-air on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.