agentleFS
yohey-wyohey-w/multi-agent-shogun/skills/shogun-model-switch/SKILL.md

shogun-model-switch

Skill1.4k starsChanged 6 months agoMITView on GitHub

エージェントのCLI/モデルをライブ切替するスキル。settings.yaml更新→/exit→新CLI起動→ pane metadata更新を一発で実行。Thinking有無も制御。 「モデル切替」「Sonnetにして」「Opusに変えて」「足軽全員切替」「Thinking切って」で起動。

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 4 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 1 mentionJun 2026: 9 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the yohey-w/multi-agent-shogun repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about yohey-w/multi-agent-shogun

The biggest 5 of 16 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 16

Talked about on GitHub, Bluesky and Hacker News (16 times).

On GitHub · 13

8 more on GitHub

On Hacker News · 1

The file

Files
SKILL.md

/model-switch - Agent CLI Live Switcher

Overview

稼働中のエージェントのCLI種別・モデル・Thinking設定をライブで切り替える。 settings.yaml → build_cli_command() → /exit → 新CLI起動 → pane metadata更新 を一貫実行。

When to Use

  • 「ashigaru3をOpusにして」「足軽全員Sonnetに切替」
  • 「モデル切替」「モデル変えて」「CLI変えて」
  • 「Thinking切って」「Thinking有効にして」
  • 「CodexからClaudeに戻して」「Sparkにして」
  • タスクの性質に応じてモデルを切り替えたいとき

Architecture

settings.yaml (source of truth)
    │
    ├─ cli.agents.{id}.type      → claude | codex | copilot | kimi
    ├─ cli.agents.{id}.model     → claude-sonnet-4-6 | claude-opus-4-6 | ...
    └─ cli.agents.{id}.thinking  → true | false
         │
         ├── build_cli_command()
         │   └─ thinking: false → "MAX_THINKING_TOKENS=0 claude --model ..."
         │   └─ thinking: true  → "claude --model ..."
         │
         └── get_model_display_name()
             └─ thinking: true  → "Sonnet+T" / "Opus+T"
             └─ thinking: false → "Sonnet" / "Opus"

Display Name Mapping

model (settings.yaml)表示名+Thinking
claude-sonnet-4-6SonnetSonnet+T
claude-opus-4-6OpusOpus+T
claude-haiku-4-5-20251001HaikuHaiku+T
gpt-5.3-codexCodex—
gpt-5.3-codex-sparkSpark—

Instructions

単体切替

# settings.yaml の現在値で再起動(CLIリセットしたいだけのとき)
bash scripts/switch_cli.sh ashigaru3

# モデル変更(settings.yaml も自動更新)
bash scripts/switch_cli.sh ashigaru3 --model claude-opus-4-6

# CLI種別ごと変更(Codex → Claude)
bash scripts/switch_cli.sh ashigaru3 --type claude --model claude-sonnet-4-6

# Claude → Codex Spark
bash scripts/switch_cli.sh ashigaru5 --type codex --model gpt-5.3-codex-spark

一括切替

# 全足軽をSonnetに
for i in $(seq 1 7); do
    bash scripts/switch_cli.sh ashigaru$i --type claude --model claude-sonnet-4-6
done

# 全足軽をSparkに
for i in $(seq 1 7); do
    bash scripts/switch_cli.sh ashigaru$i --type codex --model gpt-5.3-codex-spark
done

# 全エージェント(家老・軍師含む)を再起動
for agent in karo ashigaru1 ashigaru2 ashigaru3 ashigaru4 ashigaru5 ashigaru6 ashigaru7 gunshi; do
    bash scripts/switch_cli.sh "$agent"
done

Thinking 制御

settings.yaml の thinking フィールドを編集してから switch_cli.sh を実行:

# config/settings.yaml
cli:
  agents:
    ashigaru3:
      type: claude
      model: claude-opus-4-6
      thinking: false  # ← MAX_THINKING_TOKENS=0 で起動
# settings.yaml 編集後に再起動
bash scripts/switch_cli.sh ashigaru3

Thinking ON/OFF の切替手順:

  1. config/settings.yaml の対象エージェントの thinking: を true / false に変更
  2. bash scripts/switch_cli.sh <agent_id> で再起動
  3. pane border に +T の有無が反映される

inbox 経由(家老からの切替)

# 家老が足軽のCLIを切り替える場合
bash scripts/inbox_write.sh ashigaru3 "--type claude --model claude-opus-4-6" cli_restart karo

inbox_watcher が cli_restart type を検知し、switch_cli.sh を自動実行する。

What switch_cli.sh Does (internal)

  1. settings.yaml 更新(--type/--model 指定時のみ)
  2. 現在のCLI種別を検出(tmux pane metadata @agent_cli)
  3. CLI別の exit コマンドを送信
    • Claude: /exit + Enter
    • Codex: Escape → Ctrl-C → /exit + Enter
    • Copilot/Kimi: Ctrl-C → /exit + Enter
  4. シェルプロンプト復帰を待機(最大15秒、1秒ごとにキャプチャ)
  5. build_cli_command() で新コマンド構築
    • thinking: false → MAX_THINKING_TOKENS=0 prefix 付与
  6. tmux send-keys で新CLI起動(テキストとEnterを分離送信)
  7. pane metadata 更新: @agent_cli, @model_name

Files

ファイル役割
scripts/switch_cli.shメインスクリプト
lib/cli_adapter.shbuild_cli_command(), get_model_display_name()
config/settings.yamlエージェント設定(type, model, thinking)
scripts/inbox_watcher.shcli_restart type ハンドリング
logs/switch_cli.log実行ログ

Constraints

  • 将軍(shogun)ペインには送信しない: switch_cli.sh は multiagent セッションのペインのみ対象
  • 実行中のエージェントに注意: タスク実行中に切り替えるとデータ消失の可能性あり。idle確認してから実行
  • Codex → Claude 切替時: Codex の /exit が不安定な場合がある。Escape + Ctrl-C で確実に終了させる
  • inbox_watcher との連携: cli_restart 後、inbox_watcher の CLI_TYPE 変数も自動更新される

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.