Herd Flowのロゴ

Herd Flow

コミュニティ
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.

Add to TypingMind

概要

公開者oscabriel
リポジトリskills
スキル名herd-flow
スター
62
フォーク
3
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    oscabrielがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Herd Flow」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/oscabriel/skills/tree/main/herd-flow
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでHerd Flowを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にHerd Flowを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Herd Flowは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでHerd Flowを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Herd Flowはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにHerd Flowをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/oscabriel/skills/tree/main/herd-flowを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Herd Flowを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Herd Flowで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもHerd Flowを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Herd Flow」は無料ですか?

はい。oscabrielがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