moonrepo-project-config

Use when creating or modifying moon.yml project configs, adding tasks, defining file groups, or configuring task options

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "moonrepo-project-config" with this command: npx skills add prometheas-labs/agent-skills-moon-monorepos/prometheas-labs-agent-skills-moon-monorepos-moonrepo-project-config

Moon v2 — Project Configuration

Reference for moon.yml project configuration files.

Project Metadata

$schema: 'https://moonrepo.dev/schemas/project.json'
layer: application    # application | library | tool | automation | configuration | scaffolding
language: typescript  # typescript | javascript | php | python | rust | go | bash
stack: frontend       # frontend | backend | systems | infrastructure | data

Key v2 change: type: was renamed to layer:.

File Groups

Named file pattern collections referenced by tasks via @group(name).

fileGroups:
  sources:
    - 'src/**/*.ts'
    - '!src/**/*.test.ts'
  configs:
    - 'package.json'
    - 'tsconfig.json'

Use @group(sources) in task inputs — not bare sources or @globs().

Tasks

command vs script

UseWhen
command:Single executable, no shell features. Supports inheritance merging.
script:Pipes, redirects, chaining (&&, ||, ;). No inheritance merging.
tasks:
  lint:
    command: 'eslint src/'
    inputs: ['@group(sources)', '@group(configs)']
    options:
      cache: true
      runInCI: affected

  build:
    script: 'rm -rf dist && tsc --build'
    inputs: ['@group(sources)']
    outputs: ['dist/']
    deps: ['~:codegen']

Task Fields

FieldPurpose
command / scriptWhat to run
inputsFiles that determine if task needs re-running
outputsFiles/directories produced (enables caching)
depsTasks to run first: 'project:task' or '~:task' (same project)
envEnvironment variables: { NODE_ENV: 'production' }
optionsExecution modifiers (see below)
presetserver (long-running) or utility (interactive, no cache)

Common Options

OptionDefaultPurpose
cachetrueEnable output caching
runInCIaffectedWhen to run in CI: always, affected, false, only, skip
persistentfalseLong-running process (dev servers)
shelltrueExecute within shell
retryCount0Retry on failure
outputStylebuffer, buffer-only-failure, stream, hash, none
runFromWorkspaceRootfalseRun from monorepo root instead of project

Pitfalls

MistakeFix
type: applicationUse layer: application (v2 rename)
command: 'a && b'Use script: for shell features
inputs: ['sources']Use inputs: ['@group(sources)']
Missing outputs on cacheable taskDefine outputs or caching has no effect
platform: nodeUse toolchains field or omit (auto-detected)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

moonrepo-workspace

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

moonrepo-languages

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

china-sportswear-outdoor-sourcing

Comprehensive sportswear and outdoor equipment sourcing guide for international buyers – provides detailed information about China's athletic apparel, footwear, outdoor gear, and accessories manufacturing clusters, supply chain structure, regional specializations, and industry trends (2026 updated).

Archived SourceRecently Updated
Web3

china-lighting-sourcing

Comprehensive lighting industry sourcing guide for international buyers – provides detailed information about China's LED, smart, outdoor, automotive, and specialty lighting manufacturing clusters, supply chain structure, regional specializations, and industry trends (2026 updated).

Archived SourceRecently Updated