英国海軍式の指揮構造でClaude Codeのエージェントチームを統率するスキル。
Captain Horatio Nelson — John Francis Rigaud, 1781. Image: Wikimedia Commons
A Claude Code skill for coordinating agent work based on the Royal Navy. It provides structured sailing orders, battle plans, action stations, and a captain's log to manage complex tasks — from single-session work through to parallel subagent squadrons.
https://github.com/user-attachments/assets/2468679d-39f5-4efb-9d93-43d43eee8907
Nelson gives Claude a six-step operational framework for tackling complex missions:
agent-team execution mode. Enable it in your settings.json:{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
/plugin install harrymunro/nelson
Or add the marketplace first, then install by name:
/plugin marketplace add harrymunro/nelson
/plugin install nelson@nelson-marketplace
Open Claude Code and say:
Install skills from https://github.com/harrymunro/nelson
Claude will clone the repo, copy the skill into your project's .claude/skills/ directory, and clean up. To install it globally across all projects, ask Claude to install it to ~/.claude/skills/ instead.
Clone the repo and copy the skill directory yourself:
# Project-level (recommended for teams)
git clone https://github.com/harrymunro/nelson.git /tmp/nelson
mkdir -p .claude/skills
cp -r /tmp/nelson/skills/nelson .claude/skills/nelson
rm -rf /tmp/nelson
# Or user-level (personal, all projects)
cp -r /tmp/nelson/skills/nelson ~/.claude/skills/nelson
Then commit .claude/skills/nelson/ to version control so your team can use it.
Open Claude Code and ask:
What skills are available?
You should see nelson listed. You can also invoke it directly:
/nelson
Claude reads the skill description and loads it when your request matches — for example, when you ask for coordinated parallel work or structured mission execution. Just describe your task:
I need to refactor the authentication system. The work spans the API layer,
the frontend, and the test suite. Use nelson to coordinate this.
Use the slash command with your mission brief:
/nelson Migrate the payment processing module from Stripe v2 to v3
For maximum control, provide your own sailing orders:
/nelson
Sailing orders:
- Outcome: All API endpoints return consistent error responses
- Success metric: Zero test failures, all error responses match the schema
- Deadline: This session
Constraints:
- Token/time budget: Stay under 50k tokens
- Forbidden actions: Do not modify the database schema
Scope:
- In scope: src/api/ and tests/api/
- Out of scope: Frontend error handling
HMS Victory anchored off the Isle of Wight — John Wilson Carmichael (1799–1868), National Museum of the Royal Navy, Portsmouth
The skill selects one of three execution modes based on your mission:
| Mode | When to use | How it works |
|---|---|---|
single-session | Sequential tasks, low complexity, heavy same-file editing | Claude works through tasks in order within one session |
subagents | Parallel tasks where workers only report back to the coordinator | Claude spawns subagents that work independently and return results |
agent-team | Parallel tasks where workers need to coordinate with each other | Claude creates an agent team with direct teammate-to-teammate communication |
Nelson uses a three-tier hierarchy. The admiral coordinates captains, each captain commands a named ship, and crew members aboard each ship do the specialist work.
┌───────────┐
│ Admiral │
└─────┬─────┘
┌─────────────┼─────────────┐
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Captain │ │ Captain │ │ Red-Cell │
│ HMS Daring │ │ HMS Kent │ │ Navigator │
└─────┬─────┘ └─────┬─────┘ └───────────┘
┌────┼────┐ ┌────┼────┐
▼ ▼ ▼ ▼ ▼ ▼
XO PWO MEO PWO NO COX
Squadron level:
Ship level (crew per captain, 0-4 members):
| Role | Abbr | Function | When to crew |
|---|---|---|---|
| Executive Officer | XO | Integration & orchestration | 3+ crew or interdependent sub-tasks |
| Principal Warfare Officer | PWO | Core implementation | Almost always (default doer) |
| Navigating Officer | NO | Codebase research & exploration | Unfamiliar code, large codebase |
| Marine Engineering Officer | MEO | Testing & validation | Station 1+ or non-trivial verification |
| Weapon Engineering Officer | WEO | Config, infrastructure & systems integration | Significant config/infra work |
| Logistics Officer | LOGO | Documentation & dependency management | Docs as deliverable, dep management |
| Coxswain | COX | Standards review & quality | Station 1+ with established conventions |
NO and COX are read-only — they report findings but never modify files.
Ships are named from real Royal Navy warships, matched roughly to task weight: frigates for general-purpose, destroyers for high-tempo, patrol vessels for small tasks, historic flagships for critical-path, and submarines for research.
Squadron size caps at 10 squadron-level agents (admiral, captains, red-cell navigator). Crew are additional — up to 4 per ship. If a task needs more crew, split it into two ships.
Here's an example of the crew in action: we create four captains. Two of the captains are single-crew (minimum, since captains don't do the work themselves) and two of them are two-crew. So we have 11 agents working together in total:
https://github.com/user-attachments/assets/f3bafd06-790e-44a0-9061-7d1fd666b445
Every task is classified into a risk tier before execution. Higher tiers require more controls:
| Station | Name | When | Required controls |
|---|---|---|---|
| 0 | Patrol | Low blast radius, easy rollback | Basic validation, rollback step |
| 1 | Caution | User-visible changes, moderate impact | Independent review, negative test, rollback note |
| 2 | Action | Security/compliance/data integrity implications | Red-cell review, failure-mode checklist, go/no-go checkpoint |
| 3 | Trafalgar | Irreversible actions, regulated/safety-sensitive | Minimal scope, human confirmation, two-step verification, contingency plan |
Tasks at Station 1 and above also run a failure-mode checklist:
Nelson includes procedures for when things go wrong — stuck agents, budget overruns, faulty outputs, and context window exhaustion.
Hull integrity monitoring tracks context window consumption across the squadron. The admiral reads exact token counts from Claude Code session JSONL files at each quarterdeck checkpoint and maintains a squadron readiness board:
| Status | Remaining | Action |
|---|---|---|
| Green | 75–100% | Operating normally |
| Amber | 60–74% | Monitor closely, avoid new work |
| Red | 40–59% | Relief on station — begin handover |
| Critical | Below 40% | Immediate relief |
Relief on station replaces a ship whose context window is depleted. The damaged ship writes a turnover brief to file, a fresh replacement reads it and continues the mission. Chained reliefs (A → B → C) are supported for long-running tasks. The flagship monitors its own hull integrity too and can hand over to a new session.
The token counts come from the API usage data that Claude Code already records on every assistant turn — no estimation heuristics, no paid APIs, no external dependencies. A utility script (scripts/count-tokens.py) extracts the data and produces damage reports.
Other damage control procedures: man overboard (stuck agent replacement), session resumption (picking up after interruption), partial rollback (reverting faulty work), crew overrun (budget recovery), scuttle and reform (mission abort), and escalation (chain of command).
The skill includes structured templates for consistent output across missions:
.claude-plugin/
├── plugin.json # Plugin manifest
└── marketplace.json # Marketplace definition (self-hosted)
skills/nelson/
├── SKILL.md # Main skill instructions (entrypoint)
└── references/
├── action-stations.md # Risk tier definitions and controls
├── admiralty-templates/ # Individual template files
│ ├── battle-plan.md
│ ├── captains-log.md
│ ├── crew-briefing.md
│ ├── damage-report.md
│ ├── marine-deployment-brief.md
│ ├── quarterdeck-report.md
│ ├── red-cell-review.md
│ ├── sailing-orders.md
│ ├── ship-manifest.md
│ └── turnover-brief.md
├── commendations.md # Recognition signals and correction guidance
├── crew-roles.md # Crew role definitions, ship names, sizing
├── damage-control/ # Individual procedure files
│ ├── crew-overrun.md
│ ├── escalation.md
│ ├── hull-integrity.md
│ ├── man-overboard.md
│ ├── partial-rollback.md
│ ├── relief-on-station.md
│ ├── scuttle-and-reform.md
│ ├── session-hygiene.md
│ └── session-resumption.md
├── royal-marines.md # Royal Marines deployment rules
├── squadron-composition.md # Mode selection and team sizing rules
└── standing-orders/ # Individual anti-pattern files
├── admiral-at-the-helm.md
├── all-hands-on-deck.md
├── battalion-ashore.md
├── becalmed-fleet.md
├── captain-at-the-capstan.md
├── crew-without-canvas.md
├── drifting-anchorage.md
├── press-ganged-navigator.md
├── pressed-crew.md
├── skeleton-crew.md
├── split-keel.md
└── unclassified-engagement.md
agents/
└── nelson.md # Subagent definition
scripts/
└── count-tokens.py # Token counter for hull integrity monitoring
plugin.json declares the plugin name, version, and component paths for Claude Code's plugin system.marketplace.json lets users add this repo as a plugin marketplace and install Nelson by name.SKILL.md is the entrypoint that Claude reads when the skill is invoked. It defines the six-step workflow and references the supporting files.references/ contain detailed guidance that Claude loads on demand — they are not all loaded into context at once.Edit the individual template files in references/admiralty-templates/ to match your team's reporting style. The templates use plain text format — adjust fields, add sections, or remove what you don't need.
Edit references/action-stations.md to change what controls are required at each station level. For example, you might require red-cell review at Station 1 instead of Station 2 for a security-sensitive project.
Edit references/squadron-composition.md to adjust the decision matrix or default team sizes.
single-session or subagents mode. Full details: Agent teams documentation.This project is not associated with, endorsed by, or affiliated with the British Royal Navy or the UK Ministry of Defence. All Royal Navy terminology and references are used purely as a creative framework for organising software development tasks.
MIT — see LICENSE for details.
互換性
トピック