massgen
Original:🇺🇸 English
Translated
2 scripts
Invoke MassGen's multi-agent system. Use when the user wants multiple AI agents on a task: writing, code, review, planning, specs, research, design, or any task where parallel iteration beats working alone.
2installs
Sourcemassgen/massgen
Added on
NPX Install
npx skill4agent add massgen/massgen massgenTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →MassGen Skill
Delegate tasks to your MassGen team.
Before You Launch
Check that a config exists:
bash
ls .massgen/config.yaml 2>/dev/null || ls ~/.config/massgen/config.yaml 2>/dev/nullIf no config exists, set one up:
- Default (browser): run — user picks models and keys in the browser
uv run massgen --web-quickstart - Headless: read — you discover available backends via
references/config_setup.md, check the user's API keys, discuss preferences, and generate config with--list-backends--quickstart --headless
If config exists — launch immediately. No need to ask questions first.
Important: Only Add What's Asked
Do NOT add extra flags unless the user explicitly requests them:
- No unless the user asks for diverse approaches
--personas - No unless the user wants detailed decomposition
--plan-depth deep - No unless the user wants speed over quality
--quick
The defaults are good. Let MassGen handle the rest.
Quick Dispatch
1. Detect Mode
| User Intent | CLI Flags |
|---|---|
| General task (write, build, research, design) | (default) |
| Review/critique existing work | |
| Plan a feature or project | |
| Plan and auto-execute | |
| Write requirements/spec | |
| Execute an existing plan | |
| Execute against an existing spec | |
2. Write Criteria
Always write opinionated evaluation criteria tailored to the task. Criteria
shape what agents produce, not just how they're scored. Save to a temp file and
pass via . Aim for 4-7 criteria.
--eval-criteriaRequired JSON format — each criterion needs , , and :
textcategoryanti_patternsjson
{
"aspiration": "A site a designer would screenshot for their portfolio",
"criteria": [
{
"text": "Design coherence: Does it feel authored or assembled? ...",
"category": "primary",
"anti_patterns": ["unmodified library defaults", "AI-generic aesthetics"]
},
{
"text": "Content depth: Every section teaches something specific ...",
"category": "standard",
"anti_patterns": ["Wikipedia-summary prose", "filler sections"]
}
]
}Categories: (ONE — where the model needs most push),
(must-pass), (nice-to-have). See for
full guidance on writing effective opinionated criteria.
primarystandardstretchreferences/criteria_guide.mdFor evaluate/plan/spec modes, you can use
instead of writing custom criteria (presets: , , ,
, , , ).
--checklist-criteria-presetevaluationplanningspecpersonadecompositionpromptanalysis3. Build Prompt
General: User's task with relevant context.
Evaluate: What to evaluate. Auto-gather git diff, changed files, test
output. Keep it factual — what was built, not your quality opinion. Let
agents discover issues independently.
Plan: Goal + constraints.
Spec: Problem statement + user needs + constraints.
4. Choose CWD Context
Default to when the task produces files. If the deliverable is a file
(code, docs, config, README, website, etc.), agents need write access. Use
only when agents need to read the codebase for context but their output is
pure text (an answer, review, or analysis) — not files.
rwro| Scenario | Flag |
|---|---|
| Task produces/modifies files in the project (code, docs, configs, etc.) | |
| Task needs codebase context but output is text only (review, analysis, Q&A) | |
| Isolated task, no codebase needed (default) | (omit flag) |
Rule of thumb: if the user says "write", "create", "build", "rewrite",
"update", or "edit" something in the project → .
rw5. Run
Always use the wrapper script:
bash
# Isolated task (default, no cwd-context needed)
bash "$SKILL_DIR/scripts/massgen_run.sh" \
--mode general \
--criteria /tmp/massgen_criteria.json \
"Create an SVG of a butterfly mixed with a panda"
# Task that writes to the project → rw
bash "$SKILL_DIR/scripts/massgen_run.sh" \
--mode general --cwd-context rw \
--criteria /tmp/massgen_criteria.json \
"Rewrite the README with better examples and structure"The wrapper includes by default. The run starts
immediately — the user can open http://localhost:8000/ anytime to monitor
progress. Tell the user about this URL.
--web --no-browserRun in the background. MassGen prints these for tracking:
- — full run data
LOG_DIR: <path> - — live status
STATUS: <path>/status.json - — winning agent's answer.txt
ANSWER: <path>
Expect 15-45 minutes for multi-round runs.
5b. Review Notification (when --cwd-context rw
)
--cwd-context rwWhen agents have write access (), automatically add
so the user can review git diffs before changes are applied.
Review requires (the wrapper's default).
--cwd-context rw--web-review--webHeadless (): If the user explicitly requests headless mode
with , skip — changes are applied directly
without a review gate. Warn the user that there will be no diff review.
--no-web--cwd-context rw--web-reviewAfter launching the MassGen run, also launch the review watcher in the
background. Parse from the MassGen output first:
LOG_DIRbash
# Launch the watcher (reads LOG_DIR from the MassGen run output)
bash "$SKILL_DIR/scripts/review_watcher.sh" "$LOG_DIR"The watcher polls and prints structured markers when review
is ready:
status.json__REVIEW_PENDING__
REVIEW_URL: http://localhost:8000/?v=2
REVIEW_API: http://localhost:8000/api/sessions/{id}/review-response
FILES_CHANGED: src/foo.py (M), src/bar.py (A)
__END_REVIEW_INFO__When you see , tell the user:
__REVIEW_PENDING__"MassGen has changes ready for review. You can open the WebUI to review diffs visually, or tell me which files to approve/reject."
Two resolution paths:
- Browser: User opens the REVIEW_URL and approves/rejects in the UI.
- Agent (text-based): Fetch diffs via , show the user a summary, then submit their decision:
GET /api/sessions/{id}/reviewbash# Approve all curl -X POST "$REVIEW_API" -H "Content-Type: application/json" \ -d '{"approved": true, "action": "approve"}' # Approve specific files curl -X POST "$REVIEW_API" -H "Content-Type: application/json" \ -d '{"approved": true, "approved_files": ["src/foo.py"]}' # Reject all curl -X POST "$REVIEW_API" -H "Content-Type: application/json" \ -d '{"approved": false, "action": "reject"}'
Either path resolves the review — the other side auto-closes. After
resolution, is printed.
__REVIEW_COMPLETE__ APPROVED=true|false6. Read Results
Read the path from the output. The winning agent's workspace is
always in the directory next to .
ANSWER:workspace/answer.txtWorkspace paths in are best-effort normalized to reference the
adjacent directory. However, always navigate to the
next to as the ground truth — not paths mentioned in the text.
answer.txtworkspace/workspace/answer.txtFor plan mode, is in the workspace.
For spec mode, is in the workspace.
project_plan.jsonproject_spec.jsonOptional Flags (only when requested)
| Flag | Purpose |
|---|---|
| One-shot, no voting/refinement |
| Decomposition depth: |
| Deeper strategic reasoning (default: |
| Agent diversity: |
| Give agents read access to codebase |
| Give agents write access to codebase |
| Enable WebUI for watching progress (on by default in wrapper) |
Config
MassGen auto-discovers config from or
. See setup instructions above.
.massgen/config.yaml~/.config/massgen/config.yamlReferences
Only consult when the quick dispatch isn't enough:
| File | When |
|---|---|
| Criteria format, tiers, examples |
| Headless config creation |
| Checkpoint loops, living documents, structured eval, plan-evaluate integration |