Moonrepo

Execute affected tasks and reuse cached outputs in JavaScript/TypeScript monorepos.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/nhattran998/crossfire --skill moonrepo-nhattran998
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Moonrepo
Source: https://github.com/nhattran998/crossfire/tree/main/.agents/skills/moonrepo
Command: npx skills add https://github.com/nhattran998/crossfire --skill moonrepo-nhattran998

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Moonrepo eliminates slow, repetitive monorepo task execution by running only what changed and reusing cached outputs, so developers and CI pipelines finish faster and stay consistent.

Core Features & Use Cases

  • Workspace Graph: Understands dependencies between packages to order tasks correctly (e.g., build shared libraries before apps).
  • Task Pipeline + Parallelization: Executes tasks in dependency order and parallelizes independent work for faster feedback loops.
  • File-Based Hashing + Caching: Detects changed inputs and skips unaffected tasks using cached results to reduce CI time.
  • Configuration as Code: Defines workflows in moon.yml or moonfile.ts for version-controlled, composable task automation.
  • Use Case: In a Crossfire-style repo with apps, packages, and shared code, you can run lint/test/build only for the projects impacted by recent changes.

Quick Start

Ask Moonrepo to run the affected build tasks in the monorepo by executing: "moon run :build --affected".

Frequently Asked Questions about Moonrepo

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

FAQPage Schema
How do I speed up monorepo builds by caching affected tasks?

Speed up monorepo builds by running only affected tasks and reusing cached outputs based on file hashing. Moonrepo detects changed inputs to skip unaffected work, reducing both local development and CI execution time.

How does file-based hashing work for incremental builds in a TypeScript monorepo?

File-based hashing for incremental builds works by detecting changed inputs and skipping unaffected tasks using cached results. You must define explicit inputs and outputs for each task to ensure deterministic caching across your JavaScript or TypeScript workspace.

Can I run lint, test, and build tasks only for changed projects in my monorepo?

Yes, you can run lint, test, and build tasks only for changed projects by executing the affected tasks command. Moonrepo analyzes the workspace graph to identify impacted apps and packages, running validation exclusively on those recent changes.

How do I configure workspace discovery for monorepo task automation?

Configure workspace discovery for monorepo task automation by defining workflows in moon.yml or moonfile.ts. This configuration as code approach provides version-controlled, composable task automation and correctly resolves dependencies across your workspace graph.

Does the task runner parallelize independent work across monorepo packages?

Yes, the task runner parallelizes independent work across monorepo packages to provide faster feedback loops. It executes tasks in correct dependency order, building shared libraries before apps, while parallelizing independent work where possible.

What is a workspace graph and when do I need it for monorepo CI optimization?

A workspace graph maps dependencies between packages to order tasks correctly during monorepo CI optimization. You need it when managing a repository with multiple apps and shared code to ensure tasks execute in proper dependency order.