Skip to content
Back to skills

Using Moon

ASecurity

Use when adding or changing tasks in a moonrepo monorepo. Triggers on `.moon/` config files, `moon.yml`, `moon run`, `moon query`, task inheritance, project tags, toolchains, or task caching, even when the user doesn't say 'moonrepo'.

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsjavascripttypescriptgojavashellbashnodedocker

Security analysis

A100/100

Pro scans all 12 files and shows the line behind each finding

Scanned November 30, 2026

npx -y skills add xonovex/platform --skill using-moon --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Using Moon?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Using Moon
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/xonovex-using-moon/badge)](https://www.skillsdirectory.com/skills/xonovex-using-moon)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: using-moon
description: "Use when adding or changing tasks in a moonrepo monorepo. Triggers on `.moon/` config files, `moon.yml`, `moon run`, `moon query`, task inheritance, project tags, toolchains, or task caching, even when the user doesn't say 'moonrepo'."
---

# Moon Build System Guidelines

Define reusable Moon tasks through tags, explicit dependencies, and declared cache inputs and outputs.

## Requirements

- Moon ≥ 2.0, Node.js for JavaScript/TypeScript projects.
- Migration from v1: Run `moon migrate v2` to automate configuration updates.

## Essentials

- **Task configuration** - Define in `.moon/tasks/*.yml` for auto-inheritance, see [references/task-configuration.md](references/task-configuration.md), [references/task-inheritance.md](references/task-inheritance.md)
- **Tags** - Use for categorization, filtering, boundaries, inheritance, see [references/tag-based-filtering.md](references/tag-based-filtering.md)
- **Execution** - `project:task`, `#tag:task`, `:task` (all), `--query`, `--affected`
- **Querying** - Query projects/tasks by tags, language, or query language, see [references/query-language.md](references/query-language.md)
- **Configuration** - Projects use `moon.yml`, workspace uses `.moon/workspace.yml`
- **Toolchains** - Moon manages language toolchains, configured in `.moon/toolchains.yml` (plural in v2)
- **Caching** - Built-in task caching with output definitions, see [references/task-configuration.md](references/task-configuration.md)

## Moon 2.0 Key Changes

- **command vs script** - Use `script:` for shell features (pipes, redirects, chaining); `command:` for simple executables only
- **Shell by default** - Tasks run in shell by default (`bash` on Unix, `pwsh` on Windows)
- **Deep merging** - Configs merge sequentially (not shallow), fileGroups combine instead of replace
- **Renamed settings** - `platform` → `toolchains`, `type` → `layer`, `toolchain.yml` → `toolchains.yml`
- **Env var syntax** - `$VAR` substitutes empty string (not syntax fallback); use `${VAR:-default}` for defaults

## Gotchas

- Task inheritance flows from `.moon/tasks/*.yml` (by tag/language) → project `moon.yml`: overriding requires the same task key in the project file
- Implicit task dependencies via `deps:` are project-scoped: cross-project deps need `<project>:<task>` syntax
- `moon ci` skips persistent server tasks (`preset: 'server'`) and any task with `options.runInCI: false`, never gate CI-only checks behind a non-CI task
- Project tags drive task inheritance; misspelling a tag silently disables the inherited tasks for that project

## Progressive disclosure

- Read [references/task-configuration.md](references/task-configuration.md) - Load when defining or modifying task configurations
- Read [references/tag-based-filtering.md](references/tag-based-filtering.md) - Load when filtering projects or tasks by tags
- Read [references/query-language.md](references/query-language.md) - Load when using advanced query syntax
- Read [references/task-inheritance.md](references/task-inheritance.md) - Load when setting up task inheritance patterns
- Read [references/project-constraints.md](references/project-constraints.md) - Load when enforcing project boundaries
- Read [references/migration-v2.md](references/migration-v2.md) - Load when migrating from moon v1 to v2
- Read [references/docker-multistage.md](references/docker-multistage.md) - Load when building Docker images with moon scaffold

Files in this skill

  • SKILL.md3.4 KB
  • eval-output.json2.8 KB
  • eval-trigger.json5.9 KB
  • moon.yml86 B
  • references/docker-multistage.md961 B
  • references/migration-v2.md3 KB
  • references/project-constraints.md927 B
  • references/query-language.md1.2 KB
  • references/tag-based-filtering.md1.2 KB
  • references/task-configuration.md1.8 KB
  • references/task-inheritance.md1.7 KB
  • sources.json931 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.