dsifry/metaswarm/setup

Claude Code and agent skill by dsifry/metaswarm

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

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

Install

npx vskill@latest install dsifry/metaswarm/setup

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as dsifry/metaswarm/setup.

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:

bash
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 FileLanguage
package.jsonNode.js / JavaScript
tsconfig.jsonTypeScript (refines Node.js to TypeScript)
pyproject.toml OR setup.py OR requirements.txtPython
go.modGo
Cargo.tomlRust
pom.xml OR build.gradle OR build.gradle.ktsJava
GemfileRuby
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:

DependencyFramework
nextNext.js
nuxt OR nuxt3Nuxt
@angular/coreAngular
svelte OR @sveltejs/kitSvelteKit
react (without next/nuxt)React
vue (without nuxt)Vue
expressExpress
fastifyFastify
honoHono
@nestjs/coreNestJS

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 FilePackage Manager
pnpm-lock.yamlpnpm
yarn.lockyarn
bun.lockbbun
package-lock.jsonnpm

Default to npm if no lock file found. For non-Node.js, set to null.

1.4 Test Runner

Node.js/TypeScript (first match wins):

  1. Glob for vitest.config.* or vitest in devDependencies -> vitest
  2. Glob for jest.config.* or jest in devDependencies -> jest
  3. mocha in devDependencies -> mocha

Python: Check for [tool.pytest] in pyproject.toml or pytest in dependencies -> pytest (default for Python).

Go: go test (built-in). Rust: cargo test (built-in). Java/Maven: mvn test. Java/Gradle: gradle test.

1.5 Linter
MarkerLinter
.eslintrc* OR eslint.config.* OR eslint in devDependencieseslint
biome.json OR @biomejs/biome in devDependenciesbiome
[tool.ruff] in pyproject.toml OR ruff.tomlruff
.golangci.yml OR .golangci.yamlgolangci-lint
.clippy.toml or clippy in Cargo.tomlclippy
1.6 Formatter
MarkerFormatter
.prettierrc* OR prettier in devDependenciesprettier
biome.json (also formats)biome
black in Python depsblack
[tool.ruff.format] in pyproject.tomlruff format
rustfmt.toml OR .rustfmt.tomlrustfmt

If biome detected as both linter and formatter, report once as "Biome (lint + format)".

1.7 Type Checker
MarkerType Checker
tsconfig.jsontsc
mypy in Python deps OR [tool.mypy] in pyproject.tomlmypy
pyright in Python deps OR pyrightconfig.jsonpyright

Go (go vet) and Rust (cargo check) have built-in type checking — note but do not list separately.

1.8 CI Detection
MarkerCI System
.github/workflows/*.ymlGitHub Actions
.gitlab-ci.ymlGitLab CI
JenkinsfileJenkins
.circleci/config.ymlCircleCI
1.9 Git Hooks Detection
MarkerHook System
.husky/Husky
.pre-commit-config.yamlpre-commit
.lefthook.ymlLefthook
1.10 Present Results

After all detection, present findings:

I detected the following about your project:
Language: {language}
Framework: {framework or "None detected"}
Package manager: {package_manager or "N/A"}
Test runner: {test_runner or "None detected"}
Linter: {linter or "None detected"}
Formatter: {formatter or "None detected"}
Type checker: {type_checker or "None detected"}
CI: {ci or "None detected"}
Git hooks: {git_hooks or "None detected"}

Phase 2: Interactive Questions

Use AskUserQuestion to ask ONLY questions relevant based on detection. 3-5 questions maximum. Each question that is a choice (coverage threshold, external tools, visual review, CI rules) is a decision request: lettered options (A, B, C) under numbered questions (reply 1 A 2 C), each with its pros and cons, the recommended option marked, and why it is recommended (see Decision requests in the metaswarm plugin's guides/delivery-scope.md); a line each is enough, and the option labelled "(Recommended)" is that recommendation. Questions that only collect a fact (the language or stack when detection finds none) are exempt.

Always ask:

  1. Coverage threshold — "What test coverage threshold do you want to enforce?" Options: "100% (Recommended)" / "80%" / "60%" / "Custom"

Ask only if relevant:

  1. External AI tools — Ask only for non-trivial projects: "Set up external AI tools (Codex/Gemini) for cost savings on implementation?" Options: "Yes" / "No"
  1. Visual review — Ask only if a web framework was detected (Next.js, Nuxt, React, Vue, Angular, SvelteKit, Django, Flask): "Enable visual screenshot review for UI changes?" Options: "Yes" / "No"
  1. CI pipeline — Ask only if NO CI detected. For a stack that 5.4 renders (Node with npm, pip-based Python, Go, Rust): "Create a GitHub Actions CI pipeline?" Options: "Yes (Recommended)" / "No". For any other stack (pnpm, yarn, bun, Poetry, uv, Pipenv, Java, Ruby…), metaswarm can't write the whole workflow, so ask instead: "Add metaswarm's coverage job to a GitHub Actions workflow? I'll show you ci-coverage-job.yml and what to change for your toolchain." Options: "Yes" / "No"
  1. Git hooks — Ask only if NO hooks detected: "Set up git hooks for pre-push quality checks?" Options: "Yes (Recommended)" / "No"

Phase 3: Write Required Files

Step 1: Run the mandatory files script

This is the FIRST thing to do after Phase 2. Determine the coverage command, then run:

bash
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

Example for Codex with Python/pytest at 100%:

bash
bash "${PLUGIN_ROOT}/lib/setup-mandatory-files.sh" "$(pwd)" 100 "pytest --cov --cov-fail-under=100" --platform codex --reconfigure

Check the JSON output. If "status": "ok", the 3 mandatory files are done. Report to the user what was created, and show them every entry in warnings.

If the script fails or is not found, write the files manually (see CRITICAL-REQUIREMENTS above for what they are).

Step 2: Customize instruction-file TODO sections

If the instruction file was newly written (not appended), use Edit to replace the TODO placeholders:

  • Replace npm test / npm run test:coverage with the detected test/coverage commands
  • Replace TypeScript strict mode / ESLint + Prettier with the detected language tools
  • Remove the <!-- TODO: ... --> comment lines

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 98 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
335
Repository forks
44
Repository npm downloads, 7 days
25
7-day trend score
42

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 18 Mar 2026, 8 months ago.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dsifry/metaswarm/setup/badge)](https://verified-skill.com/skills/dsifry/metaswarm/setup)

Something wrong with this skill or its page? Tell us.