Mono Detect
Invoke as $mono-detect.
Use this skill to detect a pnpm workspace monorepo and generate the .agents/monorepo.json artifact consumed by the monorepo pack.
mono-detect is the foundation skill for mono-exec, mono-ship, and mono-guard. Those skills use its output to inject monorepo-aware pre/post steps into the standard $exec and $ship contracts without duplicating the base workflow.
Augmentation Injection Pattern
mono-detect is the pack's detection foundation for the augmentation injection pattern. It does not replace $exec, $ship, or base monorepo planning skills; it supplies .agents/monorepo.json so mono-exec, mono-ship, and mono-guard can inject monorepo-aware pre-flight and post-integration checks around those existing workflows.
Process
- Resolve the target repository root.
- Use
$ARGUMENTS as the root when provided.
- Otherwise use the current working directory.
- Locate the pack script relative to this skill:
../../scripts/mono-detect.sh from the monorepo pack root.
- Check whether
.agents/monorepo.json is fresh:
- Run
packs/monorepo/scripts/mono-detect.sh <root> --check-stale.
- If it prints
fresh: .agents/monorepo.json, keep the existing artifact.
- If the file is missing, stale, or the check does not report fresh, run
packs/monorepo/scripts/mono-detect.sh <root> to regenerate it.
- If detection fails because
pnpm-workspace.yaml is missing:
- Report that the project is not a detected pnpm monorepo.
- Suggest
$mono-migrate as a future V2 migration route when the user wants to convert a single-app project.
- Do not create
.agents/monorepo.json by hand.
- Read
.agents/monorepo.json and summarize:
- Workspace manager.
- Build orchestrator (
turborepo when turbo.json is present, otherwise none).
- Package count and package paths.
- Internal dependency graph edges.
- Turborepo pipeline names.
- Report staleness behavior:
- Mention that the artifact is regenerated when
pnpm-workspace.yaml, turbo.json, or workspace package.json files are newer than .agents/monorepo.json.
- Route the next step:
- If detection passed and the user is preparing execution, recommend
$mono-exec.
- If detection passed and the user is checking lane safety, recommend
$mono-guard.
- If detection failed because this is not a pnpm monorepo, recommend
$mono-migrate as the V2 advisory route.
Output
- Detection: detected, fresh, regenerated, or not detected.
- Workspace: manager, build orchestrator, root path.
- Packages: count plus package name/path list.
- Dependency graph: internal dependency edges; say
none when no internal edges exist.
- Turbo pipelines: pipeline names when present; say
none when Turborepo is absent.
- Artifact:
.agents/monorepo.json path and whether it was reused or regenerated.
- Next work: concrete follow-up.
- Recommended next command: one command.
Constraints
- Do not edit task files.
- Do not run package manager install/add commands.
- Do not infer non-pnpm workspace managers in V1.
- Do not modify
.agents/monorepo.json manually; use mono-detect.sh.
- Treat
mono-detect as an augmentation foundation for mono-exec, mono-ship, and mono-guard, not as a replacement for $exec, $ship, or base monorepo planning skills.
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.
1---2name: mono-detect3description: Detect pnpm workspace structure, optional Turborepo overlay, package metadata, and internal dependency graph for monorepo-aware skills4type: analysis5version: v0.16argument-hint: "[optional: repository root]"7invocation: sub-skill8parent: mono-plan9metadata:10 source: https://skillmd.com/skills/georgeqle/mono-detect11---1213# Mono Detect1415Invoke as `$mono-detect`.1617Use this skill to detect a pnpm workspace monorepo and generate the `.agents/monorepo.json` artifact consumed by the monorepo pack.1819`mono-detect` is the foundation skill for `mono-exec`, `mono-ship`, and `mono-guard`. Those skills use its output to inject monorepo-aware pre/post steps into the standard `$exec` and `$ship` contracts without duplicating the base workflow.2021## Augmentation Injection Pattern2223`mono-detect` is the pack's detection foundation for the augmentation injection pattern. It does not replace `$exec`, `$ship`, or base monorepo planning skills; it supplies `.agents/monorepo.json` so `mono-exec`, `mono-ship`, and `mono-guard` can inject monorepo-aware pre-flight and post-integration checks around those existing workflows.2425## Process26271. Resolve the target repository root.28 - Use `$ARGUMENTS` as the root when provided.29 - Otherwise use the current working directory.302. Locate the pack script relative to this skill: `../../scripts/mono-detect.sh` from the monorepo pack root.313. Check whether `.agents/monorepo.json` is fresh:32 - Run `packs/monorepo/scripts/mono-detect.sh <root> --check-stale`.33 - If it prints `fresh: .agents/monorepo.json`, keep the existing artifact.34 - If the file is missing, stale, or the check does not report fresh, run `packs/monorepo/scripts/mono-detect.sh <root>` to regenerate it.354. If detection fails because `pnpm-workspace.yaml` is missing:36 - Report that the project is not a detected pnpm monorepo.37 - Suggest `$mono-migrate` as a future V2 migration route when the user wants to convert a single-app project.38 - Do not create `.agents/monorepo.json` by hand.395. Read `.agents/monorepo.json` and summarize:40 - Workspace manager.41 - Build orchestrator (`turborepo` when `turbo.json` is present, otherwise none).42 - Package count and package paths.43 - Internal dependency graph edges.44 - Turborepo pipeline names.456. Report staleness behavior:46 - Mention that the artifact is regenerated when `pnpm-workspace.yaml`, `turbo.json`, or workspace `package.json` files are newer than `.agents/monorepo.json`.477. Route the next step:48 - If detection passed and the user is preparing execution, recommend `$mono-exec`.49 - If detection passed and the user is checking lane safety, recommend `$mono-guard`.50 - If detection failed because this is not a pnpm monorepo, recommend `$mono-migrate` as the V2 advisory route.5152## Output5354- **Detection:** detected, fresh, regenerated, or not detected.55- **Workspace:** manager, build orchestrator, root path.56- **Packages:** count plus package name/path list.57- **Dependency graph:** internal dependency edges; say `none` when no internal edges exist.58- **Turbo pipelines:** pipeline names when present; say `none` when Turborepo is absent.59- **Artifact:** `.agents/monorepo.json` path and whether it was reused or regenerated.60- **Next work:** concrete follow-up.61- **Recommended next command:** one command.6263## Constraints6465- Do not edit task files.66- Do not run package manager install/add commands.67- Do not infer non-pnpm workspace managers in V1.68- Do not modify `.agents/monorepo.json` manually; use `mono-detect.sh`.69- Treat `mono-detect` as an augmentation foundation for `mono-exec`, `mono-ship`, and `mono-guard`, not as a replacement for `$exec`, `$ship`, or base monorepo planning skills.7071## Default Shipping Contract7273Follow the shared shipping contract convention in CLAUDE.md.