dynamic-workflows
Fungsinya
Skill ini memungkinkan AI menjalankan alur kerja khusus untuk tugas luas dan panjang, seperti audit besar atau riset, di mana banyak agent terpisah masing-masing menangani satu bagian. Ditujukan untuk pekerjaan yang terlalu besar untuk satu percakapan.
Kapan dipakai
- ✓Saat Anda memerlukan audit atau tinjauan atas banyak berkas, catatan, atau sistem.
- ✓Saat tugasnya cukup besar sehingga satu percakapan akan kehilangan detail.
- ✓Saat Anda ingin beberapa agent mencoba ide yang bersaing sebelum Anda memilih satu.
Link skill
https://github.com/PostHog/posthog/blob/master/packages/agent/packages/harness/src/extensions/orchestration/skills/dynamic-workflows/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Periksa semua artikel bantuan kami untuk mencari harga yang sudah usang, dan beri saya ringkasan singkat tentang apa yang perlu diperbaiki.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI menulis skrip kecil yang menjalankan banyak agent terfokus, yang masing-masing memiliki konteks baru. Skrip mengurutkan hasilnya, memeriksa apakah diperlukan pekerjaan tambahan, dan hanya mengembalikan ringkasan singkat kepada Anda.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Dynamic workflows
The workflow tool runs a JavaScript program that coordinates isolated subagents. Use the program as a task-specific harness: JavaScript owns iteration, routing, barriers, and completion checks, while each agent() call handles one focused unit of work in a fresh context window.
Only the script's return value enters the parent context. Intermediate results stay inside the workflow, while structured progress and logs remain visible in the tool call. End broad workflows with a compact synthesis instead of returning every worker transcript.
This separation is useful when one long conversation would make it hard to remain complete, impartial, or faithful to the original goal. It is not a default for ordinary work. More agents mean more latency and token use.
Decide whether a workflow earns its cost
Use a workflow when at least one of these is true:
- Breadth: the task covers many independent files, records, systems, claims, or alternatives.
- Structure: the work needs explicit stages, routing, aggregation, or a completion condition.
- Independent judgment: a result should be challenged by an agent that did not produce it.
- Competing approaches: several agents should attempt the same problem before a separate judge chooses.
- Unknown work size: the task should repeat until no unresolved items or new findings remain.
- Context isolation: each unit benefits from a clean context that contains only its evidence and rubric.
Good requests include:
- Audit every ingestion stage for one invariant, then verify each reported violation.
- Form independent explanations for a production symptom and try to disprove each one.
- Generate several migration plans, compare their risks, and return one tested recommendation.
- Classify a large issue backlog, deduplicate related reports, and prepare actions for confirmed groups.
- Check every factual statement in a technical report against primary evidence.
- Apply the same independent change across disjoint packages, then review the combined diff.
Do not use a workflow for:
- One question, one investigation, or one edit.
- One or two independent delegations. Use
subagentparallel mode instead. - Work where nearly all parent conversation context is essential.
- Several writers that would edit the same files or shared state concurrently.
- A routine task where direct execution is cheaper and easier to verify.
Define success before writing JavaScript
Write down these decisions first:
- Final outcome: what compact value must the workflow return?
- Work units: what list will the script iterate over?
- Evidence: what must each worker cite or return?
- Rubric: what makes an item pass, fail, rank higher, or require another pass?
- Coverage: how will the result prove that every required item was processed?
- Failure policy: which failures may become
null, and which must stop the workflow? - Write boundaries: which agents may edit, and can their files overlap?
Keep these decisions in JavaScript variables, schemas, and stop conditions. Do not rely on one agent to remember the whole plan across a large run.
Choose an orchestration pattern
Patterns compose. Use the smallest combination that creates a reliable feedback loop.
Classify and act
Use one agent to assign each item to a small set of categories, then route each category to a specialized prompt or agent.
Use it for mixed backlogs, heterogeneous files, and requests where not every item needs the same treatment. Keep classification structured and include an unknown route. Do not force uncertain items into a confident category.
Fan out and synthesize
Map independent items to agents, wait for all results, then give a bounded set of structured outputs to one synthesis agent.
Use it for broad audits, research, and repeated checks. The synthesis step is a barrier: it runs only after the fan-out settles. Return coverage and failures with the synthesis so missing work stays visible.
Adversarial verification
Separate production from judgment. A worker proposes a finding or change; another agent checks it against an explicit rubric and evidence.
Use it when false positives, unsupported claims, or self-review bias would be costly. A verifier must receive the original requirement and evidence, not only the worker's conclusion.
Generate and filter
Ask several agents for candidates, normalize and deduplicate them, then use a
Pertanyaan umum
Apakah ini berguna untuk tugas kecil?
Tidak. Banyak agent membutuhkan lebih banyak waktu dan token, sehingga gunakan ini hanya untuk pekerjaan yang luas atau sangat terstruktur.
Apakah saya akan melihat keluaran lengkap setiap agent?
Tidak. Hanya ringkasan akhir yang kembali ke percakapan Anda, meskipun kemajuan dan log tetap terlihat di panggilan alat.
Apakah alur kerja dapat memeriksa temuannya sendiri?
Ya. Alur kerja dapat menggunakan agent terpisah yang tidak menghasilkan temuan tersebut untuk menantangnya.
Detail
Deskripsi asli dari pembuat
Designs and runs task-specific JavaScript harnesses with the `workflow` tool. Use for broad, long-running, highly structured, or adversarial work that benefits from many isolated agents: exhaustive audits, root-cause investigations, research, large triage queues, competing proposals, repeated verification, and independent changes across disjoint files. Covers decomposition patterns, agent and model routing, structured handoffs, failure handling, and the workflow runtime API.
repo: PostHog/posthog
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6822
- Lisensi
- —
- Diperbarui
- 2/11/2026
Komentar
- …
Skill lain dari repositori ini
depot-ci
41kMembantu agent Anda menyiapkan dan menjalankan alur kerja Depot CI, alternatif GitHub Actions, termasuk memigrasikan alur kerja yang ada dan membaca log eksekusi.
depot-container-builds
41kMembantu agent Anda membangun image Docker di builder jarak jauh Depot, termasuk image multi-platform, pengiriman ke registry, dan perbaikan kegagalan build.
depot-github-runners
41kMembantu agent Anda memindahkan job GitHub Actions ke runner yang dikelola Depot, memilih ukuran dan label runner, serta memecahkan masalah pengaturan runner.
editing-agents-md
41kMembantu agent Anda memutuskan apakah sebuah aturan layak masuk ke berkas AGENTS.md atau CLAUDE.md, dan menulisnya agar tetap dipatuhi tanpa membuat berkas membengkak.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.