/setup
Interactive project setup — detects your project, configures metaswarm, writes project-local files
Claude Code
$ npx -y skills add dsifry/metaswarm --skill setup --agent claude-code
Codex
$ npx skills add dsifry/metaswarm --skill setup -a codex -y
Cursor
$ npx skills add dsifry/metaswarm --skill setup -a cursor -y
Gemini CLI
$ npx skills add dsifry/metaswarm --skill setup -a gemini-cli -y
GitHub Copilot
$ npx skills add dsifry/metaswarm --skill setup -a github-copilot -y
OpenCode
$ npx skills add dsifry/metaswarm --skill setup -a opencode -y
Windsurf
$ npx skills add dsifry/metaswarm --skill setup -a windsurf -y
SKILL.md
setup.SKILL.mdname: setup
description: Interactive project setup — detects your project, configures metaswarm, writes project-local files
Setup
Interactive setup for metaswarm. Detects your stack, asks targeted questions, writes project-local files, and creates platform-appropriate instruction files and command shims. Replaces both `npx metaswarm init` and the old `/metaswarm-setup` command.
<CRITICAL-REQUIREMENTS> Setup MUST produce the mandatory outputs for the active platform. A shell script handles them automatically — you MUST run it.
After Phase 2 (user questions), determine the correct coverage command from the detection results, then run this Bash command:
PLUGIN_ROOT="${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${extensionPath:-}}}"
if [ -z "$PLUGIN_ROOT" ]; then
setup_script="$(find "${CODEX_HOME:-$HOME/.codex}/plugins/cache" -path '*/metaswarm/*/lib/setup-mandatory-files.sh' -print -quit 2>/dev/null)"
if [ -n "$setup_script" ]; then
PLUGIN_ROOT="$(cd "$(dirname "$setup_script")/.." && pwd)"
fi
fi
if [ -z "$PLUGIN_ROOT" ] && [ -f "$(pwd)/lib/setup-mandatory-files.sh" ]; then
PLUGIN_ROOT="$(pwd)"
fi
bash "${PLUGIN_ROOT}/lib/setup-mandatory-files.sh" "$(pwd)" <threshold> "<coverage-command>" --platform <platform> --reconfigureWhere:
- `<threshold>` is the user's chosen percentage (e.g., `100`)
- `<coverage-command>` is the enforcement command for their test runner:
- pytest → `"pytest --cov --cov-fail-under=<threshold>"`
- vitest/pnpm → `"pnpm vitest run --coverage"`
- jest/npm → `"npx jest --coverage"`
- go → `"go run .metaswarm/go-coverage-gate.go"` (`go test` has no threshold flag; the script writes this gate program, which runs `go test -coverprofile=coverage.out ./...` and fails below the thresholds in `.coverage-thresholds.json`)
- cargo → `"cargo tarpaulin --fail-under <threshold>"`
- `<platform>` is `codex`, `claude`, `gemini`, or `all`. Prefer:
- `codex` when running in Codex (`PLUGIN_ROOT` or `CODEX_HOME` is present, or the user invoked `$setup`)
- `claude` when running in Claude Code (`CLAUDE_PLUGIN_ROOT` is present, or the setup skill was invoked there)
- `gemini` when running in Gemini (`extensionPath` is present, or the setup skill was invoked there)
- `all` only when the user explicitly asks to configure every supported CLI
- `--reconfigure`: always pass it from interactive setup, so the user's answers apply even when `.coverage-thresholds.json` already exists (a re-run, or a first run after `npx metaswarm setup` copied the template). It updates the thresholds, a `--cov-fail-under`/`--fail-under` value in `enforcement.command` and an old bare `go test` command, and keeps every other setting. Only the session hook's self-heal omits it, so a silent background run never changes the file.
The script handles: 1. **Instruction file** — `AGENTS.md` for Codex, `CLAUDE.md` for Claude, `GEMINI.md` for Gemini; appends metaswarm section (or writes new), skips if already present 2. **`.coverage-thresholds.json`** — writes at project root with correct thresholds and command (with `--reconfigure`, updates an existing one). For Go it also writes `.metaswarm/go-coverage-gate.go` 3. **Claude command shims** — for Claude/all only, writes `.claude/commands/start-task.md`, `prime.md`, `review-design.md`, `self-reflect.md`, `pr-shepherd.md`, `brainstorm.md`
The script outputs JSON with what was created/skipped/warned/errored. Check that `"status": "ok"`, and show the user every entry in `warnings` (for example an `enforcement.command` that still embeds the old threshold).
**If the script is not available or fails**, fall back to writing these files manually with the Write tool. Do NOT skip them. </CRITICAL-REQUIREMENTS>
Pre-Flight
Existing Profile Check
Use Glob to check if `.metaswarm/project-profile.json` exists.
- **If it exists**: Read it, present the current configuration summary, and ask the user via AskUserQuestion: "You already have a metaswarm project profile. Re-run setup (overwrites choices) or skip?" Options: "Re-run setup" / "Skip". If the user skips, stop with: "Setup skipped. Existing configuration unchanged."
- **If it does not exist**: Continue to Project Detection.
---
Phase 1: Project Detection
Scan the project directory silently using Glob and Read. Do NOT ask the user for any of this information. Detect everything, then present results.
1.1 Language
Check for marker files at the project root:
| Marker File | Language | |---|---| | `package.json` | Node.js / JavaScript | | `tsconfig.json` | TypeScript (refines Node.js to TypeScript) | | `pyproject.toml` OR `setup.py` OR `requirements.txt` | Python | | `go.mod` | Go | | `Cargo.toml` | Rust | | `pom.xml` OR `build.gradle` OR `build.gradle.kts` | Java | | `Gemfile` | Ruby | | `Makefile` (alone, no other markers) | Unknown (ask user) |
If `tsconfig.json` exists alongside `package.json`, the language is "TypeScript".
If multiple languages are detected, note all of them but use the primary one (most infrastructure) for command generation.
**If no language detected**: Use AskUserQuestion to ask the user what language/stack they are using before proceeding.
1.2 Framework
**Node.js/TypeScript** — Read `package.json` and check `dependencies` + `devDependencies`:
| Dependency | Framework | |---|---| | `next` | Next.js | | `nuxt` OR `nuxt3` | Nuxt | | `@angular/core` | Angular | | `svelte` OR `@sveltejs/kit` | SvelteKit | | `react` (without next/nuxt) | React | | `vue` (without nuxt) | Vue | | `express` | Express | | `fastify` | Fastify | | `hono` | Hono | | `@nestjs/core` | NestJS |
**Python** — Check `pyproject.toml` or `requirements.txt` for: `fastapi`, `django`, `flask`.
**Go** — Read `go.mod` for: `github.com/gin-gonic/gin` (Gin), `github.com/labstack/echo` (Echo), `github.com/gofiber/fiber` (Fiber).
If no framework detected, set to `null`.
1.3 Package Manager (Node.js only)
| Lock File | Package Manager | |---|---| | `pnpm-lock.yaml` | pnpm
Read more
name: setup description: Interactive project setup — detects your project, configures metaswarm, writes project-local files
Setup
Interactive setup for metaswarm. Detects your stack, asks targeted questions, writes project-local files, and creates platform-appropriate instruction files and command shims. Replaces both `npx metaswarm init` and the old `/metaswarm-setup` command.
<CRITICAL-REQUIREMENTS> Setup MUST produce the mandatory outputs for the active platform. A shell script handles them automatically — you MUST run it.
After Phase 2 (user questions), determine the correct coverage command from the detection results, then run this Bash command:
PLUGIN_ROOT="${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${extensionPath:-}}}"
if [ -z "$PLUGIN_ROOT" ]; then
setup_script="$(find "${CODEX_HOME:-$HOME/.codex}/plugins/cache" -path '*/metaswarm/*/lib/setup-mandatory-files.sh' -print -quit 2>/dev/null)"
if [ -n "$setup_script" ]; then
PLUGIN_ROOT="$(cd "$(dirname "$setup_script")/.." && pwd)"
fi
fi
if [ -z "$PLUGIN_ROOT" ] && [ -f "$(pwd)/lib/setup-mandatory-files.sh" ]; then
PLUGIN_ROOT="$(pwd)"
fi
bash "${PLUGIN_ROOT}/lib/setup-mandatory-files.sh" "$(pwd)" <threshold> "<coverage-command>" --platform <platform> --reconfigureWhere:
- `<threshold>` is the user's chosen percentage (e.g., `100`)
- `<coverage-command>` is the enforcement command for their test runner:
- pytest → `"pytest --cov --cov-fail-under=<threshold>"`
- vitest/pnpm → `"pnpm vitest run --coverage"`
- jest/npm → `"npx jest --coverage"`
- go → `"go run .metaswarm/go-coverage-gate.go"` (`go test` has no threshold flag; the script writes this gate program, which runs `go test -coverprofile=coverage.out ./...` and fails below the thresholds in `.coverage-thresholds.json`)
- cargo → `"cargo tarpaulin --fail-under <threshold>"`
- `<platform>` is `codex`, `claude`, `gemini`, or `all`. Prefer:
- `codex` when running in Codex (`PLUGIN_ROOT` or `CODEX_HOME` is present, or the user invoked `$setup`)
- `claude` when running in Claude Code (`CLAUDE_PLUGIN_ROOT` is present, or the setup skill was invoked there)
- `gemini` when running in Gemini (`extensionPath` is present, or the setup skill was invoked there)
- `all` only when the user explicitly asks to configure every supported CLI
- `--reconfigure`: always pass it from interactive setup, so the user's answers apply even when `.coverage-thresholds.json` already exists (a re-run, or a first run after `npx metaswarm setup` copied the template). It updates the thresholds, a `--cov-fail-under`/`--fail-under` value in `enforcement.command` and an old bare `go test` command, and keeps every other setting. Only the session hook's self-heal omits it, so a silent background run never changes the file.
The script handles: 1. **Instruction file** — `AGENTS.md` for Codex, `CLAUDE.md` for Claude, `GEMINI.md` for Gemini; appends metaswarm section (or writes new), skips if already present 2. **`.coverage-thresholds.json`** — writes at project root with correct thresholds and command (with `--reconfigure`, updates an existing one). For Go it also writes `.metaswarm/go-coverage-gate.go` 3. **Claude command shims** — for Claude/all only, writes `.claude/commands/start-task.md`, `prime.md`, `review-design.md`, `self-reflect.md`, `pr-shepherd.md`, `brainstorm.md`
The script outputs JSON with what was created/skipped/warned/errored. Check that `"status": "ok"`, and show the user every entry in `warnings` (for example an `enforcement.command` that still embeds the old threshold).
**If the script is not available or fails**, fall back to writing these files manually with the Write tool. Do NOT skip them. </CRITICAL-REQUIREMENTS>
Pre-Flight
Existing Profile Check
Use Glob to check if `.metaswarm/project-profile.json` exists.
- **If it exists**: Read it, present the current configuration summary, and ask the user via AskUserQuestion: "You already have a metaswarm project profile. Re-run setup (overwrites choices) or skip?" Options: "Re-run setup" / "Skip". If the user skips, stop with: "Setup skipped. Existing configuration unchanged."
- **If it does not exist**: Continue to Project Detection.
---
Phase 1: Project Detection
Scan the project directory silently using Glob and Read. Do NOT ask the user for any of this information. Detect everything, then present results.
1.1 Language
Check for marker files at the project root:
| Marker File | Language | |---|---| | `package.json` | Node.js / JavaScript | | `tsconfig.json` | TypeScript (refines Node.js to TypeScript) | | `pyproject.toml` OR `setup.py` OR `requirements.txt` | Python | | `go.mod` | Go | | `Cargo.toml` | Rust | | `pom.xml` OR `build.gradle` OR `build.gradle.kts` | Java | | `Gemfile` | Ruby | | `Makefile` (alone, no other markers) | Unknown (ask user) |
If `tsconfig.json` exists alongside `package.json`, the language is "TypeScript".
If multiple languages are detected, note all of them but use the primary one (most infrastructure) for command generation.
**If no language detected**: Use AskUserQuestion to ask the user what language/stack they are using before proceeding.
1.2 Framework
**Node.js/TypeScript** — Read `package.json` and check `dependencies` + `devDependencies`:
| Dependency | Framework | |---|---| | `next` | Next.js | | `nuxt` OR `nuxt3` | Nuxt | | `@angular/core` | Angular | | `svelte` OR `@sveltejs/kit` | SvelteKit | | `react` (without next/nuxt) | React | | `vue` (without nuxt) | Vue | | `express` | Express | | `fastify` | Fastify | | `hono` | Hono | | `@nestjs/core` | NestJS |
**Python** — Check `pyproject.toml` or `requirements.txt` for: `fastapi`, `django`, `flask`.
**Go** — Read `go.mod` for: `github.com/gin-gonic/gin` (Gin), `github.com/labstack/echo` (Echo), `github.com/gofiber/fiber` (Fiber).
If no framework detected, set to `null`.
1.3 Package Manager (Node.js only)
| Lock File | Package Manager | |---|---| | `pnpm-lock.yaml` | pnpm
A self-improving multi-agent orchestration framework for Claude Code, Gemini CLI, and Codex CLI.
Other skills on metaswarm.
More skills from other plugins.
agentmail
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
adr-create
Create a new Architecture Decision Record with sequential numbering and AgentDB registration
Questions about setup.
- Which coding agents can use setup?
- setup installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

