Agent skill

Open Dynamic Workflows

by xz1220 in xz1220/open-dynamic-workflows

编写并运行 dynamic workflow:用 Claude Code 的 workflow 方言写一段简短的 JavaScript 脚本,再用 odw CLI 在宿主 agent 的上下文之外,把子任务扇出给 coding-agent CLI (Codex、Claude Code、Gemini、Qwen、Kimi 或自定义),后台跑完后只取回最终结果。

MITAuto-check passedAgent Workflows

Install Open Dynamic Workflows

skills CLI
$ npx skills add xz1220/open-dynamic-workflows --skill open-dynamic-workflows -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install xz1220/open-dynamic-workflows open-dynamic-workflows --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/xz1220/open-dynamic-workflows.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/open-dynamic-workflows/zh-CN .claude/skills/open-dynamic-workflows && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
open-dynamic-workflows
GitHub stars
104
Token cost
~1.1k tokens
SKILL.md length
286 words
Files
3 (incl. references)
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

编写并运行 dynamic workflow:用 Claude Code 的 workflow 方言写一段简短的 JavaScript 脚本,再用 odw CLI 在宿主 agent 的上下文之外,把子任务扇出给 coding-agent CLI (Codex、Claude Code、Gemini、Qwen、Kimi 或自定义),后台跑完后只取回最终结果。

  • Tasks that involve Subagents
  • SKILL.md covers 写 workflow 脚本, 原语速查, 运行与观测 and 适配器, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Open Dynamic Workflows is an agent skill from xz1220/open-dynamic-workflows. 编写并运行 dynamic workflow:用 Claude Code 的 workflow 方言写一段简短的 JavaScript 脚本,再用 odw CLI 在宿主 agent 的上下文之外,把子任务扇出给 coding-agent CLI (Codex、Claude Code、Gemini、Qwen、Kimi 或自定义),后台跑完后只取回最终结果。 当一个任务大过单次调用——需要并行扇出多份草稿、多阶段评审流水线、对抗式核验发现, 或循环挖掘直到无新发现——或用户提到 odw、dynamic workflow、多 agent 编排、扇出 subagent 时,使用本 skill。

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/adapters.md` and `references/primitives.md`).

It sits in Agent Workflows, covering Subagents. It works with Kimi, Qwen and JavaScript. The repository describes itself as: Open Dynamic Workflows: TypeScript CLI runtime for Claude Code-style dynamic workflows across Codex, Claude Code, Gemini, Qwen, Kimi, and custom coding-agent CLIs. The licence is MIT.

When your agent uses it

  • Tasks that involve Subagents

Example prompts

  • “/open-dynamic-workflows”

What it can do on your machine

Read from SKILL.md and the folder at commit 16f57ee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Open Dynamic Workflows loads about 1.1k tokens when it runs, and up to ~5k if it reads all its reference files. Until then it costs about 81 tokens; SKILL.md has 286 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from xz1220/open-dynamic-workflows at commit 16f57ee, republished under its MIT licence (© xz1220). 286 words, ~1,138 tokens.

Download SKILL.mdSave it as .claude/skills/open-dynamic-workflows/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
open-dynamic-workflows
description
编写并运行 dynamic workflow:用 Claude Code 的 workflow 方言写一段简短的 JavaScript 脚本,再用 `odw` CLI 在宿主 agent 的上下文之外,把子任务扇出给 coding-agent CLI (Codex、Claude Code、Gemini、Qwen、Kimi 或自定义),后台跑完后只取回最终结果。 当一个任务大过单次调用——需要并行扇出多份草稿、多阶段评审流水线、对抗式核验发现, 或循环挖掘直到无新发现——或用户提到 odw、dynamic workflow、多 agent 编排、扇出 subagent 时,使用本 skill。
license
MIT

Open Dynamic Workflows

一个 dynamic workflow 就是一段简短的 JavaScript 脚本:编排计划写成普通代码,由 odw 在独立的后台进程里执行,把每个子任务派发给一个真实的 coding-agent CLI 进程。 中间产物不进入你的上下文,回到你手里的只有脚本 return 的最终值。

使用流程固定三步:写脚本 → odw run → 检视结果再行动。任务一次调用就能完成时 不要用——直接做。

写 workflow 脚本

  • 文件最顶部放 export const meta = {…},必须是纯字面量(不含变量、函数调用、 模板插值)。meta.name 与 meta.description 必填;whenToUse、phases、model 可选。
  • 脚本体运行在 async 上下文里:直接用顶层 await;顶层 return 的值就是整个 workflow 的结果。
  • 原语全部是注入的全局——不要 import。除 export const meta 外,文件里出现任何 其他顶层 import / export 都会被加载器拒绝。
  • 循环、if、去重等普通控制流直接写在脚本里。原语只负责派发并等待,拿结果做 什么由脚本决定。
js
// fan-out-reduce.js
export const meta = {
  name: 'fan-out-reduce',
  description: 'Draft in parallel, then synthesize.',
  phases: [{ title: 'Draft' }, { title: 'Synthesize' }],
}

const question = (args && args.question) || 'Design a cache.'

phase('Draft')
const drafts = await parallel(
  [1, 2, 3].map((i) => () => agent(`Draft #${i}: ${question}`, { phase: 'Draft' })),
)

