Hugging Face Kernels is a system that lets Python libraries and applications load compute kernels directly from the Hugging Face Hub. It is used by Python and PyTorch developers who need portable kernels that can support multiple versions and build configurations. The catalogue skills help agents work with the kernels system and its kernel-building tools.
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 skills add huggingface/kernels --skill triton-kernelsgit clone --depth 1 https://github.com/huggingface/kernelsWrote 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/huggingface/kernels/triton-kernels)<a href="https://agentmods.dev/skills/huggingface/kernels/triton-kernels"><img src="https://agentmods.dev/badge/skills/huggingface/kernels/triton-kernels/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/huggingface/kernels/triton-kernels"><img src="https://agentmods.dev/badge/skills/huggingface/kernels/triton-kernels.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00000 | $0.05062 |
| Opus 5.5 | $0.00000 | $0.02025 |
| Sonnet 5.5 | $0.00000 | $0.01012 |
| Haiku 4.5 | $0.00000 | $0.00506 |
Grade A, and why
triton-kernels 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 3mo 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 — 541 lines — stays where its author put it; the contents beside it link to each section on GitHub.
| name | triton-kernels |
|---|---|
| description | Provides guidance for writing and benchmarking portable Triton kernels targeting NVIDIA and AMD GPUs. Covers core DSL patterns, @triton.autotune, numerics (fp16/bf16/fp8), masked loads, reductions, tiling, benchmarking harness, correctness testing, and integration with HuggingFace Kernels Hub (get_kernel). Vendor-neutral: points to rocm-kernels and xpu-kernels for backend-specific tuning. |
| disable-model-invocation | false |
| user-invocable | true |
| allowed-tools | Read, Grep, Glob, Bash |
| argument-hint | kernel type: softmax, matmul, rmsnorm, layernorm, activation, reduction, element-wise, autotune, benchmark, correctness, get_kernel, transformers, diffusers |
Portable Triton Kernels
This skill provides patterns and guidance for developing portable, optimized Triton kernels that run on NVIDIA and AMD GPUs without modification. For backend-specific tuning, see rocm-kernels (AMD) and xpu-kernels (Intel).
When This Skill Applies
Use this skill when:
- Writing new Triton kernels for normalization, activation, attention, or linear algebra ops
- Deciding block sizes, num_warps, num_stages, and autotune configs
- Handling numerics (fp32 accumulation, bf16/fp16 input/output, masked values)
- Setting up correctness tests against a PyTorch reference
- Benchmarking kernel throughput (GB/s or TFLOPS)
- Publishing a Triton kernel to the HuggingFace Kernels Hub via get_kernel
- Fusing multiple ops into a single kernel to reduce DRAM round-trips
Hard Constraints
-
BLOCK_SIZE for reductions must cover the full reduction dimension. Use
triton.next_power_of_2(dim)in the Python wrapper. Never autotune BLOCK_SIZE when it controls the reduction axis — partial rows give wrong results silently. -
Masked loads need a safe
othervalue. Useother=0.0for additive contexts (sum, dot product). Useother=float('-inf')for max-based reductions (softmax numerator). Using the wrong fill value is the #1 cause of subtle numerical bugs.
What ships with it
9 files 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.
- CHANGELOG.md 474 B
- examples/fused_softmax.py 3.4 KB runs code
- examples/skill_test_layernorm.py 6.5 KB runs code
- manifest.txt 202 B
- references/autotune-guide.md 4.0 KB
- references/benchmarking-guide.md 4.6 KB
- references/kernel-patterns.md 5.3 KB
- scripts/benchmark_template.py 3.5 KB runs code
- scripts/correctness_template.py 3.6 KB runs code
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.
- 3mo ago First seen · 541 lines · 0 tokens per session scan A c4225b81fbdf
triton-kernels is a skill published in the GitHub repository huggingface/kernels (796 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,062 tokens. 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.
triton-kernels compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| triton-kernelshuggingface/kernels | Skill | 796 | today | Apache-2.0 | A | 0 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 101k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 395k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 330k | 2d ago | MIT | A | 21 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 14k | yesterday | CC0-1.0 | A | 113 | Claude Code, Codex |
| next-cache-components-adoptionvercel/next.js | Skill | 144k | today | MIT | A | 95 | Claude Code |