Logo: Workflow

Workflow

Communautéit
mweinbach
workflow

Schreift a féiert en deterministesche Multi-Agent-Workflow aus — e JavaScript-Skript, dat Aufgaben op vill ënnergeuerdent Agents verdeelt, se a Pipelines verschafft, Schleefen duerchleeft a Resultater bewäert. Benotzt dëse Skill, wann d'Aarbecht sech a vill ähnlech Eenheeten opdeele léisst (all geännert Datei iwwerpréiwen, N Themen recherchéieren, M Call Sites migréieren), eng adversarial Verifikatioun oder e Jury-Panel néideg ass oder de Benotzer freet, „e Workflow ze benotzen“, „Agents op Aufgaben unzesetzen“ oder grëndlech ze schaffen. Benotzt en net fir eng eenzeg delegéiert Aufgab — spawnAgent ass méi bëlleg.

Iwwersiicht

Editeurmweinbach
Repositoryagent-coworker
Skill-Nummworkflow
Stären
156
Forks
14
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    mweinbach huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Workflow an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/mweinbach/agent-coworker/tree/main/skills/workflow
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mweinbach/agent-coworker.git /tmp/agent-coworker
mkdir -p .claude/skills
cp -r /tmp/agent-coworker/skills/workflow .claude/skills/workflow
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Workflow an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Workflow automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Workflow net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Workflows

A workflow is a script you write that orchestrates child agents in real code. The harness runs it in a sandbox and drives AgentControl from it.

The patterns below are available orchestration techniques, not mandatory review rounds. Respect the user's requested scope and task-specific review limits. Use additional discovery rounds for explicitly exhaustive work or when new evidence warrants them; ordinary PR feedback handling does not require discovery until dry.

Explicit user instructions override this skill's defaults within higher-priority instructions and enforced tool boundaries. Infer routine reversible details and finish the authorized workflow. If a requirement genuinely blocks progress, name this SKILL.md, quote the instruction, and explain the concrete decision needed. Keep handoffs and final results concise and readable.

When this is worth it

Reach for a workflow when the work is wide (many similar units) or needs structure (verify each finding independently, judge N candidates, loop until nothing new turns up). One workflow call replaces dozens of spawnAgent / waitForAgent calls and keeps their transcripts out of your context.

Do not use it for a single delegated task. spawnAgent is one call and has no sandbox to reason about.

Delegate independent units when it saves time or improves quality. Give each child context, constraints, and a concrete output; avoid overlapping edits and duplicate investigation. Use only agent roles and model overrides exposed by the harness. If delegation is unavailable, continue directly where possible and report any material coverage gap instead of repeatedly retrying the same failed route.

Reusable workflows

Call { action: "list" } to discover bundled and saved workflows. Run one by name:

json
{
  "name": "deep-research",
  "args": {
    "query": "Compare two migration approaches",
    "model": "provider:model-id",
    "verificationModel": "provider:stronger-model-id"
  }
}

Save a validated definition for the current project or every project:

json
{
  "action": "save",
  "name": "review-changes",
  "scope": "project",
  "script": "export const meta = ..."
}

Project workflows live in .cowork/workflows/; global workflows live in ~/.cowork/workflows/; bundled workflows ship with Cowork. Resolution order is project, global, bundled. A name is lowercase kebab-case and must match meta.name. Saving compiles and inspects metadata but does not run child agents. Existing files require an explicit overwrite: true.

The bundled deep-research workflow plans bounded questions, gathers structured source-backed claims, independently verifies every claim, and synthesizes only claims that survive. It reports failed shards, dropped claims, and uncertainties as coverage limitations and marks the result partial when coverage is incomplete. Use it for provider-agnostic deep research through the ordinary workflow harness: args.query is required, maxQuestions defaults to 5 and accepts 2–6, and maxClaimsPerQuestion defaults to 4 and accepts 1–4. Invalid depth arguments are rejected before any child agents spawn so bounded coverage is explicit rather than silently capped. Use args.model for the default child model, with optional plannerModel, researchModel, verificationModel, and synthesisModel phase overrides. Omit model args to inherit normal session/default routing.

The contract

Two exports, zero imports. Host functions arrive as the argument to the default export:

ts
export const meta = {
  name: "review-diff",
  description: "Review each changed file, then verify every finding.",
  phases: ["review", "verify"],
};

export default async function run({ agent, parallel, pipeline, phase, log, args, budget }) {
  phase("review");
  const findings = await pipeline(
    args.files,
    (file) => agent(`Review ${file} for correctness bugs.`, {
      label: `review:${file}`, phase: "review", agentType: "explorer",
      schema: {
        type: "object",
        properties: {
          bugs: {
            type: "array",
            items: {
              type: "object",
              properties: { line: { type: "number" }, claim: { type: "string" } },
              required: ["line", "claim"], additionalProperties: false,
            },
          },
        },
        required: ["bugs"], additionalProperties: false,
      },
    }),
    (review, file) => parallel(review.bugs.map((bug) => () =>
      agent(`Try to REFUTE this claim about ${file}:${bug.line}: ${bug.claim}`, {
        label: `verify:${file}:${bug.line}`, phase: "verify", onError: "null",
        schema: {
          type: "object",
          properties: { refuted: { type: "boolean" }, why: { type: "string" } },
          required: ["refuted", "why"], additionalProperties: false,
        },
      }).then((verdict) => ({ ...bug, file, verdict })))),
  );

  const real = compact(findings.flat()).filter((f) => f.verdict && !f.verdict.refuted);
  log(`${real.length} findings survived verification`);
  return { findings: real };
}

