dynamic-workflow
Skill9 starsChanged 5 months agoMITView on GitHub
Use when the user asks to run a "动态工作流" / "dynamic workflow", or describes a complex multi-step task, a bug investigation, or work that should be split and run in parallel ("拆开并行跑", "parallel analysis", "并行排查", "complex multi-step task"). This skill turns Codex into an orchestrator: it generates a temporary workflow, runs many Codex sub-agents in parallel with resume + journaling via the `codex-flow` engine, and summarizes the result — instead of doing everything in one linear turn. Do NOT use for a single trivial question or a one-step edit; just answer those directly.
- Reads credentials
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- eygelias/Hermes-Custom-Skillstheir own version, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- eygelias/Hermes-Custom-Skills★ 0same 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.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- business-defect-auditSkill
- parallel-fixSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use a dynamic workflow when the task is multi-step, parallelizable, or repeated over many items, e.g.:
- Distinctive: line 20
If it's a single trivial question or one tiny edit, just answer/do it directly — do not spin up a workflow.
- Very specific: line 24
Preflight if needed: If this is the first workflow in the project or the CLI availability is unclear, run codex-flow doctor.
- Distinctive: line 26
Restate the goal in one line: If the input material or output shape is genuinely missing, ask at most ONE necessary question.
- Very specific: line 43
Membership, not API key: Default backend is codex-sdk (the logged-in Codex/ChatGPT account).
- Very specific: line 44
Sandbox: Read-only/analysis sub-agents: sandbox: "read-only".
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dynamic Workflow
You are the natural-language driver for the codex-flow workflow engine. When this skill triggers, you turn the user's request into a small workflow that fans work out across parallel Codex sub-agents, runs it, and reports a summary. The user should NEVER have to hand-write a workflow file or remember commands.
When to actually use it
Use a dynamic workflow when the task is multi-step, parallelizable, or repeated over many items, e.g.:
- "排查这个 bug" over several files/hypotheses
- "review/analyze these N things" (one sub-agent per thing, in parallel)
- "do X then verify X for each item" (a per-item pipeline)
- anything long enough that resume-after-interrupt matters
If it's a single trivial question or one tiny edit, just answer/do it directly — do not spin up a workflow.
Steps
- Preflight if needed. If this is the first workflow in the project or the CLI availability is unclear, run
codex-flow doctor. Ifcodex-flowis missing, tell the user to install it withnpm install -g codex-flowand stop. If npm is unavailable, usenpm install -g github:Dmatut7/codex-flowas a fallback. - Restate the goal in one line. If the input material or output shape is genuinely missing, ask at most ONE necessary question. Otherwise infer and proceed.
- Generate a workflow file at
.codex-flow/generated/<slug>.workflow.ts(create dirs as needed). Followreferences/engine-api.mdEXACTLY:export default async function workflow(ctx) { ... }- Import-free: no
importlines. Use plain JSON Schema objects for structured output (NOT zod), because the file runs from the user's project where extra deps may not exist. - Express the work with
ctx.parallel(independent fan-out),ctx.pipeline(per-item multi-stage),ctx.phase,ctx.agent,ctx.log. Onectx.agent(...)call = one sub-task. Don't write one giant single-agent prompt that bypasses the engine.
- Run it (this uses the user's Codex/ChatGPT membership login — no API key needed):
Journal is written tocodex-flow run .codex-flow/generated/<slug>.workflow.ts.codex-flow/journal/<slug>.jsonlautomatically. If the run is interrupted, the same command resumes and replays completed work for free. - Summarize for the user: the result, what each parallel branch found, the journal path, and the one-line rerun command. Do NOT paste the whole generated script unless asked.
Hard rules
- Membership, not API key. Default backend is
codex-sdk(the logged-in Codex/ChatGPT account). Never tell the user to setOPENAI_API_KEYunless they explicitly ask for theopenai-responsesbackend. - Sandbox. Read-only/analysis sub-agents:
sandbox: "read-only". Sub-agents that must edit real files:sandbox: "workspace-write"ANDcwd: process.cwd(). Two parallel writable agents must NOT share the samecwd(the engine throws if they do) — give each a distinct directory or keep writes sequential. - Current project is the workspace.
codex-flow runalready runs in the user's project directory; read-only agents need nocwd. - On failure, read the error and fix only the generated workflow (e.g. a bad prompt or schema). Do not try to modify the
codex-flowengine itself.
See references/engine-api.md for the exact API and a copy-paste template. Installed setup/troubleshooting reference: references/setup.md.
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.

