← Back to work

Graph-Engineer: DAGs of Sub-Agents

A Claude Code skill that turns a prompt into a validated graph of parallel sub-agents instead of one long serial run

AgentsInfra

The problem

Large, multi-part tasks handed to a single agent run serially by default — even when large chunks of the work don’t actually depend on each other. That serial-by-default behavior leaves real speed on the table for any task that decomposes into independent streams.

What I built

A skill that takes an incoming prompt, decomposes it into a directed acyclic graph of sub-agents with explicit dependencies, and validates that graph before anything runs. Independent branches of the graph dispatch in parallel; dependent steps wait on their inputs. The result is a task plan that only runs serially where the work genuinely requires it.

How it works

A finding worth noting

Sub-agent dispatch doesn’t run in degraded mode on claude.ai — parallel dispatch requires the Task tool, which isn’t available there. Cost-ledger figures produced without a dispatched Task tool are projections, not measured values, which matters when comparing estimated versus actual run cost.

Stack

Claude Code, Python, graph validation via Kahn’s algorithm.