Guide · Agent skill
How to use the Workflow Script Authoring agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The workflow-authoring skill is a reference guide that teaches an AI coding agent how to write a script for Qwen Code's Workflow tool. The Workflow tool dispatches many subagents in parallel or in stages, which suits large jobs such as migrations, audits, and broad reviews. After this guide you will know how to install the skill, how to ask for help with a script, and which rules a script must follow.
Quick start
- 1Download the ZIP. Get the workflow-authoring ZIP from the skill page on this site.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use or into the project's .claude/skills/ folder for one project.
- 3Or upload it in the Claude apps. Open Settings, then Capabilities, then Skills, and upload the ZIP.
- 4Ask for a workflow in plain language. Describe the large, parallelizable task and say you want it run as a Workflow.
- 5Scout the work list first. Have the agent list files or read the failing test in the main loop before orchestration.
- 6Review the phases before approving. Check each phase title and detail in the approval dialog before you allow a run.
What the skill makes the agent do
Once installed, the agent knows the Workflow script API: agent(), parallel(), pipeline(), phase(), log(), workflow(), and the args and budget globals. It also knows the rules a script must follow and common patterns for verification and resuming.
The skill does not run anything and does not give permission to run a workflow. Whether a workflow may run is decided by the Workflow tool's own opt-in rule, which is separate from this skill.
- Script API reference: which globals exist and what each one does.
- agent() options such as label, schema, model, effort, isolation, and tools.
- Choosing between pipeline() and parallel() for a given job.
- Patterns for verification, convergence, and resuming a run.
Install the workflow-authoring skill
Download the ZIP from the skill page on this site. The skill package contains SKILL.md and SKILL.test.ts.
For a personal install, unzip the package into ~/.claude/skills/. For a single project, unzip it into the project's .claude/skills/ folder. To use it in the Claude apps instead, upload the ZIP under Settings, then Capabilities, then Skills.
- Personal: unzip into ~/.claude/skills/
- Project only: unzip into .claude/skills/ inside the project
- Claude apps: Settings → Capabilities → Skills, then upload
Trigger the skill with a natural request
Ask for the workflow in plain language and say what the work is. The skill is meant to load before the agent writes a script for a workflow you have already opted into, so mention that the Workflow tool is the route you want.
Scouting first works well. Ask the agent to list the files or read the failing test in the main loop, then ask it to write a workflow over that list.
- "Write a workflow script that audits each module under src/ for unsafe string concatenation."
- "List the files that call the old API, then write a workflow that migrates each one in its own worktree and verifies it."
- "Draft a workflow script for this review; I have opted in to run it once you show me the phases."
Follow the script rules the skill enforces
A script is plain JavaScript, not TypeScript, and cannot import anything. It runs in a sandbox with no filesystem, shell, network, or environment access, so file, network, and package work must happen inside an agent. Math.random() and every form of Date throw, so pass timestamps in through args. Pass thunks to parallel(), not eager agent calls. End every successful path with an explicit return.
- No dynamic import() anywhere in the script, even in an unused branch.
- Give every phase a detail, because the approval dialog shows it to the user.
- Each list passed to parallel() or pipeline() holds at most 4096 entries; split larger inputs into batches.
- Give each agent() a unique label so failures are easy to tell apart.
const thunks = files.map((file) => () => agent(`Summarize ${file}`)); let summaries = []; for (let i = 0; i < thunks.length; i += 4096) { summaries = summaries.concat(await parallel(thunks.slice(i, i + 4096))); }Know the safety notes before you run anything
The skill itself runs no scripts and uses no network. The scripts that a workflow runs are sandboxed, but the agents they dispatch do the real work through the prompts you give them. Say explicitly what each agent should read and whether it may edit files.
If a script breaks a rule, it is refused before it starts, so none of its agents runs. A schema agent that cannot be compiled resolves to null without starting.
- Scripts run in a node:vm sandbox with no filesystem, shell, network, or environment access.
- Agents with a schema must return results through structured_output; after three failed submissions the agent stops and resolves to null.
- Check results for null before using them.
Use the skill only where it fits
Parallelism adds cost without benefit for short sequences of edits. The skill says that work belongs in the main loop. Reach for a workflow when the job needs to be comprehensive, needs independent checks before an answer is committed, or is too large for one context, such as migrations, audits, or broad sweeps.
- Good fit: codebase migrations, audits, broad reviews, research sweeps.
- Poor fit: a few edits in a row, or a task you have not opted into running as a workflow.
What people use it for
- Migrating an API across many files, with each file transformed in its own worktree and then verified.
- Auditing a codebase by fanning out one reviewer per subsystem and merging findings into one map.
- Running a broad review where each finding is checked by a separate verifying agent.
- Writing a research sweep that gathers material in parallel and then synthesizes it in a later phase.
Frequently asked questions
How do I install the workflow-authoring skill?
Download the ZIP from the skill page, then unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps you can instead upload the ZIP under Settings, then Capabilities, then Skills.
Does the skill run workflows for me?
No. The skill is a reference for writing a script and does not authorize a run. Whether a workflow may run is decided by the Workflow tool's opt-in rule.
What do I need to use it?
You need Qwen Code with the Workflow tool enabled, and your explicit opt-in before any workflow runs. The skill does not use the network.
Is the workflow-authoring skill free?
The skill is licensed under Apache-2.0, as stated on its page. The source does not list pricing for it.
Why was my workflow script refused?
Common causes are a dynamic import() anywhere in the script, any call to Math.random() or Date, or passing eager agent calls to parallel() instead of thunks. A refused script starts none of its agents.
Can I use this skill outside Qwen Code?
The skill refers to Qwen Code-specific tool names and limits, so it may not behave the same in other runtimes. It is written for Qwen Code's Workflow tool.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits developers who already use Qwen Code's Workflow tool and want help writing correct, deterministic scripts for large, parallelizable jobs such as migrations or audits. It is a poor choice for short sequences of edits, for people who have not opted into the Workflow tool, or for runtimes other than Qwen Code.
Download the skill