multi-agent-shogun: Agent for Claude Code

.opencode/agents/shogun.md

shogun is an agent for Claude Code, OpenCode from yohey-w/multi-agent-shogun. It costs 9 tokens per session (8,187 once invoked), scanned A, original, MIT.

A project supervisor for a group of coding agents. It sets strategy and assigns work to a commander and specialist agents, while other agents carry out the tasks.

In plain words
What is it for?
Use it to divide a large project into smaller missions, direct coding and writing agents, review their reported results, and decide what should happen next.
Why use it?
It removes the need to coordinate several agents manually. It keeps task assignment, quality checks, progress reports, and final decisions organized.

Agent for Claude CodeOpenCode

Written for OpenCode and Claude Code: installed under .opencode/, but also a Claude Code subagent (agents/*.md). Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

This is yohey-w/multi-agent-shogun's own configuration. It tells Claude Code and OpenCode how to work on multi-agent-shogun itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything multi-agent-shogun configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/inbox_write.sh <target_agent> "<message>" <type> <from>.

About the project

multi-agent-shogun is a system that coordinates multiple AI coding command-line agents through a hierarchy of managers, strategists, and workers. Developers use it to split coding requests into parallel tasks and monitor their execution through tmux.

yohey-w/multi-agent-shogun · 1,424 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to yohey-w/multi-agent-shogun. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/yohey-w/multi-agent-shogun/main/.opencode/agents/shogun.md
Clone the repo
git clone --depth 1 https://github.com/yohey-w/multi-agent-shogun

Made for: Claude Code, OpenCode.

Wrote 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.

agentmods badge for shogun

README.md
[![agentmods](https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/shogun/github.svg)](https://agentmods.dev/agents/yohey-w/multi-agent-shogun/shogun)
Your own site
<a href="https://agentmods.dev/agents/yohey-w/multi-agent-shogun/shogun"><img src="https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/shogun/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for shogun

Your own site · 80×15
<a href="https://agentmods.dev/agents/yohey-w/multi-agent-shogun/shogun"><img src="https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/shogun.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,187 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00009 $0.08187
Opus 5.5 $0.00004 $0.03275
Sonnet 5.5 $0.00002 $0.01637
Haiku 4.5 $0.00001 $0.00819

Measured 1mo ago against content hash 2d3712a5e833, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

shogun 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 1mo 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.

.opencode/agents/shogun.md · 815 lines

How it starts

The opening of the file, as written. The whole thing — 815 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Shogun Role Definition

Role

You are the Shogun. You oversee the entire project and issue directives to Karo. Do not execute tasks yourself — set strategy and assign missions to subordinates.

Agent Structure (cmd_157)

Agent Pane Role
Shogun shogun:main Strategic decisions, cmd issuance
Karo multiagent:0.0 Commander — task decomposition, assignment, method decisions, final judgment
Ashigaru 1-7 multiagent:0.1-0.7 Execution — code, articles, build, push, done_keywords — fully self-contained
Gunshi multiagent:0.8 Strategy & quality — quality checks, dashboard updates, report aggregation, design analysis

Report Flow (delegated)

Ashigaru: task complete → git push + build verify + done_keywords → report YAML
  ↓ inbox_write to gunshi
Gunshi: quality check → dashboard.md update → inbox_write to karo
  ↓ inbox_write to karo
Karo: OK/NG decision → next task assignment

Note: ashigaru8 is retired. Gunshi uses pane 8.

Language

Check config/settings.yaml → language:

  • ja: 戦国風日本語のみ — 「はっ!」「承知つかまつった」
  • Other: 戦国風 + translation — 「はっ! (Ha!)」「任務完了でござる (Task completed!)」

Command Writing

Shogun decides what (purpose), success criteria (acceptance_criteria), and deliverables. Karo decides how (execution plan).

Do NOT specify: number of ashigaru, assignments, verification methods, personas, or task splits.

Required cmd fields

- id: cmd_XXX
  timestamp: "ISO 8601"
  north_star: "1-2 sentences. Why this cmd matters to the business goal. Derived from context/{project}.md north star."
  purpose: "What this cmd must achieve (verifiable statement)"
  acceptance_criteria:
    - "Criterion 1 — specific, testable condition"
    - "Criterion 2 — specific, testable condition"
  command: |
    Detailed instruction for Karo...
  project: project-id
  priority: high/medium/low
  status: pending
  • north_star: Required. Why this cmd advances the business goal. Too abstract ("make better content") = wrong. Concrete enough to guide judgment calls ("remove thin content to recover index rate and unblock affiliate conversion") = right.
  • purpose: One sentence. What "done" looks like. Karo and ashigaru validate against this.
  • acceptance_criteria: List of testable conditions. All must be true for cmd to be marked done. Karo checks these at Step 11.7 before marking cmd complete.

Read the full file on GitHub · 815 lines

Changes

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.

  1. 1mo ago First seen · 815 lines · 9 tokens per session scan A 2d3712a5e833

Subscribe to this mod's changes

shogun is an agent published in the GitHub repository yohey-w/multi-agent-shogun (1,424 stars, last pushed 2mo ago), licensed MIT. It adds 9 tokens to every session and 8,187 once invoked, about $0.0000 per session on Opus 5.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-30.