API

agent(prompt, opts?)One child agent. Returns final text, or a validated object when opts.schema is set.
parallel(thunks)Barrier — awaits all. A rejected thunk yields null.
pipeline(items, ...stages)Per-item stages, no barrier between them. Stages get (prev, originalItem, index).
judge(candidate, opts)n independent judges; aggregate: majority/unanimous/meanScore/worst.
compact(items)Drop nulls.
phase(title), log(msg)Progress. Titles must be in meta.phases.
args, budgetFrozen tool input; { total, spent(), remaining() } in USD.

agent() options: label, phase, schema, model, effort, agentType (default/explorer/research/worker/reviewer, or a profile ref), targetPaths, isolation + briefing, onError, timeoutMs.

Default to pipeline, not parallel

pipeline has no barrier between stages: item 2 can reach stage 3 while item 5 is still in stage 1. Wall-clock is the slowest single chain, not the sum of per-stage maxima.

A barrier is only correct when a stage genuinely needs every prior result at once — deduping across the whole set, or exiting early when the total is zero. It is not justified by "I need to flatten first" (do that inside a stage) or "the stages feel separate" (that is what pipeline models).

If you write const a = await parallel(...); const b = a.flat(); await parallel(b...) and the middle line has no cross-item dependency, it should have been a pipeline.

Patterns worth knowing

Adversarial verify. Ask verifiers to refute, not to confirm. Kill a finding when a majority refute it. This is what stops plausible-but-wrong results.

Perspective-diverse verify. When something can fail in more than one way, give each verifier a distinct lens (correctness, security, performance, does-it-repro) instead of N identical ones. Diversity catches what redundancy cannot.

Judge panel. Generate N independent attempts from different angles, score them, then synthesize from the winner while grafting the best ideas from the rest. Beats one-attempt-iterated when the solution space is wide.

Loop-until-dry. For explicitly requested exhaustive, unknown-size discovery, keep going until K consecutive rounds surface nothing new. Dedupe against everything seen, not against what was confirmed — otherwise rejected items reappear every round and it never converges.

ts
const seen = new Set(); const confirmed = []; let dry = 0;
while (dry < 2) {
  const fresh = compact(await parallel(FINDERS.map((f) => () => agent(f))))
    .flatMap((r) => r.items).filter((i) => !seen.has(key(i)));
  if (!fresh.length) { dry++; continue; }
  dry = 0; fresh.forEach((i) => seen.add(key(i)));
  confirmed.push(...fresh);
}

Budget-scaled depth. while (budget.total && budget.remaining() > 50_000) { ... }. Guard on budget.total — with no ceiling set, remaining() is Infinity.

No silent caps. If you bound coverage (top-N, sampling, no retry), log() what was dropped. Silent truncation reads as "covered everything" when it did not.

Rules the sandbox enforces

  • No imports, no require, no eval. Everything is the default export's argument.
  • meta must be a pure literal — no variables, calls, or interpolation.
  • Date.now(), new Date() and Math.random() throw. They would break run resume. new Date(0) and the rest of Math work. Derive variation from args or the stage index instead.
  • onError defaults to "fail" — the promise rejects and you handle it. Use "null" to opt into null-coalescing, then compact().

Iterating

A script that does not compile comes back as { ok: false, issues } — fix it and call again, no spend. Use dryRun: true to see the whole call graph and fan-out count before spending anything.

Use action: "save" after the definition compiles when a reusable saved workflow is requested. An inline { script } remains best for one-off orchestration.

If a run fails partway, pass resumeFromRunId with the previous run id: every call that is byte-for-byte identical replays from the journal for free, and only what actually changed re-runs.

Scale to the ask

"Find any bugs" → a few finders, single-vote verify. "Audit this thoroughly" or "be comprehensive" → a larger finder pool, 3–5 vote adversarial verification, and a synthesis stage. Lean toward thoroughness for review/audit/research, and toward brevity for quick checks.

Once the requested coverage and required checks pass, deliver the result. Repeat or expand verification only for new changes, failures, or unresolved concerns. Do not add tests that only mirror reversible, low-impact implementation details.

Heefeg gestallte Froen

Wat mécht de KI-Skill Workflow?

Schreift a féiert en deterministesche Multi-Agent-Workflow aus — e JavaScript-Skript, dat Aufgaben op vill ënnergeuerdent Agents verdeelt, se a Pipelines verschafft, Schleefen duerchleeft a Resultater bewäert. Benotzt dëse Skill, wann d'Aarbecht sech a vill ähnlech Eenheeten opdeele léisst (all geännert Datei iwwerpréiwen, N Themen recherchéieren, M Call Sites migréieren), eng adversarial Verifikatioun oder e Jury-Panel néideg ass oder de Benotzer freet, „e Workflow ze benotzen“, „Agents op Aufgaben unzesetzen“ oder grëndlech ze schaffen. Benotzt en net fir eng eenzeg delegéiert Aufgab — sp...

Firwat Workflow op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Workflow besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Workflow an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/mweinbach/agent-coworker/tree/main/skills/workflow an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Workflow benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Workflow benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Workflow domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Workflow gratis?

mweinbach huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