optimize

optimize is a skill for Claude Code, Codex from Dogacel/auto-gpu-kernel. It costs 27 tokens per session (1,418 once invoked), scanned A, original, Apache-2.0.

An autonomous optimization-loop skill for improving a computational kernel, a focused piece of code that performs a calculation. It plans one change, implements it, benchmarks the result, and records the experiment while considering earlier attempts and the input workload.

In plain words
What is it for?
Use it for repeated kernel-optimization iterations, including choosing one structural or workload-specific change, running the benchmark, and logging the outcome.
Why use it?
It gives performance work a repeatable process instead of making many unmeasured changes at once. Recorded results help avoid repeating failed approaches and guide the next change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it for repeated kernel-optimization iterations, including choosing one structural or workload-specific change, running the benchmark, and logging the outcome.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dogacel/auto-gpu-kernel/optimize
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 Dogacel/auto-gpu-kernel --skill optimize
Clone the repo
git clone --depth 1 https://github.com/Dogacel/auto-gpu-kernel

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 optimize

README.md
[![agentmods](https://agentmods.dev/badge/skills/dogacel/auto-gpu-kernel/optimize/github.svg)](https://agentmods.dev/skills/dogacel/auto-gpu-kernel/optimize)
Your own site
<a href="https://agentmods.dev/skills/dogacel/auto-gpu-kernel/optimize"><img src="https://agentmods.dev/badge/skills/dogacel/auto-gpu-kernel/optimize/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 optimize

Your own site · 80×15
<a href="https://agentmods.dev/skills/dogacel/auto-gpu-kernel/optimize"><img src="https://agentmods.dev/badge/skills/dogacel/auto-gpu-kernel/optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,418 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.00027 $0.01418
Opus 5 $0.00014 $0.00709
Sonnet 5 $0.00005 $0.00284
Haiku 4.5 $0.00003 $0.00142

Measured 2d ago against content hash 888af5b42e00, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-14, from the pricing page.

Security

Grade A, and why

optimize 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 2d 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.

kopt/assets/skills/optimize/SKILL.md · 81 lines

How it starts

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

optimize — autonomous optimization loop

Iteratively improve the kernel named by config.toml. Rules in AGENTS.md are non-negotiable.

Loop

IMPORTANT: Make sure the research agent is called every 5-10 experiments to ensure we are not going in circles.

  1. Assess. Read the kernel, the baseline, experiments/summary.md, experiments/LESSONS.md. For directly relevant prior attempts, read experiments/exp_N/result.md. If the highest-numbered folder has plan.md but no result.md, implement that plan — it's reserved (see §Folder reservation).

  2. Plan one change. Follow the progression ladder in AGENTS.md §Language. Don't skip structural wins for micro-tuning. Scan summary.md for similar past attempts; if close, articulate what's different this time.

    Study workload characteristics — the distribution of every variable axis listed in AGENTS.md §This kernel, plus any exploitable structure — and branch the kernel when a regime admits a cheaper path. Input-characteristic specialization can beat a one-size-fits-all kernel by orders of magnitude. Fair game as long as the win is real and not workload gaming.

    Minimize launches and copies. Fold prologue/epilogue ops (initialization, padding, masking, remapping) into the main kernel rather than calling them as separate launches. Avoid .contiguous() when you can plumb strides into the kernel instead — each copy is both a launch and a memory round-trip.

  3. Implement. One optimization. Preserve DPS — the outputs are pre-allocated and passed in; never allocate them inside the kernel.

  4. Validate. kbench bench --quick (2 workloads: smallest + largest — catches shape-assumption bugs). Fix compile/correctness before proceeding.

  5. Measure. kbench bench --stride 2. Before trusting the number:

    • Reference-latency sanity: if the ref latency is >30% off the moving median from recent summary.md rows, the VM is anomalous — re-run once.
    • Sub-5% deltas are noise on cross-VM comparison. Confirm with kbench ab --a experiments/exp_<prev-best>/solution_fused.py.
    • Report latency split into small/large groups when both are present; aggregated means hide regime-specific regressions.
    • If results are looking good or you are not certain due to noise, proceed with a full kbench bench.

Read the full file on GitHub · 81 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. 2d ago First seen · 81 lines · 27 tokens per session scan A 888af5b42e00

Subscribe to this mod's changes

optimize is a skill published in the GitHub repository Dogacel/auto-gpu-kernel (161 stars, last pushed 2d ago), licensed Apache-2.0. It adds 27 tokens to every session and 1,418 once invoked, about $0.0001 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-13.

Related

Other skills, from other repositories

cuda-kernel-optimizer

Use when optimizing or diagnosing GPU workload performance with CUDA, CUTLASS, Triton, PyTorch, vLLM or TensorRT-LLM; interpreting NCU, Nsys or PyTorch Profiler evidence; or preparing the workload and correctness checks for such optimization. General coding, skill maintenance and conceptual GPU questions do not…

troycheng/cuda-kernel-optimizer · 77 tokens

skypilot-multi-cloud-orchestration

Multi-cloud orchestration for ML workloads with automatic cost optimization. Use when you need to run training or batch jobs across multiple clouds, leverage spot instances with auto-recovery, or optimize GPU costs across providers.

davila7/claude-code-templates · 51 tokens

analyzing-linux-kernel-rootkits

Detect kernel-level rootkits in Linux memory dumps using Volatility3 linux plugins (checksyscall, lsmod, hiddenmodules), rkhunter system scanning, and /proc vs /sys discrepancy analysis to identify hooked syscalls, hidden kernel modules, and tampered system structures.

mukul975/Anthropic-Cybersecurity-Skills · 65 tokens

colab-finetuning

Fine-tune LLMs on Google Colab GPUs directly from openscience. Connects to Colab runtimes via WebSocket bridge for remote training with Unsloth. Supports SFT, GRPO, DPO, vision, and TTS workflows on free T4 to Pro A100 GPUs.

synthetic-sciences/openscience · 67 tokens

modal-serverless-gpu

Run approved CPU or GPU work through OpenScience computejob on the user's configured Modal account. Use for isolated scientific scripts, dependency provisioning, durable outputs, logs, status, cancellation, and recovery. Never invoke the Modal SDK or CLI directly.

synthetic-sciences/openscience · 54 tokens

review

Structured PR review for pygraphistry. Input: PR number/branch (default current branch PR). Output: findings and convergence artifacts under plans/ /. Method: multi-wave, evidence-first review across spec, correctness, tests, security, code quality, DRY, concurrency, performance, architecture, operability, and…

graphistry/pygraphistry · 69 tokens