Skip to content

Guide · Agent skill

How to use the Minion Orchestrator agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

Minion Orchestrator is an agent skill that teaches an AI agent to hand long, parallel or fragile work to a background job queue called Minions, which is backed by Postgres, instead of running it inline in the chat. This guide explains what the skill changes, how to install it, how to trigger it with plain requests, and what it needs to run safely. By the end you will know when the agent should use the queue, how to check and steer its jobs, and which safety limits apply to shell commands.

Minion Orchestratorgarrytan/gbrain · MIT

Quick start

  1. 1Confirm prerequisites. Make sure the gbrain CLI and project, plus Postgres or PGLite, are set up. The skill does not work without them.
  2. 2Install the skill. Unzip the downloaded ZIP into ~/.claude/skills/ or a project's .claude/skills/, or upload it under Settings → Capabilities → Skills.
  3. 3Start a worker for shell jobs. Run gbrain jobs work --allow-shell-jobs, or set GBRAIN_ALLOW_SHELL_JOBS=1 on the worker, only on a queue you control.
  4. 4Verify the queue. Run gbrain jobs stats to confirm the worker is registered and consuming jobs.
  5. 5Ask the agent in plain words. Request background or parallel work, for example asking the agent to run a task in the background and report back.
  6. 6Monitor and steer. Ask what is running, check progress with get_job_progress, and pause, resume or cancel jobs as needed.

What the skill makes the agent do

Without this skill, an agent usually runs work directly in the session. If the session ends or the process dies, the work can be lost. The Minion Orchestrator skill tells the agent to submit durable work to the Minions queue instead. Jobs in that queue survive gateway restarts, and the agent can check on them, pause, resume, cancel or redirect them while they run.

The skill covers two kinds of job. Deterministic shell jobs run a command or script with no LLM reasoning loop, for example ETL steps or cron work. LLM subagent jobs run an agent on research or iterative tasks, and can fan out into several parallel streams.

  • Jobs survive gateway restart because they are stored in Postgres.
  • Every job reports structured progress and token accounting, and keeps session transcripts.
  • Running agents can be steered mid-flight with inbox messages.
  • Jobs can be paused, resumed or cancelled.
  • The skill also carries rules for confirming that a long result actually reached the user.

Install the skill (ZIP or Claude apps upload)

The skill is distributed as a ZIP from this page. The package contains a single file, SKILL.md. Unzip it into your personal skills folder, ~/.claude/skills/, or into a project's .claude/skills/ folder if you want the skill limited to one project.

If you use the Claude apps instead, open Settings, go to Capabilities, then Skills, and upload the ZIP there.

  • Personal install: unzip into ~/.claude/skills/
  • Project install: unzip into the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Set up the gbrain tooling the skill needs

The skill only works with the gbrain CLI and project (garrytan/gbrain) and a Postgres database, or PGLite for inline runs. Without that tooling the skill has nothing to submit jobs to. For shell jobs, a worker must be running with shell jobs explicitly allowed. The source describes two ways to do this: a flag on the command, or an environment variable on the worker.

Shell jobs are blocked by default. A worker started without the flag marks a shell job as dead immediately, and the error names the missing flag. A job that stays in waiting means no worker is running at all. After configuring, run the stats command to confirm the worker is consuming the queue.

  • Start the worker with: gbrain jobs work --allow-shell-jobs
  • Or export GBRAIN_ALLOW_SHELL_JOBS=1 on the worker. A .env file in the worker's directory cannot set it.
  • Check the queue with: gbrain jobs stats
  • Check worker supervision with: gbrain jobs supervisor status if jobs sit in waiting
gbrain jobs work --allow-shell-jobs

Trigger the skill with natural requests

You do not need to name the skill. The agent matches requests such as running something in the background, checking on an agent, or doing several tasks in parallel. The skill's trigger phrases include: submit a shell job, run in background, spawn agent, check on agent, what's running, steer agent, pause agent, resume agent, parallel tasks, fan out, long operation and durable execution.

If a request is unclear, the skill asks one question: whether you want a deterministic shell command job or an LLM agent job.

  • "Run this ETL script in the background and tell me when it finishes."
  • "What's running right now?"
  • "Check on the research agent and tell me its progress."
  • "Do these three research tasks in parallel."
  • "Pause the indexing agent and resume it after the restart."