phase('Synthesize')
return await agent(
  'Synthesize the best answer from:\n' + drafts.filter(Boolean).join('\n---\n'),
  { phase: 'Synthesize' },
)

用 --args 传入的输入会注入为全局 args(解析后的 JSON,或一段原始字符串—— 看起来像 JSON 但解析失败的输入会被直接拒绝,不会悄悄按字符串传入)。

原语速查

原语作用
agent(prompt, opts?)让一个 coding agent 跑一个子任务;返回它的回复文本,设了 opts.schema 则返回校验过的对象。唯一真正干活的动词。
parallel(thunks)并发执行一组零参 thunk,并等全部完成(屏障)。顺序保留;失败的槽位是 null。
pipeline(items, ...stages)让每个条目独立地流过各 stage(无屏障)。每个 stage 收到 (prev, item, index)。
phase(title) / log(msg)给后续工作打上进度标签 / 发一行进度消息。
argsworkflow 的输入(注入)。
budget{ total, spent(), remaining() }——按 token 目标扩缩深度。
workflow(ref, args?)内联调用另一个 workflow(仅一层)。ref 是受管目录中的名字或 { scriptPath };子 workflow 共享本次运行的并发上限、agent 计数和预算。
validate(source)解析并编译检查可信源码,不运行工作流正文;元数据会被求值。返回 { ok, meta?, errors, warnings }。ODW 扩展——不属于 Claude Code 方言。

agent 的 opts:{ adapter?, schema?, label?, phase?, model?, agentType?, isolation? }。 adapter 选择用哪个 CLI;schema 是一个原始 JSON Schema 对象(选项,不是全局); agentType 是注入进 prompt 的人设,不是 adapter 名。

选择法则: 下一步需要一整批结果一次到位(去重、计票、综合)时用 parallel; 多阶段处理默认用 pipeline。

写嵌套 workflow、schema 重试、budget 扩缩等复杂组合之前,先读 references/primitives.md。

运行与观测

bash
odw run wf.js --wait --args '{"question": "Design a cache."}'   # 阻塞并打印结果

长任务用 fire-and-poll,不阻塞自己:

bash
RUN=$(odw run wf.js)        # 打印一个 run id 后立即返回
odw status $RUN             # 状态 + agent 计数
odw logs $RUN --follow      # 流式输出进度事件
odw result $RUN             # 完成后打印最终值
odw pause $RUN / resume $RUN / stop $RUN
odw list                    # 所有运行

保存过的 workflow 可直接按名字运行(odw run <名字>);查找顺序:.odw/workflows、 .claude/workflows、~/.odw/workflows、~/.claude/workflows。

适配器

Codex、Claude Code、Gemini、Qwen、Kimi 开箱即用,无需配置。要换默认 CLI、调旗标或 接入自定义 CLI 时,读 references/adapters.md,写一个 odw.config.json(放在项目根或 ~/.config/odw/config.json,或用 --config 指定)。

