moai-factory-foreman

moai-factory-foreman is a skill for Claude Code from modu-ai/moai-adk. It costs 75 tokens per session (2,969 once invoked), scanned A, original, Apache-2.0.

An unattended work-queue worker that takes the next selected task, gives it to an isolated worker, checks the result, and reports back. A queue is a list of pending tasks waiting to be handled.

In plain words
What is it for?
Use it to run repeated passes over a project backlog, dispatch work, collect evidence of completion, and report the outcome.
Why use it?
It keeps a project task loop moving without waiting for a person to answer routine questions, while recording tasks that genuinely need a decision as blocked.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Claude Code.

Good fit Use it to run repeated passes over a project backlog, dispatch work, collect evidence of completion, and report the outcome.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/modu-ai/moai-adk/moai-factory-foreman
About the project

MoAI-ADK is a Go-based harness that organizes and verifies Claude Code work across planning, implementation, synchronization, and review stages. Developers use it to structure agentic coding tasks, apply quality gates, and route work across language models, while the catalogue entries extend its workflow with skills, hooks, commands, MCP servers, instructions, and settings.

modu-ai/moai-adk · 1,232 stars · on GitHub · adk.mo.ai.kr

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.

Any agent
npx skills add modu-ai/moai-adk --skill moai-factory-foreman
Clone the repo
git clone --depth 1 https://github.com/modu-ai/moai-adk

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for moai-factory-foreman

README.md
[![agentmods](https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-factory-foreman/github.svg)](https://agentmods.dev/skills/modu-ai/moai-adk/moai-factory-foreman)
Your own site
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-factory-foreman"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-factory-foreman/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for moai-factory-foreman

Your own site · 80×15
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-factory-foreman"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-factory-foreman.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,969 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00075 $0.02969
Opus 5.5 $0.00030 $0.01188
Sonnet 5.5 $0.00015 $0.00594
Haiku 4.5 $0.00007 $0.00297

Measured 7d ago against content hash 3a38bfa7bdf1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

moai-factory-foreman 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 7d 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.

.claude/skills/moai-factory-foreman/SKILL.md · 223 lines

How it starts

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

Factory Foreman Loop Iteration

[HARD] Before the first action of a session running this skill, read BOTH role-gated rule files in full: .claude/rules/moai/workflow/factory-dispatch.md and .claude/rules/moai/workflow/cross-session-messaging.md. A Codex-only project deploys the same files under .moai/policies/ (for example .moai/policies/workflow/factory-dispatch.md) — read whichever layout this project carries. The always-loaded surface carries only their stubs; the dispatch protocol, the card classes, and the queue boundaries this loop consumes live in those two files.

One unattended pass of the factory foreman: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence, report. The queue surface is moai todo (the moai gtd spelling serves the same queue); the dispatch protocol and card classes live in the factory dispatch rule (.claude/rules/moai/workflow/factory-dispatch.md). foreman — an auxiliary role of the leader: the unattended watcher that dispatches the already-picked card to an isolated worker when no leader session is holding the queue.

Running unattended

AskUserQuestion is removed from the tool pool while this skill is active — that is the mechanical guarantee that the loop cannot stop and ask. Anything that would have been a question becomes a line in the iteration report, and anything that genuinely needs the operator's decision becomes a blocked card under Boundaries below.

Deployment: start a session in the project, run bare /loop, then background the session — loop tasks carry over to the background session and keep running without a terminal. Esc cancels the pending wakeup of a waiting loop. A recurring loop expires seven days after creation; restart it when the queue still needs a foreman. Background monitors do not survive a session resume — the first iteration after a resume re-arms the queue watch.

The session's permission settings must already allow what this loop uses (queue reads, git inspection, the worker spawn). A permission prompt that surfaces while unattended stalls the iteration until someone attaches; pre-approving that surface in project settings is the operator's setup step, not something this loop can do for itself.

Read the full file on GitHub · 223 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. 7d ago Changed · +3 lines 3a38bfa7bdf1
  2. 8d ago Changed faec904ffb47
  3. 10d ago First seen · 220 lines · 75 tokens per session scan A ea907915ed8a

Subscribe to this mod's changes

moai-factory-foreman is a skill published in the GitHub repository modu-ai/moai-adk (1,232 stars, last pushed yesterday), licensed Apache-2.0. It adds 75 tokens to every session and 2,969 once invoked, about $0.0003 per session on Opus 5.5. 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-10-06.