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/amd-agi/apex/kernel-exp-historynpx skills add AMD-AGI/Apex --skill kernel-exp-historygit clone --depth 1 https://github.com/AMD-AGI/ApexWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/amd-agi/apex/kernel-exp-history)<a href="https://agentmods.dev/skills/amd-agi/apex/kernel-exp-history"><img src="https://agentmods.dev/badge/skills/amd-agi/apex/kernel-exp-history.svg" alt="Measured on agentmods" height="20"></a>What 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.1 | $0.00037 | $0.01454 |
| Opus 5 | $0.00018 | $0.00727 |
| Sonnet 5 | $0.00007 | $0.00291 |
| Haiku 4.5 | $0.00004 | $0.00145 |
Grade A, and why
kernel-exp-history 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 5d 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 — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Kernel Experiment History
Overview
Use the local kernel experiment database to look up prior optimization attempts and record new results after an optimization iteration completes.
Workflow
1) Find prior experiments for inspiration
- Read
references/kernel_exp_dataclass.pyto understand the database helpers and schema. - Start with
top_experiments(max_results=20)to get a score-sorted list of high-impact experiments. - If more context is needed, load full entries using
get_experiment(exp_id)orlist_experiments()and filter byoperator_sig,dtype_sig,env, orbase_commit. - Summarize the most relevant patterns (block sizes, memory changes, profiling signals, etc.) before proposing new optimizations.
Query Examples
Example 1: Find similar kernel optimizations
# Search for cache kernel optimizations
from kernel_exp_dataclass import list_experiments
experiments = list_experiments()
cache_exps = [e for e in experiments if 'cache' in e.operator_sig.lower()]
# Sort by score
cache_exps_sorted = sorted(cache_exps, key=lambda x: x.score, reverse=True)
print("Top cache kernel optimizations:")
for exp in cache_exps_sorted[:5]:
print(f" {exp.score:.4f}x - {exp.change_summary}")
Example 2: Find best unroll factor
# Compare different unroll factors
unroll_exps = [e for e in experiments if 'unroll' in e.change_summary.lower()]
for exp in unroll_exps:
factor = 'unknown'
if 'unroll 4' in exp.detailed_description.lower():
factor = '4'
elif 'unroll 8' in exp.detailed_description.lower():
factor = '8'
print(f"Unroll {factor}: {exp.score:.4f}x - {exp.operator_sig[:50]}")
Example 3: Learn from failures
# Find what NOT to do
failures = [e for e in experiments if e.score < 0.98 or e.is_buggy]
print("Failed optimizations (learn from these!):")
for exp in failures:
print(f" ❌ {exp.change_summary}")
print(f" Why: {exp.detailed_description[:100]}...")
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 164 lines · 37 tokens per session scan A a40243269479
kernel-exp-history is a skill published in the GitHub repository AMD-AGI/Apex (76 stars, last pushed 2d ago), licensed MIT. It adds 37 tokens to every session and 1,454 once invoked, about $0.0002 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
write-cuda-reduction-kernel
Guide the agent through designing and implementing a correct, efficient CUDA reduction kernel for a given operator (sum, max, min, or custom binary associative op), covering warp-level primitives, block-level reduction, multi-block strategies, and when to use CUB instead.
write-cuda-layernorm-kernel
Guide the agent through designing and implementing a correct, efficient CUDA LayerNorm (and RMSNorm) kernel, covering mean/variance computation strategies, Welford online accumulation, epsilon placement, affine transform application, backward pass structure, and decomposition for non-power-of-two hidden dimensions.
write-triton-gemm-kernel
Guide the agent through implementing a correct, performant blocked matrix multiplication kernel in Triton. This covers tile assignment via programid, pointer arithmetic for A/B/C tiles, accumulation with tl.dot, boundary masking for non-divisible shapes, swizzled tile ordering for L2 reuse, and autotuning for…
write-triton-layernorm-kernel
Guide the agent through implementing a correct, numerically stable row-wise layer normalization kernel in Triton. This covers mean and variance computation with fp32 accumulation, epsilon handling, affine transform with gamma/beta, the RMSNorm variant, masking for hidden dimensions not divisible by BLOCKSIZE, and…
choose-tile-size-and-work-partitioning
Guide the agent through selecting tile sizes and work partitioning strategies for a CUDA or Triton kernel, based on shared memory budget, register pressure, occupancy targets, problem shape, and access pattern.
write-numerically-stable-kernel
Guide the agent through identifying numerical instability risks in a kernel's computation path and applying the correct stabilization strategy for each risk class.