moon
This skill should be used when the user asks to "configure moon", "set up moonrepo", "create moon tasks", "run moon commands", "configure moon workspace", "add moon project", "moon ci setup", "moon docker", "moon query", "migrate to moon v2", or mentions moon.yml, .moon/workspace.yml, .moon/toolchains.yml, moon run, moon ci, or moonrepo in general.
Best use case
moon is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
This skill should be used when the user asks to "configure moon", "set up moonrepo", "create moon tasks", "run moon commands", "configure moon workspace", "add moon project", "moon ci setup", "moon docker", "moon query", "migrate to moon v2", or mentions moon.yml, .moon/workspace.yml, .moon/toolchains.yml, moon run, moon ci, or moonrepo in general.
Teams using moon should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/moon/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How moon Compares
| Feature / Agent | moon | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This skill should be used when the user asks to "configure moon", "set up moonrepo", "create moon tasks", "run moon commands", "configure moon workspace", "add moon project", "moon ci setup", "moon docker", "moon query", "migrate to moon v2", or mentions moon.yml, .moon/workspace.yml, .moon/toolchains.yml, moon run, moon ci, or moonrepo in general.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# moon - Polyglot Monorepo Build System
moon is a Rust-based repository management, task orchestration, and build system for polyglot monorepos. It provides smart caching, dependency-aware task execution, and unified toolchain management.
> **moon v2 is now available.** Run `moon migrate v2` to migrate. See `references/v2-migration.md` for breaking changes.
## When to Use moon
- Managing monorepos with multiple projects/packages
- Orchestrating tasks across projects with dependencies
- Caching build outputs for faster CI/local builds
- Managing toolchain versions (Node.js, Rust, Python, Go, etc.)
- Generating project and action graphs
## Quick Reference
### Core Commands
```bash
moon run <target> # Run task(s)
moon run :lint # Run in all projects
moon run '#tag:test' # Run by tag
moon ci # CI-optimized execution
moon check --all # Run all build/test tasks
moon query projects # List projects
moon project-graph # Visualize dependencies
```
### Target Syntax
| Pattern | Description |
| -------------- | ------------------------------- |
| `project:task` | Specific project and task |
| `:task` | All projects with this task |
| `#tag:task` | Projects with tag |
| `^:task` | Upstream dependencies (in deps) |
| `~:task` | Current project (in configs) |
### Configuration Files
| File | Purpose |
| ---------------------- | ---------------------------------------- |
| `.moon/workspace.yml` | Workspace settings, project discovery |
| `.moon/toolchains.yml` | Language versions, package managers (v2) |
| `.moon/tasks/*.yml` | Global inherited tasks (v2) |
| `moon.yml` | Project-level config and tasks |
> **v2 Note:** `.moon/toolchain.yml` → `.moon/toolchains.yml` (plural), `.moon/tasks.yml` → `.moon/tasks/*.yml`
## Workspace Configuration
```yaml
# .moon/workspace.yml
$schema: "https://moonrepo.dev/schemas/workspace.json"
projects:
- "apps/*"
- "packages/*"
vcs:
client: "git"
defaultBranch: "main"
pipeline:
archivableTargets:
- ":build"
cacheLifetime: "7 days"
```
## Project Configuration
```yaml
# moon.yml
$schema: "https://moonrepo.dev/schemas/project.json"
language: "typescript"
layer: "application" # v2: 'type' renamed to 'layer'
stack: "frontend"
tags: ["react", "graphql"]
dependsOn:
- "shared-utils"
- id: "api-client"
scope: "production"
fileGroups:
sources:
- "src/**/*"
tests:
- "tests/**/*"
tasks:
build:
command: "vite build"
inputs:
- "@group(sources)"
outputs:
- "dist"
deps:
- "^:build"
dev:
command: "vite dev"
preset: "server"
# v2: Use 'script' for shell features (pipes, redirects)
lint:
script: "eslint . && prettier --check ."
test:
command: "vitest run"
inputs:
- "@group(sources)"
- "@group(tests)"
```
### Layer Types (v2)
| Layer | Description |
| --------------- | --------------------- |
| `application` | Apps, services |
| `library` | Shareable code |
| `tool` | CLIs, scripts |
| `automation` | E2E/integration tests |
| `scaffolding` | Templates, generators |
| `configuration` | Infra, config |
## Task Configuration
### Task Fields
| Field | Description |
| --------- | ------------------------------------ |
| `command` | Command to execute (string or array) |
| `args` | Additional arguments |
| `deps` | Task dependencies |
| `inputs` | Files for cache hashing |
| `outputs` | Files to cache |
| `env` | Environment variables |
| `extends` | Inherit from another task |
| `preset` | `server` or `utility` |
### Task Inheritance
Tasks can be inherited globally via `.moon/tasks/*.yml`:
```yaml
# .moon/tasks/node.yml
inheritedBy:
toolchains: ["javascript", "typescript"]
fileGroups:
sources: ["src/**/*"]
tasks:
lint:
command: "eslint ."
inputs: ["@group(sources)"]
```
Projects control inheritance:
```yaml
# moon.yml
workspace:
inheritedTasks:
include: ["lint", "test"]
exclude: ["deploy"]
rename:
buildApp: "build"
```
### Task Options
```yaml
tasks:
example:
command: "cmd"
options:
cache: true # Enable caching
runInCI: "affected" # affected, always, only, false
persistent: true # Long-running process
retryCount: 2 # Retry on failure
timeout: 300 # Seconds
mutex: "resource" # Exclusive lock
priority: "high" # critical, high, normal, low
```
### Input Tokens
```yaml
inputs:
- "@group(sources)" # File group
- "@globs(tests)" # Glob patterns
- "/tsconfig.base.json" # Workspace root file
- "$NODE_ENV" # Environment variable
```
## Toolchain Configuration
```yaml
# .moon/toolchains.yml (v2: plural)
$schema: "https://moonrepo.dev/schemas/toolchains.json"
# JavaScript ecosystem (v2: required for node/bun/deno)
javascript:
packageManager: "pnpm"
inferTasksFromScripts: false
node:
version: "20.10.0"
pnpm:
version: "8.12.0"
# Alternative runtimes
bun:
version: "1.0.0"
deno:
version: "1.40.0"
typescript:
syncProjectReferences: true
routeOutDirToCache: true
rust:
version: "1.75.0"
bins: ["cargo-nextest", "cargo-llvm-cov"]
go:
version: "1.21.0"
python:
version: "3.12.0"
```
### Toolchain Tiers
| Tier | Description | Examples |
| ---- | ---------------------- | ------------------------------------ |
| 3 | Full management | Node.js, Bun, Deno, Rust, Go, Python |
| 2 | Ecosystem integration | PHP, Ruby |
| 1 | Project categorization | Bash, Batch |
| 0 | System execution | Custom tools |
## CI Integration
```yaml
# GitHub Actions
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for affected detection
- uses: moonrepo/setup-toolchain@v0
with:
auto-install: true
- run: moon ci :build :test
- uses: moonrepo/run-report-action@v1
if: success() || failure()
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
```
### Parallelization with Matrix
```yaml
strategy:
matrix:
shard: [0, 1, 2, 3]
steps:
- run: moon ci --job ${{ matrix.shard }} --job-total 4
```
### Affected Detection
```bash
moon run :test --affected # Only affected projects
moon run :lint --affected --status staged # Only staged files
moon ci :test --base origin/main # Compare against base
moon query changed-files # v2: renamed from touched-files
```
## Docker Support
```bash
moon docker scaffold <project> # Generate Docker layers
moon docker setup # Install toolchain in Docker
moon docker prune # Prune for production
moon docker file <project> # Generate Dockerfile
```
## Moon Query Language (MQL)
```bash
# Filter projects
moon query projects "language=typescript && projectType=library"
moon run :build --query "tag=react"
# Operators: =, !=, ~, !~, &&, ||
# Fields: project, language, stack, tag, task, taskType
```
## Additional Resources
For detailed configuration options, consult:
- **`references/workspace-config.md`** - Complete workspace.yml reference
- **`references/task-config.md`** - Task configuration and inheritance patterns
- **`references/v2-migration.md`** - v1 to v2 migration guide
- **`references/cli-reference.md`** - Full CLI command reference
### Examples
- **`examples/workspace.yml`** - Complete workspace configuration
- **`examples/moon.yml`** - Full project configuration
- **`examples/ci-workflow.yml`** - GitHub Actions CI workflowRelated Skills
moonbit-refactoring
Refactor MoonBit code to be idiomatic: shrink public APIs, convert functions to methods, use pattern matching with views, add loop invariants, and ensure test coverage without regressions.
moltmoon-sdk
Agent-ready SDK for MoltMoon—launch tokens, trade with lowest fees, earn USDC rewards, all programmatic. Super early gem at 18k mcap with builders cooking more.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
runpod
Cloud GPU processing via RunPod serverless. Use when setting up RunPod endpoints, deploying Docker images, managing GPU resources, troubleshooting endpoint issues, or understanding costs. Covers all 5 toolkit images (qwen-edit, realesrgan, propainter, sadtalker, qwen3-tts).
runbook
Generate operational runbooks for services, procedures, or incident response with step-by-step procedures, troubleshooting guides, and escalation paths
Run CI/CD Pipeline Locally
Run the Wavecraft CI checks locally. Prefer the native `cargo xtask` commands for speed; use Docker + `act` only when validating GitHub Actions workflows or Linux-specific behavior.
router-operations
Master orchestration for routing QA, testing, DevOps, observability, and git workflow questions through 15 operational skills
returns-reverse-logistics
Codified expertise for returns authorisation, receipt and inspection, disposition decisions, refund processing, fraud detection, and warranty claims management.
resume-craft
Craft tailored, honest, one-page resumes from job descriptions. Use when the user wants to create, tailor, or improve a resume for a specific job posting. Handles job description analysis, skill gap identification, resume writing, keyword optimization, and PDF generation. Triggers on resume, CV, job application, tailor my resume, craft resume, apply for this job.
resource-scout
Search and discover Claude Code skills and MCP servers from marketplaces, GitHub repositories, and registries. Use when (1) user asks to find skills for a specific task, (2) looking for MCP servers to connect external tools, (3) user mentions "find skill", "search MCP", "discover tools", or "what skills exist for X", (4) before creating a custom skill to check if one already exists.
rails-deployment
Deploy Rails applications to production using Kamal, Docker, and modern deployment strategies. Covers zero-downtime deployments, environment management, database migrations, SSL/TLS, and production configurations.
r2-transfer-service-playbook
Manage changes to the R2 transfer pipeline (Python service, Cloudflare Workers, PHP logger) with mandatory validations, allowlists, and regression checks.