Skip to content
Agent Orchestration
Skill

/setup

Interactive project setup — detects your project, configures metaswarm, writes project-local files

From plugin
metaswarm
43714 skills23 agents16 commands2 hooks

Claude Code

$ npx -y skills add dsifry/metaswarm --skill setup --agent claude-code

SKILL.md

setup.SKILL.md
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> --reconfigure

Where:

  • `<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
@dsifry
Ships withmetaswarm

A self-improving multi-agent orchestration framework for Claude Code, Gemini CLI, and Codex CLI.

43714 skills23 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
437
Star history of dsifry/metaswarm on GitHub, a chart by star-history.com

Other skills on metaswarm.

brainstorming-extension

brainstorming-extensio…

Loads the assumption ledger and misreadings checklist at the start of brainstorming, and enforces the design review gate when a…

@dsifry@dsifryInstall Skill
create-issue

create-issue

Create comprehensive GitHub issues with TDD plans, acceptance criteria, and agent instructions for autonomous PR lifecycle…

@dsifry@dsifryInstall Skill
design-review-gate

design-review-gate

Automatic review gate that runs when brainstorming commits a project-sized design doc - spawns PM, Architect, Designer, Security,…

@dsifry@dsifryInstall Skill
external-tools

external-tools

Delegate implementation and review tasks to external AI CLI tools (Codex, Gemini) with cross-model adversarial review

@dsifry@dsifryInstall Skill
handling-pr-comments

handling-pr-comments

Address PR review feedback systematically — fetch inline comments, review bodies, handle outside-diff-range comments, resolve…

@dsifry@dsifryInstall Skill
handoff

handoff

Analyze the current session and write a self-contained handoff document so a fresh agent can resume the work with full context —…

@dsifry@dsifryInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw7d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca5d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip6d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

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.