dynamic-workflow

A workflow coordinator for breaking a complex coding task into smaller jobs that can run at the same time, then combining the results.

In plain words
What is it for?
Use it to investigate bugs across several files or possible causes, review many items in parallel, or run the same steps for each item.
Why use it?
It avoids handling every investigation or repeated task one step at a time. It also provides a way to continue longer work after an interruption.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/dmatut7/codex-flow/codex-skill
Any agent
npx skills add Dmatut7/codex-flow --skill codex-skill
Clone the repo
git clone --depth 1 https://github.com/Dmatut7/codex-flow

Made for: Claude Code, Codex.

Per session 139 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 990 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00139 $0.00990
Opus 5 $0.00069 $0.00495
Sonnet 5 $0.00028 $0.00198
Haiku 4.5 $0.00014 $0.00099

Measured 2d ago against content hash 5d597c1cbd75, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

dynamic-workflow scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Subtle steeringmediumPrompt injection

Instructions that bias recommendations or shape behaviour without the user noticing.

- **Membership, not API key.** Default backend is `codex-sdk` (the logged-in Codex/ChatGPT account). Never tell the user to set `OPENAI_API_KEY` unless they explicitly ask for the `openai-responses` backend.
codex-skill/SKILL.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  1. Preflight if needed. If this is the first workflow in the project or the CLI availability is unclear, run codex-flow doctor. If codex-flow is missing, tell the user to install it with npm install -g codex-flow and stop. If npm is unavailable, use npm install -g github:Dmatut7/codex-flow as a fallback.

  2. 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.

  3. Generate a workflow file at .codex-flow/generated/<slug>.workflow.ts (create dirs as needed). Follow references/engine-api.md EXACTLY:

    • export default async function workflow(ctx) { ... }
    • Import-free: no import lines. 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. One ctx.agent(...) call = one sub-task. Don't write one giant single-agent prompt that bypasses the engine.
  4. Run it (this uses the user's Codex/ChatGPT membership login — no API key needed):

    codex-flow run .codex-flow/generated/<slug>.workflow.ts
    

    Journal is written to .codex-flow/journal/<slug>.jsonl automatically. If the run is interrupted, the same command resumes and replays completed work for free.

Read the full file on GitHub · 49 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 49 lines · 0 tokens per session scan B 5d597c1cbd75

Subscribe to this mod's changes

dynamic-workflow is a skill published in the GitHub repository Dmatut7/codex-flow (9 stars, last pushed 2mo ago), licensed MIT. It adds 139 tokens to every session and 990 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it B with 1 finding (subtle steering). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

codex-workflows

Run a dynamic-workflow script on a local Codex App Server — orchestrate many Codex / GPT agents (the agent / parallel / pipeline / phase / budget DSL) instead of Claude subagents, for codebase audits, large migrations, and multi-agent review or research. Give it one or two rough sentences and it compiles the right…

scasella/claude-dynamic-workflows-codex · 100 tokens

final-release-review

Perform pre-release planning or a final release-candidate review for openai-agents-python by comparing the target with the previous remote tag, determining the minimum compatible release type, auditing regressions and contract changes, reviewing open documentation PR coverage, drafting minor-release Key Changes, and…

openai/openai-agents-python · 64 tokens

playwright

Use when the task requires capturing or automating a real browser from the terminal.

openai/openai-agents-python · 19 tokens

agent-framework-py-release

Use when cutting a Python release for the microsoft/agent-framework monorepo. Triggers on "bump py versions", "cut a python release", "prepare release PR for python", "release py packages", "bump python to X.Y.Z", or similar requests to bump Python package versions and prepare a release PR. Handles all four lifecycle…

microsoft/agent-framework · 103 tokens

implementation-final-review

Perform the repository's risk-tiered independent final review before implementation completion. Use only when explicitly invoked or when repository instructions require it after behavior-impacting implementation work; audit the complete task diff, supported contracts, lifecycle and security boundaries, complexity, and…

openai/openai-agents-python · 58 tokens

python-package-management

Guide for managing packages in the Agent Framework Python monorepo, including creating new connector packages, versioning, and the lazy-loading pattern. Use this when adding, modifying, or releasing packages.

microsoft/agent-framework · 43 tokens