Submit and monitor shell jobs

Shell jobs take their command as a JSON object passed to --params. The object has a cmd string or an argv array, plus cwd and optionally env. An operator or autopilot submits the job from the command line. The agent then monitors it. For a job that should finish in one go on PGLite, add --follow to run it inline.

Agents can observe shell jobs with list_jobs, get_job and get_job_progress, but cannot submit them over MCP. Submitting a shell job over MCP fails with a permission_denied error.

  • Command string form uses cmd, for example echo hello with an absolute cwd.
  • Argv form runs without shell expansion.
  • Other submit flags listed by --help include --queue, --priority, --delay, --max-attempts, --timeout-ms, --idempotency-key and --dry-run.
  • Monitor with list_jobs --name shell --status active, then get_job ID for exit code, stdout and stderr tails.
gbrain jobs submit shell --params '{"cmd":"echo hello","cwd":"/abs/path"}'

Choose between a shell job, a subagent, or inline work

The skill routes requests using a table. A plain command or script goes to a shell job. A request for research or reasoning goes to a subagent job. A single operation under about 30 seconds should usually run inline, because it is simpler. Anything expected to run longer than about two minutes goes through the durable execution steps, and parallel work of two or more streams uses a fan-out manifest or parent and child subagents.

Routing is governed by a project convention. The default is pain-triggered: native subagents are used first, and Minions are used once a specific problem appears. Routing through Minions for everything is opt-in.

  • Deterministic command: shell job
  • Research or iterative agent work: subagent job via gbrain agent run
  • Under about 30 seconds: inline first
  • Over about 2 minutes: durable execution ladder
  • Two or more parallel streams: fan-out

Confirm results reached you

The skill asks the agent to verify delivery, not just process exit. A swallowed completion message looks the same as a dead job from your side. A deadman check is a scheduled follow-up that confirms the result was reported to you. It is backup insurance, not a guarantee: the check can itself fail, so on the next turn the agent sweeps active and recent completed jobs for overdue results. Checkpoints are only trusted when their timestamps are fresh, since a stale checkpoint looks like a job still running.

  • Deadman checks are idempotent and check reported state first.
  • Recovery reports carry the job ID so duplicates can be spotted.
  • Compare checkpoint timestamps with gbrain jobs get ID.

What people use it for

  • Running a long ETL or data pipeline step in the background and checking its exit code and output later.
  • Scheduling cron-style scripts through an operator-submitted shell job.
  • Fanning out several research tasks to parallel subagents and monitoring each one.
  • Steering a running research agent with a new direction via an inbox message.
  • Resuming a multi-step pipeline after a restart instead of starting over.

Frequently asked questions

How do I install the minion-orchestrator skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.

Is the minion-orchestrator skill free?

The skill is listed under the MIT licence. Check the licence file in the gbrain project for the full terms, since this page does not state any price.

What does the skill require to work?

It needs the gbrain CLI and project, a Postgres database or PGLite for inline runs, and a running worker. Shell jobs also need the worker started with --allow-shell-jobs or GBRAIN_ALLOW_SHELL_JOBS=1.

Why does my shell job fail with an error about shell jobs?

The worker was started without shell jobs allowed, so it dead-letters shell jobs immediately and names the missing flag in the error. Restart the worker with gbrain jobs work --allow-shell-jobs. If jobs stay in waiting, no worker is running, so check gbrain jobs supervisor status.

Can the agent submit shell commands itself?

No. Shell job submission is CLI-only and an agent calling submit_job with the shell name over MCP gets a permission_denied error. The agent can observe shell jobs with get_job, list_jobs and get_job_progress, while an operator or autopilot submits them.

Is it safe to enable shell jobs on a shared queue?

Be careful. Enabling shell jobs lets arbitrary commands run on the worker, which is a remote code execution surface on a shared queue. Treat it as privileged infrastructure access and keep it tightly controlled.

When should I not use this skill?

Skip it for quick one-off commands under about 30 seconds, where running inline is simpler and safer. It is also a poor fit if you do not have gbrain and Postgres or PGLite set up.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use Minion Orchestrator if you already run the gbrain tooling and need long, parallel or restart-sensitive work to run durably and stay observable. Skip it for quick commands, for shared queues where you cannot tightly control shell access, or if you do not want to set up Postgres and gbrain.

Download the skill

Find exactly what
you're looking for