dynamic-workflows
Skill0 starsChanged 5 months agoMITView on GitHub
Orchestrate many Codex subagents deterministically from one JavaScript script. Use when a task splits into independent units that should run in parallel or through staged pipelines (reviewing/enriching/migrating a list, multi-angle research, fan-out then merge) and you want loops/concurrency/merging handled in code rather than by hand.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- zedarvates/frugal-skillstheir own version, first seen Nov 8, 2026
- TheBeardedBearSAS/claude-crafttheir own version, first seen Oct 29, 2026
- cubetribe/ClaudeCode_GodMode-Ontheir own version, first seen Oct 13, 2026
- tharanee-bit/Codex-Dynamic-Workflowstheir own version, first seen Jul 16, 2026
- donovan-yohan/hermes-plugin-dynamic-workflowstheir own version, first seen Jul 3, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- TheBeardedBearSAS/claude-craft★ 108same name
- cubetribe/ClaudeCode_GodMode-On★ 53same name
- donovan-yohan/hermes-plugin-dynamic-workflows★ 2same name
- tharanee-bit/Codex-Dynamic-Workflows★ 1same name
- zedarvates/frugal-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Call the run_workflow tool (from the dynamic-workflows MCP server) with either a script (plain JavaScript) or a script_file, plus optional …
- Very specific: line 58
If you can produce the answer yourself - a single lookup, a calculation, formatting data you already have - do it directly.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dynamic Workflows
Call the run_workflow tool (from the dynamic-workflows MCP server) with either a script (plain
JavaScript) or a script_file, plus optional args. Inline scripts are archived as
<workflows_dir>/scripts/<run_id>.js and returned as scriptFile; script_file accepts a .js
path or a bare name under workflows_dir.
The script runs in an async context and orchestrates subagents.
run_workflow runs in the background; use the returned runId with
get_workflow_result until it returns status: "completed" or status: "failed".
The whole point of this tool is the agent() fan-out. Each agent() call spawns a fresh Codex
subagent (via @openai/codex-sdk) that shares no context with other agents or with you, so pass
everything an agent needs in its prompt. If your script would call agent() zero times, do not use
this tool - answer or compute the result directly.
Helpers in scope
agent(prompt, opts?)-> result.opts:{ schema, model, label, phase, cd, agentType, isolation, resumeThread }. Withschema(a JSON Schema) the agent must return matching JSON and you get the parsed object; without it you get the agent's final text. Throws if that agent fails.parallel(thunks)->any[]. Runs thunks concurrently under a global cap; a throwing thunk becomesnull(use.filter(Boolean)).pipeline(items, ...stages)->any[]. Each item flows through all stages independently (no barrier). Stages receive(prev, originalItem, index). A throwing stage drops that item tonull.phase(title)/log(msg)for progress.argsis the tool'sargsinput.
Shape
export const meta = { name: 'review', description: 'review each changed file' }
const SCHEMA = {
type: 'object',
properties: { file: { type: 'string' }, issues: { type: 'array', items: { type: 'string' } } },
required: ['file', 'issues'],
}
phase('review')
const results = await parallel(
args.files.map((f) => () =>
agent(`Review ${f} for correctness bugs. Return JSON.`, { schema: SCHEMA, label: f })
)
)
return results.filter(Boolean)End the script with return <value>; that value is the workflow output returned by
get_workflow_result. Default to parallel for independent work and pipeline when each item has
multiple dependent stages.
When NOT to use
If you can produce the answer yourself - a single lookup, a calculation, formatting data you already
have - do it directly; do not call run_workflow. A workflow that finishes with agentCount: 0 (no
agent() calls) added nothing and is a misuse. Reach for run_workflow only when real subagent
fan-out - parallel agent() calls, staged pipelines, or loops over many units - is worth expressing
as code.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

