compare-kernels
Compare kernel categories and timings between two trace analysis Excel files.
Skill by yichiche
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/yichiche-compare-kernels
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: spreadsheets
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/compare-kernels
What's inside
- Skill name
compare-kernels- Description
- Compare kernel categories and timings between two trace analysis Excel files. Use when the user says "/compare-kernels" followed by two xlsx paths, or asks to compare kernel breakdowns across platforms (e.g., B200 vs MI355).
- License
- MIT
- Instructions
- 651 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- body: 651 lines (spec recommends under 500)
Files (2)
- SKILL.md
- find_references.py · scripts/
SKILL.md (first lines)
# Compare Kernels
Side-by-side kernel comparison between two trace analysis Excel files, grouped by nn.Module for prefill/extend traces.
## Usage
```
/compare-kernels <file_A.xlsx> <file_B.xlsx>
/compare-kernels --budget <file_A.xlsx> <file_B.xlsx> # phase-level logical-op budget diff (works on decode)
/compare-kernels --refs <keyword> # research only: find upstream+Jira prior art for a kernel
```
If the user doesn't provide two paths, ask for them using `AskUserQuestion`.
**Research mode (`--refs`):** skip the trace diff and jump straight to Step 8 — given a
kernel/op keyword, find prior art in aiter + sglang upstream + Jira. Useful before
starting an optimization ("has anyone already done this?"). Sources resolve through
[`_shared/data-sources.md`](../_shared/data-sources.md).
**Two views:** the default module-grouped comparison (Steps 1–4) needs a module tree
→ **prefill/extend only**. The `--budget` view (Step 4.5) is a category-based
phase-level budget that **also works on decode** traces (which collapse to
`CudaGraphReplay`). When comparing decode traces, use `--budget`.
## Step 0: Recategorize both files
Before comparing, run `--recategorize` on both files to ensure they use the latest `kernel_categories.csv`:
```bash
python3 $HOME/agent-box/profile/trace_module_analyzer.py --recategorize <file_A.xlsx> <file_B.xlsx>
```
## Step 1: Read detail sheets from both files
Use Python with openpyxl to read both Excel files. For each file:
1. List all sheet names
2. Identify **detail sheets** — any sheet that is NOT "Summary", "Overview", "Module Tree", or "GPU Kernels"
3. For each detail sheet, read:
- Row 1: title (module name, phase, kernel count)
- The kernel detail table (columns: Module, Input Dims, Kernel Name, Duration (us), % of wall time, Category, ...)
- Extract every kernel's **module**, **name**, **duration**, and **current category**
```python
import openpyxl
def read_detail_kernels(xlsx_path):
"""Returns list of (sheet_name, title, [(module, kernel_name, duration, category), ...])"""
wb = openpyxl.load_workbook(xlsx_path, data_only=True)
skip = {"Summary", "Overview", "Module Tree", "GPU Kernels"}
results = []
for sname in wb.sheetnames:
if sname in skip:
continue
ws = wb[sname]
title = ws.cell(1, 1).value or sname
kernels = []
header_row = None
for r in range(1, min(ws.max_row + 1, 30)):
for c in range(1, ws.max_column + 1):
if ws.cell(r, c).value == "Kernel Name":
header_row = r
break
if header_row:
break
if not header_row:
continue
col_map = {}
for c in range(1, ws.max_column + 1):
val = ws.cell(header_row, c).value
if val:
col_map[val] = c
mod_col = col_map.get("Module")
name_col = col_map.get("Kernel Name")
dur_col = col_map.get("Duration (us)")
cat_col = col_map.get("Category")
if not name_col:
continue
for r in range(header_row + 1, ws.max_row + 1):
kname = ws.cell(r, name_col).value
if not kname or "truncated" in str(kname):
break
mod = ws.cell(r, mod_col).value if mod_col else ""
dur = ws.cell(r, dur_col).value if dur_col else 0
cat = ws.cell(r, cat_col).value if cat_col else ""
kernels.append((str(mod or ""), str(kname), float(dur or 0), str(cat or "")))
results.append((sname, title, kernels))
return results
```
## Step 2: Re-classify every kernel
Load the current `kernel_categories.csv` from the profile directory and re-classify every kernel name. Compare with the category stored in the Excel file.
```python
import re, csv, os
csv_path = os.path.expanduser("~/agent-box/profile/kernel_categories.csv")
categories = []
with open(csv_path) as f:
for row in csv.DictReader(f):
categories.append((row["category"].strip(),
re.compile(row["pattern"].strip(), re.IGNORECASE)))
def classify(name):
for cat, pat in categories:
if pat.search(name):
return cat
return "other"
```
Flag any kernel where the Excel category differs from the re-classified category.
## Step 3: Group kernels by Module and compare side-by-side
This is the **core analysis**. For each pair of matching detail sheets:
### 3a. Extract module groupsFrom yichiche/agent-box, MIT.
More from yichiche/agent-box
- 0.600score
gfx950-asm-development
yichiche
Develop, validate, and tune hand-written AMD gfx950 assembly kernels, with rocprof profiling.
SkillAFreshness: A★ 2Claude Code +9 - 0.598score
commit-push
yichiche
Commit (if needed) and push to the user's fork, with repo-aware remote selection and user confirmation before push.
SkillAFreshness: A★ 2Claude Code +9 - 0.598score
implement-kernel
yichiche
Implement a kernel optimization for SGLang on MI355/ROCm.
SkillAFreshness: A★ 2Claude Code +9 - 0.598score
gpu-status
yichiche
Show which AMD GPUs are free and the exact CUDA_VISIBLE_DEVICES to use for SGLang.
SkillAFreshness: A★ 2Claude Code +9 - 0.595score
generate-profile
yichiche
Generate an e2e profiling trace of an SGLang server run.
SkillAFreshness: A★ 2Claude Code +9 - 0.594score
abox-live
yichiche
Monitor Claude agents running inside your containers, from the host or phone — the single entry point (absorbed the old `abox`).
SkillAFreshness: A★ 2Claude Code +9 - 0.594score
pr-conflict-fix
yichiche
Resolve a conflicting GitHub PR inside a throwaway container built from an image you name.
SkillAFreshness: A★ 2Claude Code +9 - 0.594score
commit-push-pr
yichiche
Commit, push, and create a PR in one flow — checks state at each stage, confirms push target, collects accuracy/benchmark data, drafts PR in HackMD format for…
SkillAFreshness: A★ 2Claude Code +9 - 0.589score
ci-analysis
yichiche
Analyze GitHub Actions CI failures for a pull request: trace root-cause jobs vs fast-fail cascades (check-pr-test-health), fetch job logs with gh, attribute…
SkillAFreshness: A★ 2Claude Code +9 - 0.585score
pr-ci-watch
yichiche
Watch a list of sgl-project/sglang PRs on two cadences (daily, or high-priority every 2h) and babysit them — re-run red NVIDIA CI only after /ci-analysis…
SkillAFreshness: A★ 2Claude Code +9 - 0.557score
add-jit-kernel
yichiche
Step-by-step guide for adding a lightweight JIT kernel to SGLang — CUDA path via python/sglang/kernels/jit, ROCm/MI355 path via Triton or aiter.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
add-sgl-kernel
yichiche
Step-by-step guide for adding a heavyweight AOT kernel — CUDA path via sgl-kernel (CUTLASS), ROCm/MI355 path via aiter C++/HIP (CK tile, assembly).
SkillBFreshness: B★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 26, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/yichiche/agent-box
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from yichiche
- 0.600score
gfx950-asm-development
yichiche
Develop, validate, and tune hand-written AMD gfx950 assembly kernels, with rocprof profiling.
SkillAFreshness: A★ 2Claude Code +9 - 0.598score
implement-kernel
yichiche
Implement a kernel optimization for SGLang on MI355/ROCm.
SkillAFreshness: A★ 2Claude Code +9 - 0.598score
commit-push
yichiche
Commit (if needed) and push to the user's fork, with repo-aware remote selection and user confirmation before push.
SkillAFreshness: A★ 2Claude Code +9 - 0.598score
gpu-status
yichiche
Show which AMD GPUs are free and the exact CUDA_VISIBLE_DEVICES to use for SGLang.
SkillAFreshness: A★ 2Claude Code +9 - 0.595score
generate-profile
yichiche
Generate an e2e profiling trace of an SGLang server run.
SkillAFreshness: A★ 2Claude Code +9 - 0.594score
commit-push-pr
yichiche
Commit, push, and create a PR in one flow — checks state at each stage, confirms push target, collects accuracy/benchmark data, drafts PR in HackMD format for…
SkillAFreshness: A★ 2Claude Code +9
Cite this page
compare-kernels skill. Agent Mart. https://agentmart.dev/skills/yichiche-compare-kernels (last updated 2026-10-24)