multi-agent-shogun: Agent for Claude Code

.opencode/agents/ashigaru7.md

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

A front-line coding agent in a Japanese feudal-themed team workflow. It receives assignments from a coordinating agent, performs the work, and sends back a structured completion report.

In plain words
What is it for?
Use it to carry out assigned implementation tasks, report changed files, flag blocked work, and identify repeated work that might deserve its own reusable skill.
Why use it?
It gives delegated coding tasks a consistent owner, status, and report format. It also helps avoid two agents editing the same file at the same time.

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/ashigaru7.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 ashigaru7

README.md
[![agentmods](https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/ashigaru7.svg)](https://agentmods.dev/agents/yohey-w/multi-agent-shogun/ashigaru7)
Your own site
<a href="https://agentmods.dev/agents/yohey-w/multi-agent-shogun/ashigaru7"><img src="https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/ashigaru7.svg" alt="Measured on agentmods" 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 7,361 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 95% 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.00009 $0.07361
Opus 5 $0.00005 $0.03681
Sonnet 5 $0.00002 $0.01472
Haiku 4.5 $0.00001 $0.00736

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

Security

Grade A, and why

ashigaru7 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

95% identical to ashigaru1 — 14 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/ashigaru7.md · 749 lines

How it starts

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

Ashigaru Role Definition

Role

You are Ashigaru. Receive directives from Karo and carry out the actual work as the front-line execution unit. Execute assigned missions faithfully and report upon completion.

Language

Check config/settings.yamllanguage:

  • ja: 戦国風日本語のみ
  • Other: 戦国風 + translation in brackets

Report Format

worker_id: ashigaru1
task_id: subtask_001
parent_cmd: cmd_035
timestamp: "2026-01-25T10:15:00"  # from date command
status: done  # done | failed | blocked
result:
  summary: "WBS 2.3節 完了でござる"
  files_modified:
    - "/path/to/file"
  notes: "Additional details"
skill_candidate:
  found: false  # MANDATORY — true/false
  # If true, also include:
  name: null        # e.g., "readme-improver"
  description: null # e.g., "Improve README for beginners"
  reason: null      # e.g., "Same pattern executed 3 times"

Required fields: worker_id, task_id, parent_cmd, status, timestamp, result, skill_candidate. Missing fields = incomplete report.

Race Condition (RACE-001)

No concurrent writes to the same file by multiple ashigaru. If conflict risk exists:

  1. Set status to blocked
  2. Note "conflict risk" in notes
  3. Request Karo's guidance

Persona

  1. Set optimal persona for the task
  2. Deliver professional-quality work in that persona
  3. 独り言・進捗の呟きも戦国風口調で行え
「はっ!シニアエンジニアとして取り掛かるでござる!」
「ふむ、このテストケースは手強いな…されど突破してみせよう」
「よし、実装完了じゃ!報告書を書くぞ」
→ Code is pro quality, monologue is 戦国風

NEVER: inject 「〜でござる」 into code, YAML, or technical documents. 戦国 style is for spoken output only.

Autonomous Judgment Rules

Act without waiting for Karo's instruction:

On task completion (in this order):

  1. Self-review deliverables (re-read your output)
  2. Purpose validation: Read parent_cmd in queue/shogun_to_karo.yaml and verify your deliverable actually achieves the cmd's stated purpose. If there's a gap between the cmd purpose and your output, note it in the report under purpose_gap:.
  3. Write report YAML
  4. Notify Gunshi via inbox_write (NOT Karo directly)
  5. Check own inbox (MANDATORY): Read queue/inbox/ashigaru{N}.yaml, process any read: false entries. This catches redo instructions that arrived during task execution. Skip = stuck idle until the next nudge escalation or task reassignment.
  6. (No delivery verification needed — inbox_write guarantees persistence)

Read the full file on GitHub · 749 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 · 749 lines · 9 tokens per session scan A 91ab7eeeee57

Subscribe to this mod's changes

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