Herd Flow logo

Herd Flow

Community
oscabriel
herd-flow

Mandatory protocol for all pi (gpt-5.6-sol) delegation — one-off `pi` CLI calls and every workflow subagent (pi in a surfaced herdr pane via a sonnet bridge). Load BEFORE writing a Workflow script, spawning workflow workers, delegating to pi/gpt-5.6-sol, or driving herdr panes. Covers pi invocation, pane placement, report harvesting, and failure handling.

Overview

Publisheroscabriel
Repositoryskills
Skill nameherd-flow
Stars
62
Forks
3
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by oscabriel on GitHub. Read the source before you install it.

Installation

Install the Herd Flow AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/oscabriel/skills/tree/main/herd-flow
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/oscabriel/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/herd-flow .claude/skills/herd-flow
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Herd Flow in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Herd Flow on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Herd Flow is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

herd-flow: pi delegation through visible herdr panes

If invoked with arguments, treat them as the task to delegate: apply the routing reference below, then run the delegation protocol on that brief. If invoked bare, load this protocol and apply it to the work at hand.

Routing reference

Before writing a Workflow script or launching a dynamic workflow, read references/routing.md — the model-routing, reporting, and escalation rules this protocol operates under. This file covers HOW to run pi workers; the routing reference covers WHO does which work.

pi CLI mechanics

gpt-5.6-sol is only reachable via pi; Claude models run via the Agent/Workflow model parameter, never through pi. Default pi model: openai-codex/gpt-5.6-sol:low — an example of the author's setup; substitute the model configured in your pi environment, keeping the :low/:medium/:high thinking-suffix pattern. Calibration: staged pinned-contract implementation briefs (~1–2k lines, multi-package) run reliably at :medium (~15–30 min); keep :low for small mechanical tasks. Smoke-test with a one-line pi -p before fanning out a wave.

  • Implementation task (pi has read/bash/edit/write tools): pi --model openai-codex/gpt-5.6-sol:low --no-session -p "<self-contained prompt>"
  • Read-only investigation/review: add --tools read,grep,find,ls.
  • Harder problems: raise the thinking suffix, e.g. openai-codex/gpt-5.6-sol:high.
  • Attach files positionally before the message: pi ... -p @src/auth.ts "Review this."
  • Prompts must be fully self-contained — pi cannot see your conversation. State the goal, constraints, exact file paths, and expected output or diff format.
  • pi resolves ambiguity silently rather than flagging it — wherever correctness hinges on exact semantics, pin them to the letter; it will not ask.
  • After pi edits files, review the diff yourself before accepting.

Headless pi via Bash hard-caps at 10 minutes and a killed pi loses its work — reserve it for calls confidently under ~8 minutes; anything longer runs in a surfaced pane (protocol below). Workflow subagents never run headless.

Workflow subagents — the herdr bridge (MANDATORY for all workflow workers)

The Workflow model parameter only takes Claude models, so each worker is a thin Claude bridge (model: 'sonnet', effort: 'low', label prefixed pi:, schema on the bridge for structured output) driving pi in a visible herdr pane — never headless, never a bare Claude worker. Subagents inherit HERDR_ENV/HERDR_SOCKET_PATH from the head session; herdr push-reports pi status (working/blocked/idle).

Report-back instruction — append verbatim to every workflow pi prompt: "When finished, write your REPORT to : per-file summaries with function signatures added/removed/changed, plus your conclusions and anything you're unsure about. For read-only tasks (investigation, review, verification) skip the signature section and report your findings instead. Your report goes to the head orchestrator, who reviews and verifies your work after you finish — flag open questions rather than papering over them."

For long briefs, instruct pi to APPEND to the report file after each stage — a dead or blocked pi then leaves a harvestable trail instead of nothing.

Protocol (plain Bash; parse ids from JSON responses, never guess them):

  1. The HEAD splits, renames, and assigns all panes BEFORE spawning bridges — one split at a time (concurrent splits race the layout) — and bakes each pane id into its bridge's prompt: herdr pane split --pane "$HERDR_PANE_ID" --direction right|down --focus --cwd <dir> (--direction is required), then herdr pane rename <pane> <task>. Verify pane existence with herdr pane get <pane> — never herdr agent get, which queries the agent registry and returns agent_not_found for a bare shell pane; before pi is started that error is expected, not a missing pane. Wave panes spawn in the foreground (--focus); past ~4 agents, create one dedicated wave tab and build the grid there. Parallel implementers each get their own checkout via workflow isolation: 'worktree' or git worktree add — not herdr worktree create, which opens a whole new workspace.
  2. herdr pane run <pane> "pi --model openai-codex/gpt-5.6-sol:low --no-session", then herdr agent wait <pane> --status idle --timeout 30000 to confirm pi is up.
  3. herdr pane run <pane> "<task + report-back instruction>", wait --status working --timeout 20000 (guards against matching the pre-task idle), then wait for completion in a bounded loop: herdr agent wait <pane> --status idle --timeout 540000, re-issuing on timeout (idle also matches done; Bash calls cap at 10 min — never wait unbounded). Every wait runs as a FOREGROUND Bash call — never run_in_background, which ends your turn before pi finishes. working is not an end state: a slow pi is neither done nor blocked, so keep re-issuing the wait; a bridge may only report back once the agent is idle (harvest), blocked (failure handling below), or dead.
  4. Harvest and sanity-check the report file — pi's TUI runs on the alternate screen, so the report file is the source of truth (fallback: pane read --source visible).
  5. Close the pane (or wave tab) after harvest. Leave failed/blocked panes OPEN for inspection.

Failure handling:

  • blocked = pi needs input or gave up retrying. Read --source visible, then pane run a follow-up (same pi session, context intact) before rerunning from scratch, or report failure upward.
  • Once pi has been started, check herdr agent get <pane> before every pane run: a dead pi drops the pane back to a shell, and your text lands in the shell. agent_not_found at this stage means pi died; pre-launch it is normal (see step 1).
  • Agent/tab names must be unique; on workflow resume, adopt an existing pane instead of respawning.
  • Always target panes explicitly (--pane/--tab) — never the user's focused pane. --focus only when spawning; never steal focus on later commands.
  • Workflow token budgets count only Claude tokens; pi work is invisible to budget.spent().
  • HERDR_ENV unset is a blocker for workflow workers — tell the user and get their go-ahead before running headless.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Herd Flow AI skill do?

Mandatory protocol for all pi (gpt-5.6-sol) delegation — one-off `pi` CLI calls and every workflow subagent (pi in a surfaced herdr pane via a sonnet bridge). Load BEFORE writing a Workflow script, spawning workflow workers, delegating to pi/gpt-5.6-sol, or driving herdr panes. Covers pi invocation, pane placement, report harvesting, and failure handling.

Why use Herd Flow on TypingMind?

Because you install it once and use it with any model. Herd Flow is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Herd Flow in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/oscabriel/skills/tree/main/herd-flow. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Herd Flow?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Herd Flow?

As many as you like. As long as a model supports skills, you can use Herd Flow with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Herd Flow AI skill free?

Yes. It is published on GitHub by oscabriel under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