Open Dynamic Workflows
xz1220/open-dynamic-workflows
编写并运行 dynamic workflow:用 Claude Code 的 workflow 方言写一段简短的 JavaScript 脚本,再用 odw CLI 在宿主 agent 的上下文之外,把子任务扇出给 coding-agent CLI (Codex、Claude Code、Gemini、Qwen、Kimi 或自定义),后台跑完后只取回最终结果。
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.
$ npx skills add PostHog/code --skill dynamic-workflows -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PostHog/code dynamic-workflows --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/harness/src/extensions/workflow/skills/dynamic-workflows .claude/skills/dynamic-workflows && rm -rf skills-srcUse ~/.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/
Install the "dynamic-workflows" agent skill from https://github.com/PostHog/code/tree/main/packages/harness/src/extensions/workflow/skills/dynamic-workflows into .claude/skills/dynamic-workflows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dynamic-workflows", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PostHog/code/tree/main/packages/harness/src/extensions/workflow/skills/dynamic-workflowsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PostHog/code --skill dynamic-workflows -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PostHog/code dynamic-workflows --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/packages/harness/src/extensions/workflow/skills/dynamic-workflows .agents/skills/dynamic-workflows && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "dynamic-workflows" agent skill from https://github.com/PostHog/code/tree/main/packages/harness/src/extensions/workflow/skills/dynamic-workflows into .agents/skills/dynamic-workflows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dynamic-workflows", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PostHog/code --skill dynamic-workflows -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PostHog/code dynamic-workflows --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/packages/harness/src/extensions/workflow/skills/dynamic-workflows .cursor/skills/dynamic-workflows && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "dynamic-workflows" agent skill from https://github.com/PostHog/code/tree/main/packages/harness/src/extensions/workflow/skills/dynamic-workflows into .cursor/skills/dynamic-workflows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dynamic-workflows", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PostHog/code.git --path packages/harness/src/extensions/workflow/skills/dynamic-workflows--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PostHog/code --skill dynamic-workflows -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PostHog/code dynamic-workflows --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/packages/harness/src/extensions/workflow/skills/dynamic-workflows .gemini/skills/dynamic-workflows && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "dynamic-workflows" agent skill from https://github.com/PostHog/code/tree/main/packages/harness/src/extensions/workflow/skills/dynamic-workflows into .gemini/skills/dynamic-workflows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dynamic-workflows", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PostHog/code dynamic-workflowsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PostHog/code --skill dynamic-workflows -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .github/skills && cp -r skills-src/packages/harness/src/extensions/workflow/skills/dynamic-workflows .github/skills/dynamic-workflows && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "dynamic-workflows" agent skill from https://github.com/PostHog/code/tree/main/packages/harness/src/extensions/workflow/skills/dynamic-workflows into .github/skills/dynamic-workflows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dynamic-workflows", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PostHog/code --skill dynamic-workflows -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PostHog/code dynamic-workflows --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/packages/harness/src/extensions/workflow/skills/dynamic-workflows .opencode/skills/dynamic-workflows && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "dynamic-workflows" agent skill from https://github.com/PostHog/code/tree/main/packages/harness/src/extensions/workflow/skills/dynamic-workflows into .opencode/skills/dynamic-workflows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dynamic-workflows", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
dynamic-workflowsHow 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.
Dynamic Workflows is an agent skill from PostHog/code, published by the product's own GitHub organization. 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. Use when a task decomposes into several independent investigations or changes (codebase audits, many-file analysis, wide research, multi-perspective review, applying the same edit across many independent files).
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Agent Workflows, covering Subagents. It works with JavaScript. The repository describes itself as: The era of self-driving development is here. The licence is MIT.
Read from SKILL.md and the folder at commit a4c32df. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Dynamic Workflows loads about 2.3k tokens when it runs. Until then it costs about 104 tokens; SKILL.md has 925 words of instructions outside code blocks.
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.
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.
The full file from PostHog/code at commit a4c32df, republished under its MIT licence (© PostHog). 925 words, ~2,250 tokens.
.claude/skills/dynamic-workflows/SKILL.md (or your agent's skills folder).The workflow tool executes a JavaScript orchestration script you write. The script
holds the loop, branching, and intermediate results; each agent() call runs one
isolated subagent in its own pi process; only the script's return value comes back
into your context. This is how you audit 20 files, research 8 topics, or apply the
same change across 20 independent files without burning your own context window on
the intermediate output.
Do not use it for: a single question or a single edit (use subagent or just do
it directly), one or two parallel tasks (use subagent parallel mode), or work
needing your full conversation context.
Prefer the strict declared-plan contract below. Strict mode turns on only when
meta.phases is a literal object the runtime can read without executing code;
older/dynamic scripts keep their legacy behavior. Do not set token budgets: choose
only the appropriate persona/model tier and let the host account actual usage.
export const meta = {
name: 'audit_routes',
goal: 'Produce a decision-ready router audit',
inputs: ['repository'],
phases: [
{ title: 'Scan', goal: 'Map routers', inputs: ['repository'], produces: ['router inventory'] },
{ title: 'Audit', goal: 'Check the inventory', inputs: ['router inventory'], produces: ['router audits'] },
{ title: 'Synthesize', goal: 'Deliver the verdict', inputs: ['router audits'], produces: ['audit verdict'] },
],
synthesis: { phase: 'Synthesize', inputs: ['router audits'], produces: ['audit verdict'] },
}
phase('Scan')
const inventory = await agent(
'List every *.router.ts file under packages/host-router/src/routers. Reply with only JSON.',
{
label: 'route inventory',
objective: 'Produce the complete router inventory for the audit.',
inputs: ['repository'],
produces: 'router inventory',
schema: { type: 'object', required: ['files'], properties: { files: { type: 'array', items: { type: 'string' } } } },
},
)
if (!inventory) return { ok: false, error: 'inventory failed' }
phase('Audit')
const audits = await agent(
'Audit the router inventory against the one-line-forward rule. Return every violation as JSON.',
{ label: 'router audit', objective: 'Audit all discovered routers for inline logic.', inputs: ['router inventory'], produces: 'router audits', schema: { type: 'object', required: ['violations'] } },
)
phase('Synthesize')
const verdict = await agent(
'Summarize the supplied router audits into {ok, violations: [...]}. Reply with only JSON.',
{ label: 'final verdict', agent: 'Plan', objective: 'Create the final decision-ready audit report.', inputs: ['router audits'], produces: 'audit verdict', schema: { type: 'object', required: ['ok', 'violations'] } },
)
return verdictIn strict mode, activate declared phases exactly in order; agent inputs are artifact-name arrays (not inline records), every declared phase output must be published exactly once (an agent automatically publishes its declared produces, or use publish(name, value) for aggregates), and the final synthesis phase must publish its named final artifact. Give every phase a goal, every agent a unique label and objective, and all real handoffs named inputs/outputs.
Rules: plain JavaScript (no TypeScript, no import/require); the leading
export const meta = { name, description } is optional but conventional; the script
must call agent() at least once; the return value must be JSON-serializable (a
common mistake is returning an unawaited agent() promise).
| Global | Behavior |
|---|---|
agent(prompt, opts) | Runs one subagent; resolves to its final text, or the parsed+shape-checked object when opts.schema is set, or null on failure. Opts: label (short, unique - drives the live display), objective (responsibility), inputs (artifact-name strings or a record of named string values), produces (one artifact name), agent ('Explore' default, 'Plan', or 'General'), schema (plain JSON Schema), cwd, model (tier keyword, see below). |
parallel(thunks) | await parallel(items.map(i => () => agent(...))) - functions, not promises. Results in input order; failed branches are null. |
pipeline(items, ...stages) | Fans items through sequential stages (map → verify → summarize). Items run concurrently; each item's stages run in order; each stage receives (previousValue, originalItem, index). A failed stage nulls that item's slot. |
phase(title, meta?) | Marks a new stage of work for the live progress display. Prefer phase('Audit', { goal: '...', inputs: ['inventory'], produces: ['findings'] }) so the upcoming plan and dependencies are visible before it runs. goal, inputs, and produces are optional; dynamic/conditional phases remain supported. |
log(message) | Appends a workflow-level log line (shown in the expanded view). |
parseJson(text) | Extracts JSON from an agent's text reply, tolerating fences and surrounding prose. Prefer schema on agent() instead. |
args | The JSON value passed in the tool call's args parameter. |
cwd | The workflow's working directory (string). |
Limits: 8 agents run concurrently, 256 per workflow. require, fs, fetch, and
timers are unavailable inside the script - all real work happens inside subagents.
| Agent | Capability | Model (default) | Use for |
|---|---|---|---|
Explore (default) | Read-only | Fast/cheap | Recon, per-item checks, broad search |
Plan | Read-only | Inherits your model | Judgment-heavy planning or synthesis |
General | Read-write | Inherits your model | The actual edits an investigation identified, or any fan-out that needs real changes |
Only General edits files. Reach for it when a change is mechanical/independent
enough to parallelize (e.g. the same fix across many files) rather than applying every
edit yourself after the workflow returns.
agent()'s model option picks a different model than the persona's own default for
just that call, using a tier keyword, not a guessed exact model id (the available
model list changes over time, so a literal id can silently be wrong):
'strong' - the best available model. Use for a genuinely hard General edit or a
judgment call worth spending more on.'medium' - a solid mid-tier model.'cheap' - fast and cheap. Use to bump a Plan/General call down for something
simple, or to run more Explore-style recon than the default budget would allow.Omit model entirely to use the persona's own default (most calls should).
await agent('Investigate whether this auth check has a bypass.', { agent: 'Plan', model: 'strong', label: 'auth bypass check' })A failed agent() / parallel() branch / pipeline() item becomes null plus a log
line; the rest of the workflow continues. Always check for nulls before
synthesizing - audits.filter(Boolean) or an explicit guard. Only aborts and script
bugs (unknown agent name, bad arguments, exceeding limits) fail the whole workflow.
objective,
inputs, and produces to each agent call: they add a concise child context block
and let the live workflow show responsibility and downstream artifact use.schema whenever an agent's output feeds a later stage; use free text only for
the final human-readable synthesis. Define a schema once in a const and reuse it
across parallel agents instead of repeating large nested object literals.Explore for recon and per-item checks, Plan for judgment-heavy
synthesis, and General only for the calls that actually need to write files.© PostHog, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in packages/harness/src/extensions/workflow/skills/dynamic-workflows of PostHog/code.
Open the folder on GitHubat commit a4c32df
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Dynamic Workflows this skillPostHog/code | 179 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Open Dynamic Workflowsxz1220/open-dynamic-workflows | 104 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Run Workflowginlix-ai/LangAlpha | 1.8k | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Claude Code Agent Developmentanthropics/claude-plugins-official | 37k | 8 repos | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| Subagent Driven DevelopmentAsvarox/allkaraoke | 261 | 37 repos | ~1.2k | Automated safety check: Pass | None | |
| Dispatching Parallel Agentsultralisp/ultralisp | 258 | 40 repos | ~1.5k | Automated safety check: Pass | None |
xz1220/open-dynamic-workflows
编写并运行 dynamic workflow:用 Claude Code 的 workflow 方言写一段简短的 JavaScript 脚本,再用 odw CLI 在宿主 agent 的上下文之外,把子任务扇出给 coding-agent CLI (Codex、Claude Code、Gemini、Qwen、Kimi 或自定义),后台跑完后只取回最终结果。
ginlix-ai/LangAlpha
Orchestrate parallel subagent pipelines from a JavaScript workflow script.
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
Asvarox/allkaraoke
A skill your agent uses when executing implementation plans with independent tasks in the current session
ultralisp/ultralisp
A skill your agent uses when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
getpaseo/paseo
Launches one separate agent through Paseo to give a second opinion on the current task, with a self-contained briefing and no permission to edit files.
PostHog/code
How PostHog "canvas" dashboards work end-to-end — the two rendering tiers (json-render vs freeform React-in-iframe), the agent system prompts that steer each, and the RIGHT way to fetch PostHog data…
PostHog/code
Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent.
PostHog/code
Merge a PR into main through the Trunk merge queue and babysit it until it lands.
PostHog/code
Add, replace, and optimize the looping demo videos in the onboarding "welcome" bento grid (packages/ui/src/features/onboarding).
PostHog/code
Edit the @posthog/quill design system locally and consume the change in this repo (posthog-code) before it is published to npm.
PostHog/code
Write Storybook stories for PostHog UI components. An agent skill from PostHog/code.
Works with
Categories
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. Dynamic Workflows is an agent skill from PostHog/code, published by the product's own GitHub organization. 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.
Dynamic Workflows fits situations like: A task decomposes into several independent investigations; changes (codebase audits; many-file analysis; multi-perspective review.
Run `npx skills add PostHog/code --skill dynamic-workflows -a claude-code`. Or copy the skill folder (packages/harness/src/extensions/workflow/skills/dynamic-workflows in PostHog/code) into .claude/skills/dynamic-workflows in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PostHog/code --skill dynamic-workflows -a codex`. Or copy the skill folder (packages/harness/src/extensions/workflow/skills/dynamic-workflows in PostHog/code) into .agents/skills/dynamic-workflows in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/code --skill 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/dynamic-workflows, .gemini/skills/dynamic-workflows, .github/skills/dynamic-workflows and .opencode/skills/dynamic-workflows in your project.
SKILL.md names no scripts, command-line tools or credentials: Dynamic Workflows is instructions for the agent only.
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.
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.
Dynamic Workflows is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Dynamic Workflows: Open Dynamic Workflows (xz1220/open-dynamic-workflows, 104 stars), Run Workflow (ginlix-ai/LangAlpha, 1.8k stars), Claude Code Agent Development (anthropics/claude-plugins-official, 37k stars) and Subagent Driven Development (Asvarox/allkaraoke, 261 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
PostHog (a GitHub organization, an official publisher) maintains it in PostHog/code, which has 179 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on August 5, 2026.
Source: PostHog/code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.