如果运行报 AdapterNotFound(装了多个 agent CLI 但没选默认):先跑 odw init --check 查看装了哪些 CLI——在你的非交互 shell 里它只报告、绝不弹提示。 然后问你的用户想默认用哪个,再用 odw init --adapter <名字> 写入他们的选择。 不要替用户悄悄决定:默认值决定了每个裸 agent() 调用花的是哪家 CLI 的额度和权限。

必须知道的行为

  • 上下文:每个 agent 接收自己的提示词;使用默认 source 目录的 agent 共享文件。 文件修改需要分开时,请选择 worktree 隔离。
  • 工作区:agent 直接在本次运行的 source 目录(--source,默认当前目录)里 工作——与 Claude Code 自带 Workflow 工具同语义。需要隔离时按 agent 传 isolation: "worktree":agent 获得一个一次性 git worktree(要求 source 是有至少一次提交的 git 仓库;agent 看到的是 HEAD,不含未提交改动)。临时工作区 随后会被删除,改动不会自动合并。agent() 返回回复而非 diff;需要保留的交付物应放进 回复,或在清理前显式持久化。
  • 成本:并发有上限(默认 min(16, cpu核数-2)),单次运行总派发量有硬兜底;超出 预期时用 odw pause / odw stop。
  • 结果:引擎不会替你 commit、push 或应用 diff。先检视 return 值,再决定下一步。

常见错误

错误纠正
在脚本里 import 原语或其他模块原语是注入全局;任何额外的顶层 import/export 都会被加载器拒绝。
meta 里用了变量、展开或函数调用meta 必须是纯字面量。
将 parallel/pipeline 中所有失败等同处理可恢复失败变 null;停止、预算耗尽和派发上限错误会中止。要求完整交付时须重试缺失结果或报告失败,仅允许部分结果时才过滤。
按"哪个 agent 先跑完"来分支破坏可复现性;归并要保持顺序无关。
用了 validate() 还指望脚本跑在 Claude Code 上validate 是 ODW 扩展,只能在 odw 上运行。

© xz1220, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/open-dynamic-workflows/zh-CN of xz1220/open-dynamic-workflows.

  • SKILL.md
  • references/adapters.md
  • references/primitives.md

Open the folder on GitHubat commit 16f57ee

Compare with similar skills

Open Dynamic Workflows next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Open Dynamic Workflows compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Open Dynamic Workflows this skillxz1220/open-dynamic-workflows104—~1.1kAutomated safety check: PassMIT
Subagentethanhq/cc-fleet215—~4.9kAutomated safety check: PassApache-2.0
Subagentethanhq/cc-fleet215—~4.3kAutomated safety check: PassApache-2.0
Kimi Code DelegationCherryHQ/cherry-studio52k1 repos~504Automated safety check: PassAGPL-3.0
Crossreviewcoddy-project/coddy-agent167—~3.3kAutomated safety check: PassMIT
Dynamic WorkflowsPostHog/code179—~2.3kAutomated safety check: PassMIT

Similar skills

  • Subagent

    ethanhq/cc-fleet

    Fan out a one-shot or flat parallel batch of cc-fleet PROVIDER subagents (headless cc-fleet subagent) that return a result — DeepSeek / GLM / Kimi / Qwen / MiniMax, or a Codex/Claude subscription.

    215 GitHub stars~4.9k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Subagent

    ethanhq/cc-fleet

    Run a one-shot or flat parallel batch of provider LLM subagents (headless cc-fleet subagent) that return a result.

    215 GitHub stars~4.3k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Kimi Code Delegation

    CherryHQ/cherry-studio

    Delegates one bounded repository task to Kimi Code in non-interactive prompt mode and reads back the final result from its JSON event stream.

    52k GitHub starsUsed in 1 repo~504 tokens
    Agent WorkflowsAuto-check passed
  • Crossreview

    coddy-project/coddy-agent

    Run when the user invokes /crossreview (or /crossreview:setup to choose the reviewers) or asks for a cross-review, a quorum review or a second opinion from other agents or models: fan a code review…

    167 GitHub stars~3.3k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Dynamic Workflows

    PostHog/code

    Official

    How to write JavaScript workflow scripts for the workflow tool - fanning work out across many isolated subagents with agent(), parallel(), and pipeline(), then synthesizing one result.

    179 GitHub stars~2.3k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Qwen Code Delegation

    CherryHQ/cherry-studio

    Runs Qwen Code headlessly with JSON output for repository work, using restricted approvals and bounded turn limits, and never the --yolo flag.

    52k GitHub starsUsed in 1 repo~346 tokens
    Agent WorkflowsAuto-check passed

