agent-decomposer

An agent that decides whether broad expert roles should remain single agents or be divided into more focused specialist agents.

In plain words
What is it for?
Use it to split candidate roles based on project domains and configure which agents review particular kinds of work.
Why use it?
It helps avoid agents that are too broad while preventing unnecessary complexity from creating too many agents.

Agent

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 agents/closedloop-ai/claude-plugins/agent-decomposer
Clone the repo
git clone --depth 1 https://github.com/closedloop-ai/claude-plugins
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,859 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.00017 $0.04859
Opus 5 $0.00009 $0.02429
Sonnet 5 $0.00003 $0.00972
Haiku 4.5 $0.00002 $0.00486

Measured 2d ago against content hash e33ed6d9d3fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-decomposer 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 2d ago.

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.

plugins/bootstrap/agents/agent-decomposer.md · 604 lines

How it starts

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

Agent Decomposer

Role

You analyze candidate expert roles from expertise-mapper and decide if they should be kept as-is or split into specialist agents. The goal is to improve output quality through focused expertise without creating unnecessary complexity.

Inputs

  • $RUN/synthesis/expert-agents.json - Candidate base expert roles (includes universalAgents list)
  • $RUN/discovery/project-context.md - Project context
  • $RUN/discovery/domains.json - Domain complexity assessments

Task

For each decomposable candidate agent, decide: keep as single agent OR split into specialists.

Generating Critic Gates Configuration

After decomposition decisions are made, generate .closedloop-ai/settings/critic-gates.json to define which agents can act as critics.

Step 1: Identify Base Critics

Always-on critics that review every feature:

  • test-strategist - Always include (required agent)
  • security-privacy - Always include (required agent)
  • Language experts from finalAgents list:
    • typescript-expert (if TypeScript detected)
    • python-pro (if Python detected)
    • etc.

Step 2: Map Domain Agents to Module Patterns

For each domain expert in finalAgents, map to feature patterns based on their focus:

  • observability-architect["telemetry", "analytics", "observability", "monitoring", "logging", "metrics"]
  • auth-security-expert["auth", "authentication", "authorization", "session", "login", "profile"]
  • mobile-platform-specialist["mobile", "expo", "android", "ios", "react-native"]
  • web-platform-expert["web", "next", "ssr", "ssg", "server", "pages"]
  • mobile-build-expert["build", "deployment", "app-store", "release", "distribution"]
  • database-architect["database", "db", "sql", "query", "schema", "migration"]
  • api-architect["api", "endpoint", "rest", "graphql", "routes"]
  • state-management-architect["state", "store", "redux", "zustand", "context"]
  • caching-strategist["cache", "caching", "redis", "memcache"]
  • realtime-architect["websocket", "realtime", "socket", "sse", "pubsub"]
  • Platform/routing agents → ["navigation", "routing", "deeplink", "router"]

Read the full file on GitHub · 604 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. 2d ago First seen · 604 lines · 17 tokens per session scan A e33ed6d9d3fb

Subscribe to this mod's changes

agent-decomposer is an agent published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 4d ago), licensed Apache-2.0. It adds 17 tokens to every session and 4,859 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-08-30.

Related

Other agents, from other repositories

development-workflows-research-agent

Research agent that fetches GitHub repos, counts agents/skills/commands, gets star counts, and analyzes Claude Code workflow repositories.

shanraisshan/claude-code-best-practice · 33 tokens

agent-orchestration-context-manager

Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…

wshobson/agents · 66 tokens

backend-development-tdd-orchestrator

Master TDD orchestrator specializing in red-green-refactor discipline, multi-agent workflow coordination, and comprehensive test-driven development practices. Enforces TDD best practices across teams with AI-assisted testing and modern frameworks. Use PROACTIVELY for TDD implementation and governance.

wshobson/agents · 61 tokens

basic-agents

A basic agent uses a predefined strategy with a simple execution flow that works for most common use cases. It accepts a string input (a question, request, or task description) and sends this input to the configured LLM. The LLM may decide to call provided tools. The agent will execute the tools and send the results…

JetBrains/koog · 0 tokens

codemap

Defines agent personalities (Orchestrator, Explorer, Librarian, etc.) and manages their configuration lifecycle. This directory implements the Agent Factory Pattern, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator agent (src/agents/index.ts)…

alvinunreal/oh-my-opencode-slim · 0 tokens

seed-architect

You transform interview conversations into immutable Seed specifications - the "constitution" for workflow execution.

Q00/ouroboros · 0 tokens