# Fractal

Spawn and manage child nodes -- recursive autonomous agent loops.

- Repository: https://github.com/plasma-ai/fractal (789 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add plasma-ai/fractal --skill fractal -g -a claude-code -y`
Codex: `npx skills add plasma-ai/fractal --skill fractal -g -a codex -y`
Cursor: `npx skills add plasma-ai/fractal --skill fractal -g -a cursor -y`
Gemini CLI: `npx skills add plasma-ai/fractal --skill fractal -g -a gemini-cli -y`

## Description

Spawn and manage child nodes -- recursive autonomous agent loops.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Fractal

A fractal is a tree of autonomous loops, each running in an isolated Git
worktree. You are one node; spawn a child to own a subtask that is well-defined,
separable, large enough for its own iteration cycle, and able to be run in
parallel without conflicting with your work. Pay careful attention to your
NODE.md instructions to guide you on how and when to spawn sub-nodes.

If `$MAX_DEPTH`, `$MAX_CHILDREN`, or `$MAX_DESCENDANTS` is `0`, you are a leaf
-- you cannot spawn, so this skill (spawning and managing children) does not
apply; skip it and focus on executing your task directly. Otherwise, **default
to spawning.** If a task has separable parts, decompose it into children rather
than doing it yourself -- the fractal's power is multiplicative parallelism --
don't waste it by tackling tasks one at a time.

Don't spawn what you can easily and reliably finish yourself. However, when a
child's task is itself complex, be a manager: give it resources and detailed
instructions on how to decompose further. Deep trees of focused nodes outperform
shallow trees of overloaded ones.

Run `fractal node --help` and `fractal node <command> --help` for the CLI.

## Limits (check before spawning)

| Var                | Meaning                                                                     |
| ------------------ | --------------------------------------------------------------------------- |
| `$MAX_DEPTH`       | Maximum nesting depth below this node. `-1` unlimited, `0` leaf.            |
| `$MAX_CHILDREN`    | Maximum direct children of this node. `-1` unlimited, `0` leaf.             |
| `$MAX_DESCENDANTS` | Maximum total descendants in this node's subtree. `-1` unlimited, `0` leaf. |

`-1` is how an unset cap displays; no setter accepts it. Leave a child uncapped
by omitting the flag at init, or lift a cap with
`fractal node config set <key>=null --path=<child worktree>`.

The rest: https://github.com/plasma-ai/fractal/blob/HEAD/fractal/_node/skills/fractal/SKILL.md
