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/randomittin/heimdall/switch-aigit clone --depth 1 https://github.com/randomittin/heimdallWhat 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 | $0.00047 | $0.00653 |
| Opus 5 | $0.00023 | $0.00327 |
| Sonnet 5 | $0.00009 | $0.00131 |
| Haiku 4.5 | $0.00005 | $0.00065 |
Grade A, and why
switch-ai 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.
How it starts
The opening of the file, as written. The whole thing — 38 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Switch AI Backend
hmd can be driven by more than one offline coding-AI CLI — Claude Code, Cursor CLI's agent/cursor-agent, and more as they're added. This command shows or changes which one hmd prefers.
What this actually controls — read before switching
hmd is a Claude Code plugin: code loaded into a live Claude Code process. It cannot hot-swap itself into a cursor-agent process mid-session, and it cannot restart itself as a different CLI. /switch-ai cannot change what is hosting this session, right now — nothing can, short of you exiting and relaunching under a different CLI's own launcher (e.g. cursor-agent instead of claude). That is a restart, not something this command performs.
What it genuinely does change:
- The recorded preference — persisted to
.planning/settings.jsonunder theai_backendkey. This governs which backend hmd's own sub-agent spawns prefer for delegated work when more than one is detected, effective immediately for new spawns. - The default for your NEXT session — the next time hmd starts a run,
heimdall-ai-select session-startreads this recorded choice first and will not re-prompt or re-guess.
Instructions
- Parse
$ARGUMENTS:- If empty or missing: show the current backend and the detected options, then stop — do not change anything.
Present the current selection first, then the lettered list exactly as printed (e.g.heimdall-ai-select current . heimdall-ai-select list --authA) Claude Code [claude-code] (current host),B) Cursor CLI (cursor-agent) [cursor-cli] — not logged in). - Otherwise: treat
$ARGUMENTSas a letter (A,B, ...), a backend id (claude-code,cursor-cli), or a loose name (cursor,claude) and pass it straight through —heimdall-ai-selectresolves letter/id/loose-name itself and refuses anything not currently detected onPATH:
Report its exit message verbatim, success or rejection — don't re-word it.heimdall-ai-select select "$ARGUMENTS" .
- If empty or missing: show the current backend and the detected options, then stop — do not change anything.
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.
- 2d ago First seen · 38 lines · 47 tokens per session scan A bbe6d136d924
switch-ai is a command published in the GitHub repository randomittin/heimdall (5 stars, last pushed 11d ago), licensed MIT. It adds 47 tokens to every session and 653 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-08-31.
Other commands, from other repositories
autocode
Fully autonomous development pipeline. Give it a feature description or PRD file and it will plan, write tests, implement code, run tests, and verify — all automatically with zero human intervention.
autocode-new
Scan current project and generate a project-specific autocode development pipeline (agents, commands, rules, hooks). Interactive setup wizard.
dispatcher
Pick the next-best repo to work on across the portfolio — rank free repos, recommend one, claim its lease atomically, and route to the entry command.
standup
Show a daily standup summary with completed, in-progress, and blocked tasks across all active epics.
dev-planner
Generate or update DEV-PLAN.md with phased development plan from Product-Spec.md.
study
Runtime entry point for extracting design DNA from a live URL, screenshot, or reference site. Part of the Discovery lifecycle phase.