write-backend-agnostic-kernel-plan

write-backend-agnostic-kernel-plan is a skill for Claude Code, Codex from tensormux/kernel-skills. It costs 0 tokens per session (3,004 once invoked), scanned A, original, MIT.

A planning guide for compute kernels that need to run on different hardware, such as NVIDIA and AMD GPUs, with a CPU fallback. A compute kernel is a low-level program for performing a specific calculation.

In plain words
What is it for?
Use it before implementing a kernel for multiple platforms, or when deciding between tools such as Triton, OpenCL, SYCL, or separate vendor-specific code.
Why use it?
It helps teams identify compatibility limits and choose how to share code without tying the design to one hardware vendor.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before implementing a kernel for multiple platforms, or when deciding between tools such as Triton, OpenCL, SYCL, or separate vendor-specific code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tensormux/kernel-skills/write-backend-agnostic-kernel-plan
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 tensormux/kernel-skills --skill write-backend-agnostic-kernel-plan
Clone the repo
git clone --depth 1 https://github.com/tensormux/kernel-skills

Made for: Claude Code, 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 write-backend-agnostic-kernel-plan

README.md
[![agentmods](https://agentmods.dev/badge/skills/tensormux/kernel-skills/write-backend-agnostic-kernel-plan.svg)](https://agentmods.dev/skills/tensormux/kernel-skills/write-backend-agnostic-kernel-plan)
Your own site
<a href="https://agentmods.dev/skills/tensormux/kernel-skills/write-backend-agnostic-kernel-plan"><img src="https://agentmods.dev/badge/skills/tensormux/kernel-skills/write-backend-agnostic-kernel-plan.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,004 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.
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.00000 $0.03004
Opus 5 $0.00000 $0.01502
Sonnet 5 $0.00000 $0.00601
Haiku 4.5 $0.00000 $0.00300

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

Security

Grade A, and why

write-backend-agnostic-kernel-plan 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 8d 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.

skills/portability/write-backend-agnostic-kernel-plan/SKILL.md · 151 lines

How it starts

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

Skill: Write a Backend-Agnostic Kernel Plan

Purpose

Guide the agent through planning a compute kernel that must run correctly and performantly on multiple hardware backends (NVIDIA, AMD, CPU fallback, or future backends) before any backend-specific implementation is written — covering abstraction strategy, feature compatibility mapping, and the tradeoffs between portability and performance.

Use this when

  • Designing a new kernel that must ship on both NVIDIA (CUDA) and AMD (ROCm/HIP) hardware.
  • Evaluating whether Triton, OpenCL, SYCL, or manual multi-backend code is the right abstraction level for a given operation.
  • The team needs a plan for supporting a new hardware backend without rewriting all existing custom kernels from scratch.
  • Building a library or framework component that should not be tied to a single vendor's programming model.

Do not use this when

  • NVIDIA is the only target and will remain so for the foreseeable future. Portable abstractions add engineering cost for no benefit.
  • The operation can be expressed entirely through a framework like PyTorch (via ATen/Inductor) or JAX — backend portability is the framework's responsibility, not the kernel developer's.
  • The performance requirement is so tight that the portability cost (abstraction overhead, suboptimal tile shapes per backend) cannot be absorbed.

Inputs the agent should gather first

  • Required backends: which hardware targets must be supported? NVIDIA (which SMs), AMD (CDNA, RDNA), CPU, Apple Silicon, Intel GPU? Each pair of backends adds complexity.
  • Operation type: elementwise, reduction, GEMM-like, attention, or custom. This determines how well it maps to existing cross-backend libraries.
  • Performance requirements: is near-peak compute utilization required on all backends, or is correctness + reasonable performance sufficient? Maximum portability and maximum performance are inversely correlated.
  • Team capabilities: does the team have expertise in all target backends, or only in one? A plan requiring intimate knowledge of AMD LDS banking and NVIDIA tensor core scheduling simultaneously is unrealistic for a small team.
  • Tolerance for abstraction layers: is Triton acceptable? Is CUTLASS Cute? Is a fallback using cuBLAS/rocBLAS + a custom elementwise layer acceptable?

Read the full file on GitHub · 151 lines

Files

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.

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. 8d ago First seen · 151 lines · 0 tokens per session scan A abba92db0598

Subscribe to this mod's changes

write-backend-agnostic-kernel-plan is a skill published in the GitHub repository tensormux/kernel-skills (73 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,004 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.

Related

Other skills, from other repositories

embedded-iot

Embedded systems firmware, microcontrollers (ESP32, STM32, Arduino, Raspberry Pi), RTOS (FreeRTOS, Zephyr), IoT protocols (MQTT, CoAP, BLE), bare-metal C/C++, and hardware peripheral interfaces (I2C, SPI, UART, GPIO). Use when developing firmware, working with microcontrollers, or building IoT devices.

travisjneuman/.claude · 80 tokens

hip-kernel-optimization

This skill should be used when writing or tuning HIP kernels on AMD/NVIDIA GPUs, covering memory coalescing, shared-memory tiling, bank conflict avoidance, warp primitives, occupancy, vectorization, async ops, loop unrolling, and profiling.

AMD-AGI/Apex · 56 tokens

auditing-uefi-firmware-with-chipsec

Use Intel CHIPSEC to assess platform firmware configuration, SPI flash write protection, BIOS lock, SMM/SMRR, and Secure Boot variable state, dump SPI flash, and triage UEFI variables for firmware-level threats.

adriannoes/awesome-agentic-ai · 56 tokens

azure-local

Expert knowledge for Azure Local development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when planning Azure Local racks/SDN, disconnected clusters, Arc VMs, GPU workloads, or…

MicrosoftDocs/Agent-Skills · 112 tokens

mi300-cdna3-architecture

MI300/CDNA3 architecture guide for HIP/Triton optimization—MFMA variants, dual register files, data formats, sparsity, LDS/GWS, and best practices.

AMD-AGI/Apex · 44 tokens

mi300-hip-programming-insights

CDNA3/MI300 HIP programming insights—chiplet/cache model, Infinity Cache, memory coherency, matrix cores, sparsity, and best practices.

AMD-AGI/Apex · 41 tokens