workflow-from-spec

workflow-from-spec is a command for coding agents from davepoon/buildwithclaude. It costs 18 tokens per session (765 once invoked), scanned A, original, MIT.

A command that designs a complete workflow for several AI agents from a plain-language description. It chooses between agents working in sequence, together, independently, or in repeated review cycles.

In plain words
What is it for?
Use it to plan multi-agent systems, select an orchestration pattern, and generate an implementation outline based on the required roles, tools, inputs, and outputs.
Why use it?
It turns an informal goal into a defined way for agents to divide work and pass results between one another.

Command

Part of the ag2-agent-builder plugin — 7 commands, 3 agents shipped together

About the project

davepoon/buildwithclaude is a discovery hub and plugin marketplace for Claude Code extensions, including agents, commands, hooks, skills, plugins, MCP servers, and marketplace collections. Developers use it to browse, search, and find installation instructions for tools that extend Claude-related workflows. Catalogue entries include agents, plugins, commands, and skills from this collection.

davepoon/buildwithclaude · 3,405 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/davepoon/buildwithclaude/workflow-from-spec
Clone the repo
git clone --depth 1 https://github.com/davepoon/buildwithclaude

Or install ag2-agent-builder, the plugin that ships this one along with the rest of its 7 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for workflow-from-spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/davepoon/buildwithclaude/workflow-from-spec.svg)](https://agentmods.dev/commands/davepoon/buildwithclaude/workflow-from-spec)
Your own site
<a href="https://agentmods.dev/commands/davepoon/buildwithclaude/workflow-from-spec"><img src="https://agentmods.dev/badge/commands/davepoon/buildwithclaude/workflow-from-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 765 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.00765
Opus 5 $0.00009 $0.00382
Sonnet 5 $0.00004 $0.00153
Haiku 4.5 $0.00002 $0.00076

Measured 5d ago against content hash 336e00a003de, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

workflow-from-spec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ag2-agent-builder/commands/workflow-from-spec.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are designing a complete AG2 multi-agent workflow from a user's specification.

Instructions

  1. Ask the user to describe their workflow goal in plain language. Then analyze:

    • How many distinct roles/specializations are needed?
    • Do agents need to collaborate (group chat) or work in sequence (pipeline)?
    • Does any agent need external tools or API access?
    • What's the expected input and output?
  2. Select the orchestration pattern:

Pattern Selection Guide

Scenario Pattern Why
Agents need to discuss and build on each other's ideas Group Chat (auto) LLM picks best next speaker
Fixed processing pipeline (A -> B -> C) Sequential Predictable flow
Each agent works independently, results merged Fan-out/Fan-in Parallel processing
One coordinator delegates to specialists Hub-and-spoke Central routing
Iterative refinement (draft -> review -> revise) Two-agent loop Focused improvement
  1. Generate the full implementation:

Two-Agent Loop (Iterative Refinement)

from autogen import ConversableAgent

creator = ConversableAgent(
    name="Creator",
    system_message="You draft content based on requirements. Incorporate feedback from the Reviewer.",
    llm_config={"model": "gpt-4o-mini"},
)

reviewer = ConversableAgent(
    name="Reviewer",
    system_message="""You review drafts critically.
- If the draft meets requirements, respond with: APPROVE
- Otherwise, provide specific, actionable feedback""",
    llm_config={"model": "gpt-4o-mini"},
)

result = creator.initiate_chat(
    reviewer,
    message="Create a [specification here]",
    max_turns=4,  # Max 2 revision cycles
)

Hub-and-Spoke (Coordinator + Specialists)

from autogen import ConversableAgent

coordinator = ConversableAgent(
    name="Coordinator",
    system_message="""You coordinate work between specialists.
- Analyze the request and determine which specialist(s) to engage
- Synthesize responses from specialists into a final answer
- Available specialists: [list them]""",
    llm_config={"model": "gpt-4o-mini"},
)

specialist_a = ConversableAgent(
    name="SpecialistA",
    system_message="You handle [domain A]. Respond only about your expertise.",
    llm_config={"model": "gpt-4o-mini"},
)

specialist_b = ConversableAgent(
    name="SpecialistB",
    system_message="You handle [domain B]. Respond only about your expertise.",
    llm_config={"model": "gpt-4o-mini"},
)

# Use nested chats for hub-and-spoke
coordinator.register_nested_chats(
    [
        {"recipient": specialist_a, "max_turns": 1, "summary_method": "last_msg"},
        {"recipient": specialist_b, "max_turns": 1, "summary_method": "last_msg"},
    ],
    trigger=lambda sender: True,  # Always consult specialists
)

Read the full file on GitHub · 102 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 102 lines · 18 tokens per session scan A 336e00a003de

Subscribe to this mod's changes

workflow-from-spec is a command published in the GitHub repository davepoon/buildwithclaude (3,405 stars, last pushed 4d ago), licensed MIT. It adds 18 tokens to every session and 765 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.