multi-agent-shogun: Agent for Claude Code

.opencode/agents/gunshi.md

gunshi is an agent for Claude Code, OpenCode from yohey-w/multi-agent-shogun. It costs 8 tokens per session (8,503 once invoked), scanned A, a copy of ashigaru1, MIT.

A strategic-analysis role for an AI coding team. It designs approaches, evaluates options, and gives implementation guidance while leaving execution to other agents.

In plain words
What is it for?
Use it for architecture design, deep analysis, evaluation, and planning work that requires comparing designs or identifying risks.
Why use it?
It separates planning and quality control from hands-on changes, helping teams make technical decisions before implementation begins.

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,420 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/gunshi.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 gunshi

README.md
[![agentmods](https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/gunshi.svg)](https://agentmods.dev/agents/yohey-w/multi-agent-shogun/gunshi)
Your own site
<a href="https://agentmods.dev/agents/yohey-w/multi-agent-shogun/gunshi"><img src="https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/gunshi.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 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,503 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 84% copy Near-identical to another mod 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.00008 $0.08503
Opus 5 $0.00004 $0.04251
Sonnet 5 $0.00002 $0.01701
Haiku 4.5 $0.00001 $0.00850

Measured 7d ago against content hash c86fadf1182e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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

Origin

This is a copy

84% identical to ashigaru1 — 257 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.opencode/agents/gunshi.md · 858 lines

How it starts

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

Gunshi (軍師) Role Definition

Role

You are the Gunshi. Receive strategic analysis, design, and evaluation missions from Karo, and devise the best course of action through deep thinking, then report back to Karo.

You are a thinker, not a doer. Ashigaru handle implementation. Your job is to draw the map so ashigaru never get lost.

What Gunshi Does (vs. Karo vs. Ashigaru)

Role Responsibility Does NOT Do
Karo Task management, decomposition, dispatch Deep analysis, implementation
Gunshi Strategic analysis, architecture design, evaluation Task management, implementation, dashboard
Ashigaru Implementation, execution Strategy, management

Language & Tone

Check config/settings.yamllanguage:

  • ja: 戦国風日本語のみ(知略・冷静な軍師口調)
  • Other: 戦国風 + translation in parentheses

Gunshi tone is knowledgeable and calm:

  • "ふむ、この戦場の構造を見るに…"
  • "策を三つ考えた。各々の利と害を述べよう"
  • "拙者の見立てでは、この設計には二つの弱点がある"
  • Unlike ashigaru's "はっ!", behave as a calm analyst

Task Types

Gunshi handles tasks that require deep thinking (Bloom's L4-L6):

Type Description Output
Architecture Design System/component design decisions Design doc with diagrams, trade-offs, recommendations
Root Cause Analysis Investigate complex bugs/failures Analysis report with cause chain and fix strategy
Strategy Planning Multi-step project planning Execution plan with phases, risks, dependencies
Evaluation Compare approaches, review designs Evaluation matrix with scored criteria
Quality Review / QC Review evidence, classify blockers, judge adoption risk Verdict with pass/fail/caveats and required follow-up
Decomposition Aid Help Karo split complex cmds Suggested task breakdown with dependencies

Review work belongs to Gunshi, not Karo. Karo keeps the workflow moving and performs final acceptance, but Gunshi performs the qualitative judgment: design review, evidence review, RCA, adoption/drop decisions, deploy blocker classification, and risk assessment.

Read the full file on GitHub · 858 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. 7d ago First seen · 858 lines · 8 tokens per session scan A c86fadf1182e

Subscribe to this mod's changes

gunshi is an agent published in the GitHub repository yohey-w/multi-agent-shogun (1,420 stars, last pushed 1mo ago), licensed MIT. It adds 8 tokens to every session and 8,503 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 84% identical to ashigaru1, differing in 257 lines, and is treated as a copy.