sub-agents-patterns

sub-agents-patterns is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 12 tokens per session (2,793 once invoked), scanned A, original, MIT.

A guide to splitting complex coding tasks among helper agents. It explains when to use agents for codebase exploration, implementation work, or planning.

In plain words
What is it for?
Use it to explore a repository, plan architecture, refactor across several files, or coordinate multi-step coding tasks.
Why use it?
It helps decide how to divide work and run independent investigations or changes in parallel.

Command for Claude Code

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/thebeardedbearsas/claude-craft/sub-agents-patterns
Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 hooks.

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 sub-agents-patterns

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/sub-agents-patterns.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/sub-agents-patterns)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/sub-agents-patterns"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/sub-agents-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,793 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00012 $0.02793
Opus 5 $0.00006 $0.01396
Sonnet 5 $0.00002 $0.00559
Haiku 4.5 $0.00001 $0.00279

Measured yesterday against content hash 7b141ea602ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sub-agents-patterns 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 yesterday.

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.

.claude/commands/common/sub-agents-patterns.md · 278 lines

How it starts

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

Patterns de Sub-Agents

Guide pour utiliser efficacement les sub-agents dans Claude Code pour les tâches parallèles et complexes.

Types d'Agents

1. Explore Agent (Recherche Rapide)

À utiliser pour l'exploration rapide du codebase et la collecte d'informations.

Task tool avec subagent_type: "Explore"
- Recherches rapides de patterns de fichiers
- Recherches de mots-clés dans le code
- Compréhension de la structure du codebase

Quand l'utiliser :

  • Recherche de fichiers par pattern
  • Recherche de patterns de code spécifiques
  • Réponses aux questions sur l'organisation du codebase

2. General-Purpose Agent (Tâches Complexes)

À utiliser pour les tâches multi-étapes nécessitant de l'autonomie.

Task tool avec subagent_type: "general-purpose"
- Refactoring complexe
- Mises à jour multi-fichiers
- Recherche et implémentation

Quand l'utiliser :

  • Tâches couvrant plusieurs fichiers
  • Sous-tâches indépendantes pouvant s'exécuter en parallèle
  • Tâches nécessitant du jugement et de l'itération

3. Plan Agent (Architecture)

À utiliser pour concevoir des stratégies d'implémentation.

Task tool avec subagent_type: "Plan"
- Planification d'implémentation
- Décisions d'architecture
- Analyse des compromis

Quand l'utiliser :

  • Avant d'implémenter des fonctionnalités complexes
  • Lorsque plusieurs approches sont possibles
  • Pour les décisions architecturales

Patterns de Tâches Parallèles

Pattern 1 : Recherche Parallèle

Lancez plusieurs Explore agents pour différents aspects :

# Lancement en parallèle (un seul message avec plusieurs appels d'outils) :
- Agent 1 : Rechercher les patterns d'authentification
- Agent 2 : Rechercher les endpoints API
- Agent 3 : Rechercher les modèles de base de données

Pattern 2 : Mises à Jour Parallèles

Pour les mises à jour de fichiers indépendants entre langues/modules :

# Lancement en parallèle :
- Agent 1 : Mettre à jour les templates français
- Agent 2 : Mettre à jour les templates espagnols
- Agent 3 : Mettre à jour les templates allemands
- Agent 4 : Mettre à jour les templates portugais

Read the full file on GitHub · 278 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. yesterday First seen · 278 lines · 12 tokens per session scan A 7b141ea602ea

Subscribe to this mod's changes

sub-agents-patterns is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 2,793 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.