workflow-authoring
できること
ワークフローのスクリプトを書くための参考資料です。並列と順次の手順、チェック、再開について説明します。移行や監査のような大きな作業を、再利用できるワークフローとして組み立てる人向けです。
使う場面
- ✓複数のエージェントに作業を分けるワークフローのスクリプトを書いているとき。
- ✓移行や監査のような大きな作業で、並列の手順とチェックが必要なとき。
- ✓手順を並列で実行するか、順番に実行するかを選ぶ必要があるとき。
スキルのリンク
https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/workflow-authoring/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このリポジトリのすべてのモジュールを並列で監査し、その結果をまとめるワークフローのスクリプトを書くのを手伝ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
参考資料は、スクリプトの構成、作業を分散するタイミング、結果の検証方法、結果のまとめ方を説明します。資料を読んだだけでは、ワークフローの実行は始まりません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Workflow authoring reference
Everything below is about writing the script. Whether a workflow may run at all is decided by the Workflow tool's own opt-in rule — this reference does not authorize a run.
Reach for one to be comprehensive (decompose the work and cover every part in parallel), to be confident (independent perspectives and adversarial checks before an answer is committed to), or to take on scale a single context cannot hold — migrations, audits, broad sweeps. The script is where that structure is encoded: what fans out, what verifies, what synthesizes. Parallelism on its own is not a reason; work that is already one short sequence of edits belongs in the main loop.
Scout first, then orchestrate
The strongest pattern is hybrid: discover the work list in the main loop (list the files, scope the diff, read the failing test), then hand that list to a workflow. You do not need to know the shape of the work before the task — only before the orchestration step. When the work has distinct phases, run several small workflows across turns and read each result before choosing the next, rather than authoring one large script that runs unattended.
Common single-phase shapes: understand (parallel readers over subsystems,
merged into one map), design (independent approaches, judged, then
synthesized), review (dimensions, find, verify each finding), research (broad
sweep, deep read, synthesis), migrate (discover sites, transform each under
isolation: 'worktree', verify).
Script contract
The source is wrapped as an async IIFE, so top-level await and a top-level
return are both legal — and a trailing expression is not a return value.
End every successful path with an explicit return.
It is plain JavaScript, not TypeScript, and it cannot import anything. A
script with a dynamic import() anywhere in it — even in a branch that never
runs — is refused before it starts, so none of its agents runs first; do file,
network, and package work inside an agent instead.
The script may start with a literal export const meta = {...} declaration
with name, description, and optionally whenToUse and
phases: [{ title, detail? }]. It must be a pure literal — no variables,
calls, or interpolation — and it is stripped before execution, so nothing in
the script body can read it. Fields outside that list are dropped. The
approval dialog prints the name, the description, and each phase title with
its detail as a one-line explanation beside it: give every phase a detail,
because for a run that may dispatch hundreds of agents it is what the user
reads before approving. In a workflow an extension ships, whenToUse also lists
the workflow for the model to start when a request matches it; leave it out and
the workflow runs only when someone asks for it by name.
Injected globals, and nothing else:
phase(title)— open a phase. Everything dispatched afterwards is attributed to it in the live phase tree, until the next phase opens.log(msg)— one line into the run log the user watches.agent(prompt, opts?)— dispatch one subagent. See agent() options.parallel(thunks)— run thunks through the shared concurrency window, resolving to a position-aligned array.parallel()itself rejects on invalid arguments.pipeline(items, ...stages)— run each item through the stages independently. See Default topipeline().workflow(nameOrRef, args?, { stepId }?)— run a saved workflow inline. See Saved workflows and workflow().args— the structured value the caller passed, orundefined.budget—{ total, spent(), remaining() }. See Scaling to the token budget.
Pass THUNKS to parallel(), not eager calls: parallel([() => agent(...)]),
not parallel([agent(...)]). The eager form is refused outright: a
non-function element rejects the whole batch, and by then every agent() in it
has already been admitted, counted against the caps, and spent — with its
result discarded.
Each list a single call takes — the thunks of parallel(), and the items and
the stages of pipeline() — holds at most 4096 entries. A longer list rejects
the whole call before any of its thunks or stages runs; it is never truncated.
Like any invalid argument, that rejection can be caught, and inside an outer
parallel()/pipeline() it becomes that slot's null. The limit is per call,
not per run: split a larger input into batches of thunks and await each in
turn. Batching does not
よくある質問
この資料を読むとワークフローが始まりますか?
いいえ。スクリプトの書き方を説明するもので、実行にはまだあなたの承認が必要です。
ワークフローを使うべきでないのはどんなときですか?
作業が短い一連の編集だけの場合は、通常の作業の流れで行う方が適しています。
作業を段階的に進めることはできますか?
はい。小さなワークフローを複数のターンに分けて実行し、次に進む前に各結果を確認するよう勧めています。
詳細
作者による元の説明
Reference for writing a Workflow tool script (script API and gotchas, agent() options, pipeline() vs parallel(), verification and convergence patterns, resume, worked example). Load before authoring a script for a workflow the user already opted into; it does not itself authorize running one.
repo: QwenLM/qwen-code
人気
- GitHubのスター
- 29k
- ランキング
- #9788
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
codegraph
29kエージェントが、索引化されたコードベースを、呼び出しグラフ、依存関係、デッドコード、ホットスポット、意味検索を通じて分析できるよう支援します。
qwen-code-claw
29kエージェントが、コードベースの理解、バグ修正、リファクタリング、新しいプロジェクトの生成などのコーディング作業を、Qwen Codeに任せられるよう支援します。
structured-debugging
29kエージェントに、難しいバグを段階的に調べる方法を教えます。仮説を立て、的を絞った確認を行い、検証して、修正の前に本当の原因を見つけます。
tmux-real-user-testing
29kエージェントが、tmux内でターミナルアプリを実際のユーザーのように試せるよう支援します。各操作の画面のスナップショットを付けた、読みやすい手順のログを保存します。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。