agentleFS
AgentJDrewAgentJDrew/agent-team-factory/.claude/skills/build-team/SKILL.md

build-team

Skill0 starsChanged 4 months agoMITView on GitHub

Build a complete AI agent team for any domain. Full file generation with architecture design, agent definitions, skills, protocols, comms, and memory. Use when building a team, creating agents, setting up a floor, designing a department, or bootstrapping a new workload.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. 917Dhj/dkitchen★ 10same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read research/decision-engine.md for all quantitative thresholds.

    line 10
  2. Very specific:

    Every skill you generate must pass standards/skill-authoring.md (trigger-bearing description, 200-line cap, no hardcoded absolute paths, …

    line 12
  3. Distinctive:

    Ask these questions one at a time.

    line 16
  4. Distinctive:

    After picking a pattern, choose the output structure.

    line 58
  5. Distinctive:

    Proactive risk identification: Before proceeding, check:

    line 79
  6. Very specific:

    If MCP/external tools needed: read research/tool-integration-playbook.md, create .mcp.json.

    line 133
  7. Distinctive:

    Every agent definition under 100 lines

    line 136
  8. Very specific:

    Every skill under 200 lines (300 for pipelines).

    line 137
  9. Very specific:

    Every CLAUDE.md under 150 lines, declares floor size (S1/S2/S3) and carries a State as of: YYYY-MM-DD stamp in its first 10 lines (Floor …

    line 138
  10. Distinctive:

    Every agent declares exactly one authority tier: ADVISORY / COMMIT / BLOCK / VETO / HALT

    line 139
  11. Distinctive:

    File manifest: Every file created with path and purpose

    line 163

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build Team

Before Anything Else

  1. Read research/decision-engine.md for all quantitative thresholds. This is your cheat sheet for every design decision.
  2. Read standards/floor-spec.md — the canonical floor anatomy your output must conform to (floor-size declaration S1/S2/S3, State as of: stamp, authority ladder ADVISORY/COMMIT/BLOCK/VETO/HALT, comms wire+board, memory caps, activation skill, lifecycle protocol). Its §Conformance Checklist is the acceptance test for any team this factory builds.
  3. Every skill you generate must pass standards/skill-authoring.md (trigger-bearing description, 200-line cap, no hardcoded absolute paths, changelog convention).

Step 1: INTAKE (Understand Before Building)

Ask these questions one at a time. Push back on vague answers.

  1. Domain: What does this team do? Get specific. "Software development" is too broad. "Frontend feature development with CI/CD and staging deploys" is specific enough to design for.
  2. Scale: How many agents? Use the decision engine:
    • User says < 5 -> Functional team. Consider if one well-prompted agent suffices.
    • User says 5-15 -> Pipeline or small Desk model.
    • User says 15+ -> Desk model with divisions. Verify the work actually requires this scale.
    • Push back if they ask for 20+ agents without clear justification. Coordination overhead scales super-linearly. A 20-agent flat team has 190 communication channels. Ask: "Can this be done with 3 divisions of 5 instead of 1 team of 20?"
  3. Key workflows: What are the 2-3 main things this team does daily? These become skills. If more than 5, the team is too broad. Decompose into sub-teams.
  4. Tools: What external systems? (APIs, databases, MCP servers, file systems, browsers). If external tools are needed, read research/tool-integration-playbook.md for MCP patterns.
  5. Authority: Who has veto/halt power? What decisions need human approval? Default: compliance/risk gets VETO, data/infrastructure gets HALT, deployment is always human.
  6. Quality: What does "good output" look like? What are the failure modes? This is the most important question. The failure modes define the kill criteria and gate design.
  7. Memory: File-based (simple, git-tracked) or database-backed (queryable, cross-agent)? Default: file-based unless team needs cross-session queries or vector search.

Step 2: ARCHITECTURE (Design the Org)

Mandatory reads before designing:

  1. research/decision-engine.md -- all thresholds in one place
  2. research/agent-architecture-playbook.md -- patterns, evidence, anti-patterns
  3. research/team-design-blueprint.md -- org design, handoffs, red team, peer review

Choose pattern using the decision tree:

Can one agent do this? → YES → Don't build a team.
Is the work decomposable? → YES → How many agents needed?
  3-6:  Functional (Pattern C) -- no manager layer
  6-15: Pipeline (Pattern B) -- sequential stages with gates
  15+:  Desk (Pattern A) -- divisions with managers
Is the work sequential? → YES → Pipeline with single agents per stage.
  NEVER add multiple agents within a sequential stage.
  Multi-agent DEGRADES sequential tasks by 39-70% (Kim et al., 2025).

Structure decision (single-team vs. multi-division):

After picking a pattern, choose the output structure. This determines the file tree.

ConditionStructureExample
Team is one cohesive unit, 4-8 agents, no natural sub-groupsSingle-teamexamples/dev-team/, examples/sales-team/
Team has 2+ peer divisions (each with own playbook/memory)Multi-divisionexamples/legal-team/ (single-div but scales to many)
Team is a long pipeline with 6+ distinct stagesMulti-division (each stage = a division)Quant research pipeline, content production pipeline

Default: Single-team. Only use multi-division if sub-groups genuinely need separate playbooks and memory. Artificial divisions create coordination overhead without benefit.

Design decisions (verify each one):

DecisionRuleEvidence
Division size4-6 agents (hard max 10)Hackman, Mueller, Ringelmann
Manager per division?Yes if 4+ specialistsGallup: peak at 8-9 reports
Red team per division?Yes, always, read-onlyBias blind spot (Pronin, 2002)
Model tieringOpus orchestrator, sonnet specialists+31% over homogeneous (Kim, 2025)
Review gate3-5 independent reviewers, unanimousSingle reviewer catches 25% (Schroter, 2008)
Handoff protocolStructured templates, ACK/NACKI-PASS: 23% error reduction (Starmer, NEJM 2014)

Proactive risk identification: Before proceeding, check:

  • Are any two agents likely to write the same files? Split ownership or add coordination.
  • Is any agent both creating AND reviewing its own work? Separate creation from critique.
  • Are there more than 10 tools assigned to any single agent? Decompose.
  • Is the pipeline longer than 8 stages? Each stage adds coordination overhead. Justify.

Step 3: GENERATE (Write Every File)

File tree depends on structure chosen in Step 2.

Shared files (both structures)

Output FileTemplate
CLAUDE.mdtemplates/workspace-claude.md
.claude/skills/command/SKILL.mdtemplates/skill-command.md
.claude/skills/[workflow]/SKILL.mdtemplates/skill-task.md, skill-pipeline.md, or skill-parallel-spawn.md
.claude/agents/[role].mdtemplates/agent-definition.md
.claude/rules/desk-protocol.mdtemplates/desk-protocol.md (optional for small single-teams)
comms/wire.mdtemplates/comms-wire.md
comms/board.mdtemplates/comms-board.md
comms/channels/all-hands.mdtemplates/comms-channel.md
protocols/escalation-matrix.mdtemplates/protocol-escalation-matrix.md
protocols/session-close.mdtemplates/protocol-session-close.md

Multi-division only

Output FileTemplate
.claude/skills/activate-[div]/SKILL.mdtemplates/skill-activation.md
divisions/[div]/CLAUDE.mdtemplates/division-claude.md
divisions/[div]/memory/MEMORY.mdtemplates/memory-template.md
divisions/[div]/memory/learning-ledger.mdEmpty with header
divisions/[div]/memory/patterns.mdEmpty with header
comms/channels/[division].mdtemplates/comms-channel.md (one per division)
comms/handoffs/Directory, created empty
comms/kill-log.mdEmpty with header
comms/pattern-library.mdEmpty with header
comms/skill-changelog.mdEmpty with header
protocols/kill-switch.mdtemplates/protocol-kill-switch.md
protocols/decision-log.mdtemplates/protocol-decision-log.md
protocols/failure-registry.mdtemplates/protocol-failure-registry.md
divisions/[div]/inbox/Directory, created empty
divisions/[div]/outbox/Directory, created empty

Single-team only

Output FileTemplate
memory/MEMORY.mdtemplates/memory-template.md (at root, not under divisions/)
comms/channels/[team-domain].mdtemplates/comms-channel.md (single domain channel, e.g., dev.md, sales.md)

Single-teams can skip kill-log.md, pattern-library.md, skill-changelog.md, kill-switch.md, decision-log.md, and failure-registry.md on first build. Add them if and when the team hits scenarios that require them.

If MCP/external tools needed: read research/tool-integration-playbook.md, create .mcp.json.

Quality checks during generation:

  • Every agent definition under 100 lines
  • Every skill under 200 lines (300 for pipelines); passes standards/skill-authoring.md
  • Every CLAUDE.md under 150 lines, declares floor size (S1/S2/S3) and carries a State as of: YYYY-MM-DD stamp in its first 10 lines (Floor Spec)
  • Every agent declares exactly one authority tier: ADVISORY / COMMIT / BLOCK / VETO / HALT
  • Binary gates (PASS/BLOCK), never advisory
  • Mandatory pre-reads on every spawn
  • Backward propagation on every failure path
  • Red team agent has Write/Edit/Bash in disallowedTools and owns no files

Step 4: AUDIT (Run Before Delivery)

Run audit-team on the generated system. This catches wiring gaps, orphaned files, contradictions, and missing components. Target: Grade A or B. Also score the build against the Floor Spec §Conformance Checklist (standards/floor-spec.md) — every item PASS or N-A before delivery.

Additionally verify:

  • Every agent has non-overlapping file ownership
  • Every workflow has a skill with explicit steps and gates
  • Every division has a CLAUDE.md with spawn order and rationale
  • Handoff routes defined for every cross-division interaction
  • Escalation matrix covers who resolves conflicts at each level
  • At least one red team agent per division
  • No two agents own the same files

Step 5: DELIVER

Present to the user:

  1. Summary: Team name, agent count, division count, key workflows
  2. Org chart: Text-based hierarchy with authorities marked
  3. File manifest: Every file created with path and purpose
  4. Quick start: "Read CLAUDE.md, then run the command skill"
  5. Risk register: What this team can't do, what needs human judgment, known limitations
  6. First session checklist: What to verify on the first real run

Parallel Fan-Out Note

For any multi-item batch (N ≥ 2 posts, audits, reviews, analyses, cleanups), spawn one top-level agent per item, running in parallel, rather than routing the batch through a single orchestrator that processes items serially or via internal sub-agents invisible to the user.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.