cpu-kernel-authoring

cpu-kernel-authoring is a skill for Codex from OutlineDriven/outline-driven-development. It costs 45 tokens per session (2,633 once invoked), scanned A, original, Apache-2.0.

A workflow for writing, optimizing, and benchmarking C++ code that runs CPU calculations with AVX2 or AVX512 instructions. It compares the result with a PyTorch baseline for the Hugging Face kernels ecosystem.

In plain words
What is it for?
Use it to create or tune a C++ CPU kernel, run correctness checks and performance trials, and finalize the best measured version.
Why use it?
It provides a defined path for checking that a faster low-level kernel still gives correct results. It also records trials and builds and installs the resulting Python package.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to create or tune a C++ CPU kernel, run correctness checks and performance trials, and finalize the best measured version.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/outline-driven-development/cpu-kernel-authoring
Install

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.

Any agent
npx skills add OutlineDriven/outline-driven-development --skill cpu-kernel-authoring
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/outline-driven-development

Made for: Codex.

Wrote 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.

agentmods badge for cpu-kernel-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/cpu-kernel-authoring/github.svg)](https://agentmods.dev/skills/outlinedriven/outline-driven-development/cpu-kernel-authoring)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/cpu-kernel-authoring"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/cpu-kernel-authoring/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.

agentmods 80×15 button for cpu-kernel-authoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/cpu-kernel-authoring"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/cpu-kernel-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,633 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.02633
Opus 5 $0.00023 $0.01316
Sonnet 5 $0.00009 $0.00527
Haiku 4.5 $0.00005 $0.00263

Measured 3d ago against content hash 5eec63c0eef7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

cpu-kernel-authoring 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 3d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/analyze_op.py, scripts/benchmark_cpu.py, scripts/config.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.devin/skills/cpu-kernel-authoring/SKILL.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CPU kernel authoring

Contract

Field Bound contract
Trigger A C++ CPU kernel for the Hugging Face kernels ecosystem must be written, optimized, or benchmarked with AVX2 or AVX512 intrinsics against a PyTorch baseline.
Authority Reversible local. Writes C++ kernel sources, build.toml, and torch_binding.cpp under the kernel directory, a wheel under dist/, the installed kernel package in the active Python environment, and trial state under trials/<kernel_name>/ and output/. Rollback is version control for the sources, pip uninstall <package> for the package, and removal of dist/, trials/<kernel_name>/, and output/. No remote mutation.
Side effect Kernel sources and build files change; a wheel is built and installed; trial directories and result records accumulate.
Done The kernel passes the correctness check in scripts/benchmark_cpu.py, every trial up to max_trials has run or the speedup exceeded early_stop_speedup, and the best trial is finalized into output/ with its final measurement; or a failure class from the table below is reported with the recovery step taken.

Inputs

  • Kernel name (required): the trial-tree label, for example my_rmsnorm. Used only by trial_manager.py, which accepts it as a single directory name under trials/, never a path.
  • Baseline file (required): a baseline.py that defines get_inputs() and either get_reference_output() or a Model class (with optional get_init_inputs()). It is the ground truth for correctness and the speed reference.
  • Operation name (required): the plain name analyze_op.py --op looks up, for example rms_norm.
  • Input shapes (required): comma-separated shape strings for analyze_op.py --shapes, for example "1024x4096,2048x8192".
  • Package and function path (required from step 5): the installed package name, for example my_kernel, and its callable as package.function, for example my_kernel.rms_norm. benchmark_cpu.py and cpu_profiler.py take this path as their --op; it is not the operation name above.
  • Toolchain (required): kernel-builder, pip, PyYAML (imported by scripts/config.py), numactl (used by the pinned benchmark in step 8), a C++ compiler with AVX512 support, and PyTorch. perf is required only when perf_stat_enabled is true.

Read the full file on GitHub · 67 lines

Changes

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.

  1. 3d ago First seen · 67 lines · 45 tokens per session scan A 5eec63c0eef7

Subscribe to this mod's changes

cpu-kernel-authoring is a skill published in the GitHub repository OutlineDriven/outline-driven-development (52 stars, last pushed 3d ago), licensed Apache-2.0. It adds 45 tokens to every session and 2,633 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-09-06.