agentflow

A workflow orchestrator that divides a complex request among several software agents, such as planners, coders, researchers, testers, and reviewers. It uses tmux, a tool for managing multiple terminal sessions, when available.

In plain words
What is it for?
Use it to plan, implement, review, and improve complex tasks that need several specialized roles.
Why use it?
It prevents one agent from creating and approving its own work, while repeated reviews help catch mistakes and missing information.

Command

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/rchgrav/claudebox/agentflow
Clone the repo
git clone --depth 1 https://github.com/RchGrav/claudebox
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,855 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.00000 $0.06855
Opus 5 $0.00000 $0.03427
Sonnet 5 $0.00000 $0.01371
Haiku 4.5 $0.00000 $0.00685

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

Security

Grade A, and why

agentflow 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 3d 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.

commands/agentflow.md · 313 lines

How it starts

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

Core Principles (informed by meta-prompting best practices and research):

  • Task Decomposition: Break the user’s request into clear phases and roles. Each agent is assigned a specific role (e.g. Planner, Coder, Researcher, Tester, Writer) so that complex tasks are handled by multiple experts.
  • Independent Verification: Use “fresh eyes” for review. Never allow the same agent to both create and verify an output – spawn a separate evaluator agent for critique and validation. This reduces biases and catches errors the original agent might miss.
  • Iterative Refinement: Implement feedback loops. After each phase, incorporate an evaluation step where an agent (or agents) score the output (0–100) and suggest improvements. Refine the work iteratively until quality standards are met (no major errors, high score). Don’t finalize results on a low score.
  • No Guessing / Clarify Uncertainty: Agents must disclaim or ask for input if information is missing or unsure. Hallucinations are the enemy – it’s better to get clarification (from the user or via a tool) than to assume false facts.
  • Tool Utilization: If specialized computation or external data is required, spawn an expert tool-using agent (e.g. an “Expert Python” to run code, an “Expert Researcher” to do web searches). Leverage the Model Context Protocol (MCP) to connect to external sources securely. For example: use a code execution tool to test and debug code outputs, or use a database/API connector to retrieve real data needed for the task.
  • Structured Outputs & SOP: All agents must produce output in a well-defined format (e.g. Markdown, JSON, etc. as appropriate) and save it to the designated files. Agents should treat prior agents’ outputs as authoritative inputs (like following a spec) to maintain consistency.
  • Memory & Context: Ensure every agent is provided the necessary context (user requirements, relevant outputs from previous steps). Maintain a shared memory of key facts/decisions so far. Agents should update this context if new information emerges. If an agent finds a discrepancy or confusion in context, they must pause and request clarification, not forge ahead incorrectly.
  • Parallelism with Coordination: Identify opportunities to run agents in parallel on independent subtasks to speed up execution. The orchestrator should manage parallel outputs and then use either an automatic consolidator agent or an integration step to merge results without conflict. Clearly specify any such synchronization points in the workflow.
  • Succinct Interaction: Only ask the user follow-up questions when absolutely necessary to proceed. The system’s job is to handle as much as possible autonomously once the requirements are clear. Keep communications with the user focused and concise. (The user primarily wants the final workflow and prompt files, not a prolonged chat.)

You must diligently follow these principles when creating the agentic workflow prompt. Your language should be directive (especially in the orchestrator’s instructions to agents) – use words like "MUST", "IMPORTANT", "ensure that", etc., to enforce compliance from each agent. Always favor clarity and explicitness over brevity in the prompt instructions, since ambiguity can lead to errors by the agents.

Ultimately, your output will be a set of files (prompts for orchestrator and agents, config, etc.) that define an agent loop the user can run on Claude Code. This meta-prompt guides the creation of those files.

Read the full file on GitHub · 313 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. 3d ago First seen · 313 lines · 0 tokens per session scan A b7d43059e501

Subscribe to this mod's changes

agentflow is a command published in the GitHub repository RchGrav/claudebox (1,142 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 6,855 tokens. 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.