Borrowing it
Nothing to install: this file belongs to pyramidheadshark/claude-scaffold. 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/pyramidheadshark/claude-scaffold/main/.claude/commands/mode-switch.mdgit clone --depth 1 https://github.com/pyramidheadshark/claude-scaffoldWrote 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/pyramidheadshark/claude-scaffold/mode-switch)<a href="https://agentmods.dev/commands/pyramidheadshark/claude-scaffold/mode-switch"><img src="https://agentmods.dev/badge/commands/pyramidheadshark/claude-scaffold/mode-switch.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.00727 |
| Opus 5 | $0.00000 | $0.00364 |
| Sonnet 5 | $0.00000 | $0.00145 |
| Haiku 4.5 | $0.00000 | $0.00073 |
Grade A, and why
mode-switch 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.
How it starts
The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/mode-switch
Switch claude-scaffold model routing mode across all registered repos.
Use this slash command as an explicit alternative to natural-language detection.
If the user says things like "переходим в экономный режим" or "switch to economy mode"
the mode-detector.js hook will catch it automatically; this slash command is the
fallback when the detector misses or the user prefers explicit invocation.
Available modes
| Mode | power repos | standard repos | balanced repos | When to use |
|---|---|---|---|---|
default |
Sonnet 4.6 | Haiku 4.5 | Haiku 4.5 | Regular development |
economy |
Haiku 4.5 | Haiku 4.5 | Haiku 4.5 | Sonnet quota draining, simple tasks |
no-sonnet |
Opus 4.7 | Haiku 4.5 | Opus 4.7 | Sonnet unavailable, critical decisions need Opus |
Instructions for Claude Code
When the user invokes /mode-switch, they may provide the target mode as an argument
(e.g. /mode-switch economy). If no argument is given, ask which mode they want.
Steps
- Determine target mode: read it from the
/mode-switch <mode>argument, or ask the user if missing. Valid values:default,economy,no-sonnet. - Ask for confirmation: show a brief preview — "This will rewrite
.claude/settings.jsonacross all 30 registered repos. Proceed?" - On confirmation, run via Bash:
claude-scaffold mode <mode> - After switching, warn the user explicitly:
- "The active Claude Code session still uses the old model. Close and reopen the session to apply the new mode."
- "Per-repo overrides can be set with
claude-scaffold mode set-profile <power|standard|balanced> <repo-path>before re-running this command."
- Check quota after switching: suggest
claude-scaffold quota statusto verify usage and budget alignment for the new mode.
Transient (single-task) model change
If the user wants a one-off model change only for the current task (not
persistent), do not run claude-scaffold mode. Instead use Claude Code's
session-local /model slash command:
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 · 59 lines · 0 tokens per session scan A 0a759435cbf2
mode-switch is a command published in the GitHub repository pyramidheadshark/claude-scaffold (4 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 727 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-31.
Other commands, from other repositories
plan-start
5-phase planning command: PRD analysis, design review, technical decisions, dynamic research team, metrics. Produces a complete implementation plan + ADRs before any code is written.
refactor
Analyze code for SOLID violations and suggest targeted improvements.
security
Rapid security assessment focused on OWASP Top 10 vulnerabilities.
generate-tests
Generate comprehensive tests for specified code.
update
Use when: search results seem noisy, after bulk imports, or for periodic memory/registry maintenance.
safe-build
Build the application for development or production.