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 agentmods add commands/rightnow-ai/automegakernel/amk-optimizegit 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-optimize)<a href="https://agentmods.dev/commands/rightnow-ai/automegakernel/amk-optimize"><img src="https://agentmods.dev/badge/commands/rightnow-ai/automegakernel/amk-optimize.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.00027 | $0.00778 |
| Opus 5 | $0.00014 | $0.00389 |
| Sonnet 5 | $0.00005 | $0.00156 |
| Haiku 4.5 | $0.00003 | $0.00078 |
Grade A, and why
amk-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 6d 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
Drive an interactive AutoMegaKernel (AMK) schedule-optimization session on $ARGUMENTS
(parse as model [gpu]; default gpu = rtx5090; default model = toy). Use the
megakernel-optimization skill's loop and obey its HARD HONESTY RULES.
HARD HONESTY RULES (state them, obey them):
- Correctness FIRST: NEVER report a latency without a correctness PASS vs the CPU ReferenceVM. Keep a candidate only if it is correct AND >= 1% faster than the incumbent.
- validate-before-launch: an unsafe ScheduleConfig is a clean REJECTED, never a hung GPU.
- Edit surface is ScheduleConfig + kernel_knobs ONLY, never kernel code, never vm/ or the ABI.
- Measured-gpu latency is drift-robust; impossible sub-roofline latencies are withheld.
- Speedups are vs AMK's OWN default schedule, NOT a claim of beating cuBLAS/vLLM.
Do this:
- Read the edit surface with
amk_propose(model, gpu)(CLI fallback:amk propose <model> --gpu <gpu>). Report the incumbentschedule_configand the editablesearch_space(including thekernel_knobs.*sub-surface). - Establish the baseline with
amk_eval(model, gpu, <incumbent cfg>, device="auto")(CLI: writecfg.json,amk eval <model> --gpu <gpu> --config cfg.json). RequirevalidANDcorrect. Record itslatency_usas the incumbent latency. - Loop: propose ONE knob change off the current best (one ScheduleConfig knob OR one
kernel_knobsfield per trial),amk_evalit, and keep/revert, keep ONLY ifvalidANDcorrectANDlatency_us < incumbent_latency_us * 0.99. After each trial callamk_orchestrate_record(status, latency_us=..., pct_roofline=..., kind=..., config=..., description=...)withstatusinkept/revert/failed/crash/timeout/rejected(revertis the canonical token for any correct-but-not-kept candidate). - Between trials, consult
amk_orchestrate_next()(continue-or-STOP) andamk_orchestrate_status()(baseline/best/speedup/plateau). Stop whennextsays STOP or the user asks. To run the full keep/revert loop in one shot instead, useamk_loop(model, gpu, budget=N)(CLI:amk loop <model> --gpu <gpu> --budget N).
Finish with a short report: best schedule_id, best latency_us + latency_kind,
pct_of_roofline, and the speedup vs the incumbent baseline (clearly stated as vs AMK's own
default, not vs cuBLAS/vLLM).
Use only the canonical names: MCP amk_propose/amk_eval/amk_loop/amk_orchestrate_record/
amk_orchestrate_next/amk_orchestrate_status; CLI amk propose|eval|loop and
python amk_orchestrate.py record|next|status.
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.
- 6d ago First seen · 42 lines · 27 tokens per session scan A d2bd5e528ca6
amk-optimize is a command published in the GitHub repository RightNow-AI/AutoMegaKernel (137 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 778 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
observe
部屋を能動的に観察する。3つの基本ブロックを自由に選びながらループし、受動的なスナップショットではなく発見のある観察を行う。.
model
Check if an AI model fits on your GPU before downloading.
tapeout
Produce a complete, fab-ready export bundle for a routed board — or refuse loudly. Superset of /kct:manufacturing-readiness: runs the three sign-off pre-gates, then adds a BOM part-number-resolution gate, a per-rule warning-review gate (assembly-affecting warnings block unless explicitly acknowledged), schematic +…
research
Research a technical or product question.
rvcsi-calibrate
Learn a v0 per-subcarrier baseline (mean amplitude) from a .rvcsi capture.
iot
This API allows you to manage your IoT hubs and devices.