agentleFS
ubie-ossubie-oss/claude-code-plugin/.claude/skills/implement-sub-agents/SKILL.md

implement-sub-agents

Skill1 starsChanged 9 months agoApache-2.0View on GitHub

Create and validate Claude sub-agent definitions with correct frontmatter, tool permissions, and delegation boundaries.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Create or update agent files under agents/ with explicit role boundaries, model/tool settings, and delegation patterns.

    line 8
  2. Distinctive:

    Assess complexity: Verify that sub-agent is needed (score 7-8).

    line 12
  3. Distinctive:

    Validate: Check frontmatter and agent file structure

    line 19
  4. Very specific:

    Read-only sub-agent example: assets/templates/subagent-readonly.md

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Implement Sub-Agents

Create or update agent files under agents/ with explicit role boundaries, model/tool settings, and delegation patterns.

Workflow

  1. Assess complexity: Verify that sub-agent is needed (score 7-8). If simpler approach works, use skill instead.
  2. Define role: Clear purpose, responsibilities, and explicit boundaries
  3. Set decision authority: What agent can/cannot do autonomously
  4. Configure tools: Least privilege access to required tools only
  5. Author/update: Agent markdown with valid frontmatter
  6. Context strategy: Define how agent manages context (retrieval, summarization, state)
  7. Plan evaluations: Identify 20-50 test scenarios covering success and failure modes
  8. Validate: Check frontmatter and agent file structure
  9. Connect selectively: Link related skills/hooks only when required

Progressive Disclosure

Best Practices (Anthropic Guidelines)

  • Complexity decision framework: ../implement-claude-extensions/references/decision-framework.md
  • Context management patterns: ../implement-claude-extensions/references/context-management.md
  • Evaluation strategy: ../implement-claude-extensions/references/evaluation-strategy.md

Sub-Agent Design

  • Agent frontmatter rules: references/subagent-frontmatter.md
  • Tool access strategy: references/subagent-tools.md
  • Model selection guidance: references/subagent-models.md
  • Permission boundaries: references/subagent-permissions.md
  • Delegation patterns: references/subagent-delegation.md

Validation Tools

  • Agent file validator: scripts/validate-subagent.sh
  • Frontmatter checker: scripts/check-subagent-frontmatter.sh

Templates (by Complexity)

  • Level 3 - Autonomous Agent (Score 7-8): assets/templates/subagent-autonomous.md
  • Base sub-agent template: assets/templates/subagent-template.md
  • Read-only sub-agent example: assets/templates/subagent-readonly.md
  • Sub-agent with skills example: assets/templates/subagent-with-skills.md
  • Sub-agent with hooks example: assets/templates/subagent-with-hooks.md

Related Skills

  • Umbrella routing and architecture: ../implement-claude-extensions/SKILL.md
  • Agent team coordination: ../implement-agent-teams/SKILL.md

Sources

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.