mode
Skill0 starsChanged 5 months agoMITView on GitHub
Toggle between single-LLM (Claude-only) and multi-LLM (delegate to Gemini, Codex, or other CLIs) modes. Shows current mode, available external CLIs, delegation stats, and logs. Use when the user says "switch to multi", "use Gemini", "delegation status", "how many delegations", or "token savings". Subcommands: `/mode` (status), `/mode multi`, `/mode single`, `/mode stats`, `/mode reset`.
- Pipes a download into a shell
- Reads credentials
11 other projects use a version of this.
Adopted by
Most recently taken up by
- agoopintsai/shiprighttheir own version, first seen Nov 1, 2026
- Edmonds-Commerce-Limited/claude-code-hooks-daemontheir own version, first seen Oct 28, 2026
- Scylla23/modelroutertheir own version, first seen Oct 20, 2026
- ProjectAJ14/eklavyatheir own version, first seen Oct 20, 2026
- DATA-AI-XYZ/Tandemtheir own version, first seen Oct 15, 2026
- lukasrepublic/agentic-foundrytheir own version, first seen Oct 11, 2026
Used with
Projects with it also use setup.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillsetup
Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".
Also in 3 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- ProjectAJ14/eklavya★ 29same name
- YehudaFrankel/clankbrain★ 16same name
- Edmonds-Commerce-Limited/claude-code-hooks-daemon★ 4same name
- LarryStanley/pi-delegate★ 4same name
- agoopintsai/shipright★ 2same name
- ahamedzoha/atelier★ 2same name
- ibahgat/oh-my-iflow★ 2same name
- lukasrepublic/agentic-foundry★ 1same name
- Scylla23/modelrouter★ 1same name
- StakeholderSensei/polygraph★ 1same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- battleSkill
- briefSkill
- codex-writeSkill
- councilSkill
- crawlSkill
- deslopSkill
- evaluate-planSkill
- gmail-attachmentSkill
- keyword-researchSkill
- model-scanSkill
- namecheapSkill
- pair-sessionSkill
- planSkill
- salesforce-reportsSkill
- second-opinionSkill
- update-machineSkill
- week-aheadSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 3 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
When mode is single, every skill runs natively in Claude.
- Distinctive: line 36
No args → show status
- Very specific: line 44
Read .claude/llm-mode.json and display:
- Very specific: line 65
Read .claude/llm-mode.json for mode and stats.
- Very specific: line 66
Check agy --version for Antigravity CLI.
- Very specific: line 67
Check codex --version for Codex CLI.
- Very specific: line 68
Check $PERPLEXITY_API_KEY (or your provider's env var) for web search.
- Very specific: line 71
If .claude/llm-mode.json doesn't exist, show Mode: SINGLE (default — no config file yet).
- Very specific: line 75
Verify the Google delegate CLI is installed and authenticated.
- Very specific: line 89
If the auth check fails, abort with installation/auth instructions.
- Very specific: line 92
Update .claude/llm-mode.json: set mode to "multi", update updated_at to the current ISO timestamp.
- Distinctive: line 100
Check Codex CLI and Perplexity availability non-blockingly.
- Very specific: line 105
Update .claude/llm-mode.json: set mode to "single", refresh updated_at.
- Very specific: line 111
Read .claude/delegation.log and show the last 20 entries plus summary stats: total, failure rate, average duration on success, …
- Very specific: line 116
Write a fresh .claude/llm-mode.json with defaults (single mode, zeroed stats).
- Distinctive: line 124
After a successful delegation:
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/mode — LLM Routing Switch
Manage delegation across a multi-LLM setup. The pattern: Claude orchestrates, judges, reviews, and surgically fixes; cheaper or specialized CLIs handle the heavy lifting.
| Layer | Typical CLI | Strength |
| Heavy reading | Antigravity CLI (agy) | Large context window, fast cold reads. Replaces the Gemini CLI on consumer plans as of 2026-06-18; enterprise plans may still ship gemini. |
| Heavy writing | Codex CLI | High-throughput code generation |
| Surgical web search | Perplexity API (or others) | Live docs, breaking changes |
Other skills in this collection read .claude/llm-mode.json to decide whether to delegate.
When mode is single, every skill runs natively in Claude.
Route by argument
Parse the argument after /mode:
- No args → show status
multi→ switch to multisingle→ switch to singlestats→ show delegation logreset→ reset to defaults
Show status (default)
Read .claude/llm-mode.json and display:
## LLM Mode: <MULTI / SINGLE>
### Delegation targets (in multi mode)
READING (Antigravity CLI / agy): [available / not found]
WRITING (Codex CLI): [available / not found]
WEB SEARCH (Perplexity): [key set / key missing]
### Delegation stats
Total: N successful delegations
Failed: N (X% failure rate)
Last: YYYY-MM-DD HH:MM via <skill>
Switch with: /mode multi or /mode single
Full log: /mode statsTo populate the display:
- Read
.claude/llm-mode.jsonfor mode and stats. - Check
agy --versionfor Antigravity CLI. Fall back togemini --versionfor enterprise plans still on the legacy binary. - Check
codex --versionfor Codex CLI. - Check
$PERPLEXITY_API_KEY(or your provider's env var) for web search. - Count entries in
.claude/delegation.logfor the totals.
If .claude/llm-mode.json doesn't exist, show Mode: SINGLE (default — no config file yet).
Switch to multi
Verify the Google delegate CLI is installed and authenticated. Prefer Antigravity CLI (
agy); fall back to the legacygeminibinary for enterprise plans.# Antigravity CLI (consumer + new enterprise). # The `</dev/null` redirect is mandatory: `agy -p "..."` deadlocks waiting for # TTY input even when a prompt arg is supplied. agy --version 2>/dev/null \ || gemini --version 2>/dev/null agy -p "Reply with exactly: OK" </dev/null 2>/dev/null \ || gemini -p "Reply with exactly: OK" -o text 2>/dev/nullIf the auth check fails, abort with installation/auth instructions. For
agy, the install command iscurl -fsSL https://antigravity.google/cli/install.sh | bash.- Update
.claude/llm-mode.json: setmodeto"multi", updateupdated_atto the current ISO timestamp. Append to
.claude/delegation.log:YYYY-MM-DDTHH:MM:SSZ | mode | ok | 0s | Switched to multi-LLM mode- Check Codex CLI and Perplexity availability non-blockingly. Report each as "available" or "not found / key missing" in the confirmation.
Switch to single
- Update
.claude/llm-mode.json: setmodeto"single", refreshupdated_at. - Log:
... | mode | ok | 0s | Switched to single-LLM mode. - Confirm: "Switched to single-LLM mode. All skills using Claude natively."
Show delegation log
Read .claude/delegation.log and show the last 20 entries plus summary stats: total,
failure rate, average duration on success, most-delegated skill.
Reset
- Write a fresh
.claude/llm-mode.jsonwith defaults (single mode, zeroed stats). - Clear
.claude/delegation.log(keep any header comments). - Confirm.
Delegation logging protocol
Other skills that delegate should follow this protocol:
After a successful delegation:
echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) | <skill> | ok | <duration>s | <notes>" \
>> .claude/delegation.logAlso increment stats.delegations_total and update stats.last_delegation in
.claude/llm-mode.json.
On failure:
echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) | <skill> | fail | <duration>s | <reason>" \
>> .claude/delegation.logIncrement stats.delegations_failed.
Schema for .claude/llm-mode.json
{
"mode": "single",
"updated_at": "2026-06-04T00:00:00Z",
"stats": {
"delegations_total": 0,
"delegations_failed": 0,
"last_delegation": null
}
}Known gotchas
- Multi mode without authenticated CLIs silently falls back to Claude. That can mask a real problem — the user thinks they're saving tokens but every delegation is failing. The status display surfaces both auth state and recent failure rate for this reason.
- The log file grows unboundedly. Rotate or truncate it before it crosses ~10k lines or the stats view gets slow.
- Mode is per-project. Each project has its own
.claude/llm-mode.json. Setting it in one project does not affect siblings. agy -p "<prompt>"requires</dev/null. Without the stdin redirect, Antigravity CLI waits on a TTY even when a prompt arg is given. The probe in "Switch to multi" uses the canonicalagy -p "..." </dev/nullform; mirror it in every other call site.
Anti-patterns
- Flipping to multi mode for a quick win, then forgetting to switch back when the
delegated CLIs go stale. Add the status check to a
/brief-style routine. - Trusting
delegations_totalas a token-savings proxy. The skills that delegate know their own savings; the mode skill just tracks counts.
Validated patterns
- Logging both success and failure (rather than just success) keeps the failure-rate metric honest. A 30% failure rate is a signal that the auth or model config needs attention.
Self-improvement
This skill ships with a lightweight feedback loop. Adopt or ignore — the skill works without it.
Trigger a review when:
- The status display is wrong about CLI availability (the detection command needs updating).
- A new external CLI joins the routing pattern.
learnings.mdcrosses ~100 bullets (consolidation time).- The skill mis-triggers or fails to trigger.
Consolidation pass (5–10 min, weekly or threshold-driven):
- Each entry gets one fate: apply, capture, or dismiss.
- Apply = merge into Known gotchas / Anti-patterns / Validated patterns.
- Capture = leave in
learnings.mdfor now. - Dismiss = delete.
- Bump
last-consolidated:in frontmatter.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

