moon-commandslisted
Install: claude install-skill g-bastianelli/nuthouse
# moon-moth — canonical moon commands
Single source of truth for the `moon` invocations every moon-moth skill and
agent uses. Reference this contract instead of re-deriving commands. All
commands run from the moon workspace root (the dir containing `.moon/`).
> Verified against **moon 2.2.4**. `moon query <sub>` emits **JSON on stdout
> natively** — there is no `--json` flag. CLI flags are kebab-case
> (`--default-branch`, not `--defaultBranch`).
## Detecting scope (what changed, what's affected)
| Goal | Command |
| ------------------------------------------ | ------------------------------------------------------------------ |
| Files changed in the working tree | `moon query changed-files --local` |
| Files changed vs the default branch | `moon query changed-files --default-branch` |
| Files changed between two revisions | `moon query changed-files --base <sha> --head <sha>` |
| Affected projects + tasks (working tree) | `moon query affected` |
| Affected incl. downstream dependents | `moon query affected --downstream deep` |
| Affected incl. upstream dependencies first | `moon query affected --upstream deep` |
| Affected projects only, via project graph | `moon query project