More from xz1220/open-dynamic-workflows

  • Open Dynamic Workflows

    xz1220/open-dynamic-workflows

    Write and run dynamic workflows: short JavaScript scripts in Claude Code's workflow dialect, run with the odw CLI outside the host agent's context, fanning subtasks out to coding-agent CLIs (Codex…

    104 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Ultra Mode

    xz1220/open-dynamic-workflows

    Execute explicitly authorized Ultracode / Ultra Mode requests: optimize for exhaustive, correct answers within the user's stated scope by using any available independent-work mechanism (ODW…

    104 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Ultra Mode

    xz1220/open-dynamic-workflows

    执行被显式授权的 Ultracode / Ultra Mode 请求:在用户给定范围内,把优化目标设为尽可能 详尽和正确,使用当前环境提供的任何独立工作机制(ODW workflow、子智能体、派发 worker、 并行工具任务)进行覆盖、验证和综合;只有完全没有这类机制时才使用串行多趟退化方案。

    104 GitHub stars~832 tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Open Dynamic Workflows

What does Open Dynamic Workflows do?

编写并运行 dynamic workflow:用 Claude Code 的 workflow 方言写一段简短的 JavaScript 脚本,再用 odw CLI 在宿主 agent 的上下文之外,把子任务扇出给 coding-agent CLI (Codex、Claude Code、Gemini、Qwen、Kimi 或自定义),后台跑完后只取回最终结果。. Open Dynamic Workflows is an agent skill from xz1220/open-dynamic-workflows.

When should I use Open Dynamic Workflows?

Open Dynamic Workflows fits situations like: tasks that involve Subagents.

How do I install Open Dynamic Workflows in Claude Code?

Run `npx skills add xz1220/open-dynamic-workflows --skill open-dynamic-workflows -a claude-code`. Or copy the skill folder (skills/open-dynamic-workflows/zh-CN in xz1220/open-dynamic-workflows) into .claude/skills/open-dynamic-workflows in your project. Claude Code loads it when a task matches its description.

How do I install Open Dynamic Workflows in Codex?

Run `npx skills add xz1220/open-dynamic-workflows --skill open-dynamic-workflows -a codex`. Or copy the skill folder (skills/open-dynamic-workflows/zh-CN in xz1220/open-dynamic-workflows) into .agents/skills/open-dynamic-workflows in your project. Codex loads it when a task matches its description.

Can I use Open Dynamic Workflows in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xz1220/open-dynamic-workflows --skill open-dynamic-workflows -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/open-dynamic-workflows, .gemini/skills/open-dynamic-workflows, .github/skills/open-dynamic-workflows and .opencode/skills/open-dynamic-workflows in your project.

What does Open Dynamic Workflows need to run?

SKILL.md names no scripts, command-line tools or credentials: Open Dynamic Workflows is instructions for the agent only.

Does Open Dynamic Workflows access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Open Dynamic Workflows safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Open Dynamic Workflows use?

Open Dynamic Workflows is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Open Dynamic Workflows use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.9k tokens, read only when the agent opens those files.

What are the alternatives to Open Dynamic Workflows?

Skills that share tags, products or a category with Open Dynamic Workflows: Subagent (ethanhq/cc-fleet, 215 stars), Subagent (ethanhq/cc-fleet, 215 stars), Kimi Code Delegation (CherryHQ/cherry-studio, 52k stars) and Crossreview (coddy-project/coddy-agent, 167 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Open Dynamic Workflows?

xz1220 (a GitHub user) maintains it in xz1220/open-dynamic-workflows, which has 104 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on September 7, 2026.

Source: xz1220/open-dynamic-workflows on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.