Borrowing it
Nothing to install: this file belongs to swarm-ai-research/swarm. 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/swarm-ai-research/swarm/main/.claude/commands/load_keys.mdgit clone --depth 1 https://github.com/swarm-ai-research/swarmWrote 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/swarm-ai-research/swarm/load_keys)<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/load_keys"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/load_keys.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.00000 | $0.00680 |
| Opus 5 | $0.00000 | $0.00340 |
| Sonnet 5 | $0.00000 | $0.00136 |
| Haiku 4.5 | $0.00000 | $0.00068 |
Grade A, and why
load_keys 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 7d 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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/load_keys
Load API keys from ~/.zshrc (or ~/.bashrc) into the current shell environment. Eliminates the need to manually grep and export keys each session.
Usage
/load_keys [provider]
Examples:
/load_keys(load all available keys)/load_keys openrouter(load only OpenRouter key)
Behavior
-
Detect shell config file: Check for
~/.zshrcfirst, then~/.bashrc, then~/.bash_profile. -
Extract keys: For each known provider, grep the shell config for the key variable and export it. The known key variables are:
Variable Provider OPENROUTER_API_KEYOpenRouter ANTHROPIC_API_KEYAnthropic OPENAI_API_KEYOpenAI GROQ_API_KEYGroq TOGETHER_API_KEYTogether DEEPSEEK_API_KEYDeepSeek GOOGLE_API_KEYGoogle Extraction command per key (handles
export VAR="val",export VAR='val',export VAR=val):grep '^export KEY_NAME=' ~/.zshrc | tail -1 | sed 's/^export //' | cut -d= -f2- | tr -d '"' | tr -d "'" -
Export into current environment: For each key found, run:
export KEY_NAME="<extracted_value>" -
Report: Print which keys were loaded and their character count (NOT the actual values):
API Keys Loaded OPENROUTER_API_KEY: set (73 chars) ANTHROPIC_API_KEY: not found OPENAI_API_KEY: not found GROQ_API_KEY: not found TOGETHER_API_KEY: not found DEEPSEEK_API_KEY: not found GOOGLE_API_KEY: not found -
If a
[provider]argument is given, only load that provider's key. Map provider names to variables:openrouter→OPENROUTER_API_KEYanthropic→ANTHROPIC_API_KEYopenai→OPENAI_API_KEYgroq→GROQ_API_KEYtogether→TOGETHER_API_KEYdeepseek→DEEPSEEK_API_KEYgoogle→GOOGLE_API_KEY
Constraints
- Never print the actual key values — only confirm presence and length.
- If the shell config file doesn't exist, say so and stop.
- If a key is already set in the environment AND matches what's in the config file, skip it and note "already set".
- If a key is already set but DIFFERS from the config file, load the config file version and note "updated from ~/.zshrc".
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.
- 7d ago First seen · 66 lines · 0 tokens per session scan A c5accb6871a6
load_keys is a command published in the GitHub repository swarm-ai-research/swarm (41 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 680 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.
Other commands, from other repositories
story-long-scan
A command for scanning long-form online fiction rankings on platforms such as Qidian, Fanqie, and Jinjiang, then analyzing the ranking data.
story-short-scan
A tool for scanning and analysing popular short web-fiction rankings on platforms such as Zhihu Yanyan and Fanqie Short Stories.
eval-merge
Use the Read tool to load .skill-compass/{skill-name}/manifest.json. Verify.
speckit.git.validate
Validate current branch follows feature branch naming conventions.
reflect
Curate and compress recent memory. This command reviews the last 7 days of journal entries, extracts durable insights, and updates long-term memory files. Think of it as memory maintenance -- moving important things from short-term to long-term storage.
checklist
Generate a custom checklist for the current feature based on user requirements.