Borrowing it
Nothing to install: this file belongs to RightNow-AI/AutoMegaKernel. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/RightNow-AI/AutoMegaKernel/main/.claude/commands/amk-compile.mdgit clone --depth 1 https://github.com/RightNow-AI/AutoMegaKernelWrote 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/commands/rightnow-ai/automegakernel/amk-compile)<a href="https://agentmods.dev/commands/rightnow-ai/automegakernel/amk-compile"><img src="https://agentmods.dev/badge/commands/rightnow-ai/automegakernel/amk-compile.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.00029 | $0.00623 |
| Opus 5 | $0.00015 | $0.00311 |
| Sonnet 5 | $0.00006 | $0.00125 |
| Haiku 4.5 | $0.00003 | $0.00062 |
Grade A, and why
amk-compile 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.
What it actually says
One-shot compile and verify a model into a single persistent CUDA megakernel with AutoMegaKernel
(AMK) on $ARGUMENTS (parse as model [gpu]; default gpu = rtx5090; default model =
toy). This is THE product path: import -> lower -> validate (deadlock + race free) -> verify vs
eager -> build the GPU megakernel -> measure against the HBM roofline -> emit a correct megakernel
- report.
HARD HONESTY RULES (state them, obey them):
- Correctness FIRST: the compile path verifies vs eager PyTorch AND the CPU ReferenceVM; a latency is NEVER reported without a correctness PASS.
- validate-before-launch: an unsafe schedule is a clean REJECTED (deadlock/race-free proof), never a hung GPU.
- The edit surface (if you tune afterward) is ScheduleConfig + kernel_knobs ONLY, never kernel code, never vm/ or the frozen ABI.
- Measured-gpu latency is drift-robust; impossible sub-roofline latencies are withheld.
- Any speedup is vs AMK's OWN baseline, NOT a claim of beating cuBLAS/vLLM.
Do this:
- Confirm the environment with
amk_doctor()(CLI:amk doctor), torch/cuda, device name, nvcc, registered targets. A CUDA GPU + nvcc is required to build and measure the megakernel. - Compile and verify in one shot via the CLI:
amk compile <model> --gpu <gpu> --regime single-stream(equivalentlyuv run python amk_cli.py compile <model> --gpu <gpu> --regime single-stream). This lowers, statically validates, verifies correctness vs eager, builds the GPU megakernel, and measures it against theweights / HBM_bandwidthroofline, emitting the megakernel + report. - Report the result: correctness PASS (vs eager + ReferenceVM), measured per-token
latency_uslatency_kind,pct_of_roofline, and theschedule_id. If correctness did not PASS, report the failure honestly and do NOT report a latency.
Optional next step: to tune the compiled schedule, run /amk-optimize <model> <gpu> (interactive
propose -> eval -> keep/revert) or /amk-autoresearch <model> <gpu> (unattended). Speedups there
are vs AMK's own default schedule, not vs cuBLAS/vLLM.
Use only the canonical names: CLI amk compile and amk doctor (MCP amk_doctor for the
environment check).
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.
- 8d ago First seen · 40 lines · 29 tokens per session scan A 130f34cd7d13
amk-compile is a command published in the GitHub repository RightNow-AI/AutoMegaKernel (138 stars, last pushed 2mo ago), licensed MIT. It adds 29 tokens to every session and 623 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-08-30.
Other commands, from other repositories
PARAMETER
Command "PARAMETER" from webgptorg/promptbook, covering parameter command, example usage and ⭕ parameters.
laravel-ai-sdk
Build AI features with the first-party Laravel AI SDK (Laravel 13+); use the laravel:ai-sdk skill exactly as written.
audit-prompt
Evaluate an existing prompt for clarity, effectiveness, and edge cases.
dare-llm-integration
Integração segura e eficiente com LLMs (Gemini, Claude, OpenAI, Ollama) em projetos DARE.
prompt-create
Create a new prompt following ground rules.
a
Intercept Mode - Auto-improve and execute immediately.