# Dynamic Workflows

Plan parallel fan-outs in code with adversarial checks and waves.

- Repository: https://github.com/NousResearch/hermes-agent (259479 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add NousResearch/hermes-agent --skill dynamic-workflow -g -a claude-code -y`
Codex: `npx skills add NousResearch/hermes-agent --skill dynamic-workflow -g -a codex -y`
Cursor: `npx skills add NousResearch/hermes-agent --skill dynamic-workflow -g -a cursor -y`
Gemini CLI: `npx skills add NousResearch/hermes-agent --skill dynamic-workflow -g -a gemini-cli -y`

## Description

Plan-in-code fan-outs, adversarial verification, waves.

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

# Dynamic Workflow Skill

Runs large fan-out work as a workflow: the plan, the loop and every intermediate
result live in a script and on disk, so the parent's context holds only verified
results. Covers one-shot fan-outs, adversarial convergence (attempts + refuters),
and multi-wave campaigns that integrate dozens of worker branches. It does not
make `delegate_task` durable across restarts; that is the kanban swarm's job.

## When to Use

Reach for it when the unit of work is clear (a file, an endpoint, a record) and
there are more units than one context can hold. Skip it for under ~10 units or
for serial chains. For a refactor or fix campaign on hermes-agent itself, load
`hermes-agent` (the dev workflow) alongside; this skill owns the fan-out shape.

## Prerequisites

- `delegate_task` available and `delegation.max_concurrent_children` sized for
  the wave (default 10; the runtime rejects a `tasks=[]` larger than that with a
  clear error rather than queueing). `delegation.max_spawn_depth >= 2` only if
  children must fan out themselves.
<!-- no-tmp: ok, explains why a literal /tmp is wrong -->
- A writable run directory resolved from the terminal environment's temp dir (`$TMPDIR`, else the platform temp dir). Never a literal `/tmp`:
  Termux has no such directory and native Windows breaks on it. Use `<tmp>/wf_<name>_<uuid>/`, unique per
  run, so an interrupted earlier run cannot leave stale outputs to be misread.
- `execute_code` for the deterministic layer (only `web_search`, `web_extract`,
  `read_file`, `write_file`, `search_files`, `terminal`, `patch` exist inside it).

## How to Run

Two layers, split by a real capability boundary:

The rest: https://github.com/NousResearch/hermes-agent/blob/HEAD/optional-skills/autonomous-ai-agents/dynamic-workflow/SKILL.md
