moon

Configure and orchestrate moon monorepo workspaces, tasks, toolchains, and CI pipelines.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/notwillk/rulesy --skill moon-notwillk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moon
Source: https://github.com/notwillk/rulesy/tree/main/.agents/skills/moon
Command: npx skills add https://github.com/notwillk/rulesy --skill moon-notwillk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and maintaining a polyglot monorepo build system requires deep knowledge of moon's configuration files, target syntax, task inheritance, and v2 migration changes, which is error-prone when done from memory. ## Core Features & Use Cases - Workspace and Project Configuration: Generate .moon/workspace.yml, .moon/toolchains.yml, and project-level moon.yml files with correct v2 schemas, layers, tags, and file groups. - Task Orchestration and CI Setup: Define tasks with caching, dependencies, presets, and inheritance, plus GitHub Actions, CircleCI, and Buildkite pipelines with affected detection and job sharding. - v1 to v2 Migration: Apply breaking changes such as toolchain.yml to toolchains.yml, type to layer, and command to script for shell features. - Use Case: When adding a new TypeScript service to a monorepo, ask for a complete moon.yml with build, test, and lint tasks that inherit global configuration and wire into the existing CI pipeline. ## Quick Start Ask the assistant to create a moon workspace configuration for a monorepo with apps and packages directories, including a build task with caching and a GitHub Actions CI workflow.

Frequently Asked Questions about moon

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure moon tasks in a monorepo?

Define tasks in each project's moon.yml with a command, inputs for cache hashing, outputs to cache, and deps for task dependencies. Use target syntax like project:task, :task for all projects, or ^:build to run upstream dependency builds first.

How to set up moon CI with GitHub Actions?

Use actions/checkout with fetch-depth 0 for affected detection, then moonrepo/setup-toolchain with auto-install, and run moon ci :build :test. Parallelize with matrix shards using moon ci --job N --job-total 4 and report results with moonrepo/run-report-action.

What changed in moon v2 migration?

Moon v2 renames .moon/toolchain.yml to .moon/toolchains.yml, .moon/tasks.yml to .moon/tasks/*.yml, runner to pipeline, and project type to layer. Tasks with pipes or redirects must use script instead of command, and node, bun, or deno require the javascript toolchain enabled.

Does moon support languages besides Node.js?

Yes, moon provides tier-3 toolchain management for Node.js, Bun, Deno, Rust, Go, and Python, with tier-2 ecosystem integration for PHP and Ruby. Toolchain versions are pinned in .moon/toolchains.yml and installed via moon setup.

Why is my moon task not using the cache?

Caching requires the cache option enabled (default true) plus declared inputs and outputs so moon can compute a hash. Tasks with preset server or persistent processes disable caching, and moon run --force bypasses the cache entirely.

How do I run only affected tasks in moon?

Use moon run :test --affected to run tasks only in projects touched by changes, or --status staged to limit to staged files. In CI, moon ci compares against a base revision such as origin/main to determine affected projects automatically.