dynamic-workflow

Orchestrate large fan-out tasks as plan-in-code workflows with adversarial verification.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill dynamic-workflow-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dynamic-workflow
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/autonomous-ai-agents/dynamic-workflow
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill dynamic-workflow-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large tasks like codebase-wide sweeps, 100+ file migrations, or multi-source research overflow a single context window because every intermediate result piles into the agent's context. This Skill moves the plan, loop, and intermediate results into a script so only the final verified answer stays in context. ## Core Features & Use Cases - Plan-in-code fan-out: Run a deterministic pre-pass in an execute_code script that builds a manifest, then fan out only the LLM-judgment steps via delegate_task batches. - Adversarial convergence verification: Run N independent attempts plus M refuter agents, keeping only claims that survive refutation, for higher-trust audits and reviews. - Foreground vs durable workflows: Distinguish synchronous single-turn fan-out from durable kanban-swarm workflows that survive interruptions over hours or days. - Use Case: Run a security audit across an entire codebase by scripting the file manifest, fanning out per-chunk review agents, then refuting each atomic claim before surfacing only verified vulnerabilities. ## Quick Start Use the dynamic-workflow skill to audit this entire codebase for security issues by fanning out per-directory review agents and verifying findings with refutation rounds.

Frequently Asked Questions about dynamic-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run hundreds of parallel subagents in one session?

Move the plan and loop into a script instead of the agent context. Run a deterministic pre-pass with execute_code to build a manifest, then issue bounded delegate_task batches for the LLM-judgment steps, keeping only the final verified answer in context.

How do I verify multi-agent findings with adversarial convergence?

Fan out the same question to 2-4 independent agents with different framings, collect their atomic claims, then run a refuter batch tasked with breaking each claim. Surface only claims that survive refutation, and iterate up to 3 rounds until no new claims emerge.

Can delegate_task run agents in the background or resume after interruption?

No, delegate_task runs synchronously inside the parent turn and all in-flight children are cancelled if the user sends a new message or stops the turn. For durable workflows that survive interruption, use the SQLite-backed kanban swarm, a cronjob, or a background terminal process.

Why can't I call delegate_task inside an execute_code script?

delegate_task is not in the SANDBOX_ALLOWED_TOOLS set available to execute_code scripts, so the import will fail. Use execute_code only for deterministic work like fetching, parsing, and templating, and issue delegate_task batches from the parent turn.

When should I not use a fan-out workflow?

Avoid fan-out for small bounded tasks under roughly 10 units, where a direct tool call is cheaper, and for serial tasks where one unit depends on another's output. Also avoid it when the work must survive user interruption, since synchronous delegation is turn-scoped.

How do I control token cost in a large fan-out workflow?

Each delegate_task child is a full agent tree, so 20 children means roughly 20 times the model calls. Start on a scoped slice, report the token cost, and only scale up after the user approves; do deterministic work in scripts with no per-item LLM calls.