minion-orchestrator
Qué hace
Esta skill gestiona trabajos en segundo plano que siguen funcionando aunque la sesión se reinicie. Maneja tanto tareas de shell sencillas como tareas ejecutadas por subagentes de IA, y te permite consultar el progreso o pausarlas.
Cuándo usarla
- ✓Cuando quieres que una tarea larga siga ejecutándose en segundo plano incluso después de un reinicio.
- ✓Cuando quieres dividir un trabajo grande en muchas tareas paralelas y hacer seguimiento de ellas.
- ✓Cuando quieres pausar, reanudar o dirigir un trabajo que ya se está ejecutando.
Link de la skill
https://github.com/garrytan/gbrain/blob/master/plugin/skills/minion-orchestrator/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Ejecuta esta limpieza de datos como un trabajo en segundo plano que sobreviva a los reinicios, y déjame consultar su progreso más tarde.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente envía cada trabajo a una cola duradera guardada en Postgres. Registra el progreso y el uso de tokens, te permite enviar mensajes de dirección a los trabajos en curso e informa cuando se entregan los resultados.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Minion Orchestrator
Contract
Minions is a Postgres-native job queue for durable, observable background work. This single skill handles two lanes:
- Deterministic shell jobs (
gbrain jobs submit shell ...) - LLM subagent jobs (
gbrain agent run ...)
When to route to Minions: durable, observable work that must survive restarts,
fan out across many parallel tasks, or persist across sessions. Routing policy
is defined in skills/conventions/subagent-routing.md — the project default is
pain_triggered (native subagents first, Minions after specific pain signals
fire); Mode A (all-through-Minions) is opt-in.
Guarantees:
- Jobs survive gateway restart (Postgres-backed)
- Every job has structured progress, token accounting, and session transcripts
- Running agents can be steered mid-flight via inbox messages
- Jobs can be paused, resumed, or cancelled at any time
- Parent-child DAGs with configurable failure policies
Durable-execution doctrine (routing convention the agent follows — nothing mechanically enforces it; see "Durable execution" below):
- Operations expected to exceed ~2 minutes route through the capability ladder, never a bare background shell that dies with the session.
- A deadman check verifies the result was REPORTED to the user, not merely that the process exited — a swallowed completion event looks identical to a dead job from the user's side.
- The deadman is second-line insurance, not a delivery guarantee: it can
itself die before firing (scheduler restart, deleted entry). Backstop:
on the next turn, sweep
gbrain jobs list --status activeand recent completions for overdue work whose result never reached the user. - Deadman checks are idempotent. A double-fire, or a fire that races the normal completion report, produces silence — it checks reported-state first and tags any recovery report with the job ID so duplicates are detectable.
- A checkpoint or progress file is trusted only with a freshness check.
A stale checkpoint reads as "still running" forever; compare its
timestamp against the expected progress interval and against
gbrain jobs get <id>.
Route the Request: Shell Job vs Subagent
| Condition | Action |
|---|---|
| User asks for deterministic command/script run | Shell job (CLI: gbrain jobs submit shell ...) |
| User asks to "run in minions" + explicit command/argv | Shell job (CLI, --params with cmd or argv) |
| User asks for research/reasoning/iterative agent | Subagent job (CLI: gbrain agent run) |
| User asks to steer/pause/resume an agent | Subagent job lifecycle tools (MCP-callable) |
| Single simple operation under ~30s | Consider inline execution first |
| Needs restart durability/observability | Submit as Minion job |
| Operation expected to exceed ~2 minutes | Route through the Durable execution ladder (below) |
| Parallel work (2+ streams) | gbrain agent run --fanout-manifest or parent + child subagents |
If intent is ambiguous, ask one clarification: "Do you want a deterministic shell command job, or an LLM agent job?"
Shell Jobs (Deterministic Scripts)
Use for reproducible command execution, ETL steps, cron work, and scriptable tasks where no LLM reasoning loop is needed.
Preconditions (read before submitting your first shell job)
- The worker must be started with
gbrain jobs work --allow-shell-jobs(equivalentlyGBRAIN_ALLOW_SHELL_JOBS=1exported on the worker; a.envin the worker's directory cannot set it). The shell handler is always registered but guarded: an unflagged worker that claims a shell job dead-letters it immediately (UnrecoverableError, straight todead, no retries) with the flag named inerror_text. A job that sits inwaitingmeans NO worker is running at all — checkgbrain jobs supervisor status. Gate lives insrc/core/minions/handlers/shell.ts. - Security: flipping
GBRAIN_ALLOW_SHELL_JOBS=1authorizes arbitrary command execution on the worker. On a shared queue, this is a remote code execution surface. Treat as privileged infrastructure authorization. - Execution mode — pick one:
- Postgres + daemon:
gbrain jobs workruns a persistent worker that claims and executes jobs from the queue. - PGLite + --follow:
gbrain jobs submit ... --followruns inline. The daemon mode is not available on PGLite (exclusive file lock). Seedocs/guides/minions-shell-jobs.md.
- Postgres + daemon:
- MCP boundary: shell-job submission is CLI-only. `submit_job n
Preguntas frecuentes
¿Sobreviven los trabajos a un reinicio?
Sí. La cola se guarda en Postgres, así que los trabajos continúan después de reiniciar la pasarela.
¿Puedo cambiar un trabajo mientras se ejecuta?
Sí. Puedes enviar mensajes de dirección, pausar, reanudar o cancelar un trabajo.
¿Cuándo conviene usar un subagente normal?
Las reglas de enrutamiento prefieren primero los subagentes nativos y usan la cola solo cuando aparecen problemas concretos.
Detalles
Descripción original del autor
Unified Minions skill for both deterministic shell jobs and LLM subagent orchestration. Replaces the older `gbrain-jobs` routing intent. Use when: submitting gbrain jobs, shell/background tasks, spawning subagents, checking progress, steering running work, pausing/resuming, parallel fan-out. One durable, observable, steerable queue interface. Also carries the durable-execution doctrine for any operation expected to exceed ~2 minutes: capability ladder, deadman checks that verify the result was reported, and content-addressed stage checkpoints for expensive pipelines.
repo: garrytan/gbrain
Popularidad
- Estrellas en GitHub
- 31 mil
- Posición en el ranking
- #9306
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
gbrain
31 milPermite que tu agente busque en un cerebro compartido de conocimiento de la empresa datos sobre personas, proyectos y decisiones, y guarde notas duraderas en él.
brain-ingest-gate
31 milComprueba el contenido nuevo frente a un cerebro de conocimiento existente antes de añadirlo, para evitar duplicados y resolver primero las entidades nombradas.
brain-link-discipline
31 milHace que tu agente incluya un enlace que funcione a cada página del cerebro que menciona, en el mismo mensaje, para que puedas abrirla enseguida.
brain-ops
31 milOfrece a tu agente la rutina básica de un cerebro de conocimiento: consultar primero el contexto, guardar las notas explícitas con su fuente y enlazar páginas relacionadas.
Skills parecidas
add-model-provider
394 milPermite que tu agente conecte un nuevo proveedor de modelos de IA a OpenClaw con comandos de configuración seguros, mantenga las claves API fuera del texto plano y haga una prueba en vivo.
acp-router
394 milAyuda a tu agente a enviar una tarea a un asistente de programación como Claude Code o Cursor a través de OpenClaw, para que el trabajo se ejecute en esa herramienta.
browser-automation
394 milEnseña a tu agente a controlar páginas web paso a paso, incluidos los inicios de sesión, las pestañas y la recuperación cuando una página deja de responder.