A Claude Code plugin that adds an Agent Team skill for orchestrating parallel work via AI teammates. The plugin provides a team lead orchestrator, hook enforcement, and persistent workspace tracking.
.claude-plugin/ Plugin manifest + marketplace registry
hooks/hooks.json Plugin-level hooks (use ${CLAUDE_PLUGIN_ROOT} for paths)
scripts/ Hook scripts (bash, require jq)
skills/start/ Pipeline entry point — type detection + routing
skills/plan/ Plan stage — decomposition, DAG, approval
references/ Prior context loading, plan-mode protocol
examples/ Plan proposal examples
agents/ Plan-reviewer agent
skills/execute/ Execute stage — spawn, coordination, error recovery
references/ Communication protocol, coordination patterns, error recovery
agents/ Spawn templates, execute-reviewer agent
skills/audit/ Audit stage — gates, elegance review, report, lessons
references/ Completion gates, elegance rubric, report format
examples/ Lessons-learned examples
agents/ Audit-reviewer, elegance-reviewer agents
docs/ Shared reference docs (roles, archetypes, workspace templates, custom roles)
- Hooks are plugin-level (
hooks/hooks.json), not in SKILL.md frontmatter — this is how Claude Code plugins register hooks ${CLAUDE_PLUGIN_ROOT}is the only valid path variable in hooks.json — it resolves to the plugin install directory at runtime- Each stage skill is self-contained — stage-specific references, examples, and agents live in subfolders (
references/,examples/,agents/) alongside SKILL.md - Shared docs (
docs/) contain only cross-cutting references: teammate roles, workspace templates, team archetypes, custom roles - Team per stage — each pipeline stage (plan, execute, audit) creates and manages its own ephemeral team. Teams communicate with the lead via SendMessage. Workspace files are the only handoff between stages.
- No
disable-model-invocation— the skill auto-invokes on matching trigger phrases
| Area | Purpose | Edit Guidelines |
|---|---|---|
.claude-plugin/plugin.json |
Plugin identity | Bump version here on release |
.claude-plugin/marketplace.json |
Marketplace registry | Bump version here too, keep in sync with plugin.json |
hooks/hooks.json |
Hook registration (13 hook entries) | Update timeout values, add new hooks, or update hook command paths |
scripts/*.sh |
Hook enforcement logic (16 scripts) | Written in bash (#!/bin/bash), degrade gracefully without jq |
skills/start/SKILL.md |
Pipeline entry point | Type detection, prior context, routing to plan/execute/audit |
skills/plan/SKILL.md |
Plan stage | Decomposition, DAG creation, plan-review, user approval |
skills/plan/references/ |
Plan stage references | Prior context loading, plan-mode protocol |
skills/plan/examples/ |
Plan stage examples | Plan proposal example |
skills/plan/agents/ |
Plan stage agents | Plan-reviewer, researcher, analyst agent definitions |
skills/execute/SKILL.md |
Execute stage | Spawn, coordination, error recovery loop |
skills/execute/references/ |
Execute stage references | Communication protocol, coordination patterns, error recovery |
skills/execute/agents/ |
Execute stage agents | Spawn templates, execute-reviewer agent |
skills/audit/SKILL.md |
Audit stage | Completion gates, elegance review, report, lessons |
skills/audit/references/ |
Audit stage references | Completion gates, elegance rubric, report format |
skills/audit/examples/ |
Audit stage examples | Lessons-learned example |
skills/audit/agents/ |
Audit stage agents | Audit-reviewer, elegance-reviewer, reviewer agents |
docs/teammate-roles.md |
Role definitions + selection guide | Update when adding new roles |
docs/workspace-templates.md |
Workspace file templates + task-graph.json schema |
Update when adding new workspace files or changing DAG schema |
docs/team-archetypes.md |
Team type definitions + phase profiles | Update when adding new archetypes or modifying plan-mode defaults |
docs/custom-roles.md |
Project-specific role template | Reference for users creating custom roles |
CHANGELOG.md |
Version history | Add entry for each release |
README.md |
User-facing documentation | Keep in sync with feature changes |
tests/ |
Hook and structure tests | hooks/ for hook tests, structure/ for plugin validation |
.agent-team/0309-protocol-research/ |
Research findings | Reference only — do not modify. Contains 4 reports on protocol, patterns, resilience, and scaling |
- Follow semver:
MAJOR.MINOR.PATCH - Version must be updated in both:
plugin.jsonandmarketplace.json - Use
claude plugin validate .before releasing
Follow Conventional Commits:
feat: new feature or capability
fix: bug fix
docs: documentation changes (README, CLAUDE.md, docs/)
refactor: code restructuring without behavior change
chore: maintenance (CI, dependencies)
- Must be executable (
chmod +x) - Must handle missing
jqgracefully (exit 0 if not found) - Must handle missing
gitgracefully (skip git-dependent checks) - Exit codes:
0= allow,2= block with feedback to stderr
- The frontmatter (
---block) defines skill metadata — do not addhooks:ordisable-model-invocationback - Each stage skill has its own phase structure — preserve the stage-specific flow
- Stage-specific content lives in subfolders (
references/,examples/,agents/) — keep SKILL.md focused on orchestration logic, detailed reference material in subfolders - Doc references use
../../docs/relative paths fromskills/{stage}/for shared docs,./references/or./agents/for stage-local files
bash tests/run-tests.shRuns 16 test files covering all hooks and plugin structure.
claude plugin validate .claude --plugin-dir /path/to/agent-team-pluginThen trigger with: "use agent team to [task]"
Thirteen hook entries registered in hooks/hooks.json:
- TaskCompleted — try marking a task complete without file changes (should block)
- TeammateIdle — let a teammate go idle with in-progress tasks (should nudge)
- SessionStart(compact) — compact context in a team session (should recover workspace)
- PreToolUse(Write|Edit) — have a teammate edit another's file (should warn, then block)
- ValidateWorkspace — spawn a teammate with incomplete workspace (should block)
- ValidateTaskGraph — spawn a teammate with malformed task-graph.json (should block)
- SubagentStart — spawn a teammate (should log to events.log)
- SubagentStop — teammate shuts down (should log to events.log)
- ComputeCriticalPath — complete a task and check stderr for critical path update
- DetectResume — start a new session with an incomplete workspace and check stdout for resume context
- CheckIntegrationPoint — complete both upstream tasks of a convergence point and check stderr for integration nudge
- PlanRevisionLimit — send 3rd PLAN_REVISION to a teammate (should block)
- PreShutdownCommit — call TeamDelete with uncommitted owned files (should block)
- Add the script to
scripts/ - Make it executable
- Register it in
hooks/hooks.jsonusing${CLAUDE_PLUGIN_ROOT}/scripts/your-script.sh - Document in the relevant stage skill's SKILL.md and README
- Test: run
claude plugin validate .then test manually in a team session
- Add the role definition to
docs/teammate-roles.md - Add the spawn template to
skills/execute/agents/spawn-templates.md - Update the Role Selection Guide table in
docs/teammate-roles.md - Update README Teammate Roles table
- Create a new
skills/{stage}/SKILL.mdwith frontmatter (name, description, argument-hint, allowed-tools) - Create subfolders as needed:
references/,examples/,agents/ - Add stage-specific orchestration logic, referencing
../../docs/for shared docs - Update
skills/start/SKILL.mdrouting table to include the new stage - Add trigger patterns to
docs/team-archetypes.mdif applicable - Update
tests/structure/test-doc-references.sh— add assertions for new skill and subfolders - Update
README.mdPipeline Commands table and Plugin Structure tree - Add rows to
CLAUDE.mdFile Ownership table - Test: run
bash tests/run-tests.sh, then trigger the skill with a matching phrase
- Run
bash tests/run-tests.sh— all tests must pass - Update version in
.claude-plugin/plugin.json - Update version in
.claude-plugin/marketplace.json - Add entry to
CHANGELOG.md - Run
claude plugin validate . - Commit with
chore: bump version to X.Y.Z - Tag with
git tag vX.Y.Z