From itp
Autonomous polyglot monorepo bootstrap meta-prompt on the moon + proto + Bun stack (Nx-convergent). TRIGGERS - new monorepo, new repository, polyglot setup, scaffold repo, moon proto bootstrap, monorepo from scratch.
How this skill is triggered — by the user, by Claude, or both
Slash command
/itp:bootstrap-monorepoThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Canonical reference lives in THIS skill:
Canonical reference lives in THIS skill:
→ See: references/bootstrap-monorepo.md → Cross-language boundaries: references/cross-language-interop.md — boundary decision ladder + verified tool status (research-verified 2026-06)
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Use this skill when:
nx init is mechanical, not a restructure)| Tool | Responsibility |
|---|---|
| proto | Toolchain versions (bun, python, rust, node, …) pinned in repo-local .prototools |
| moon | Project graph + task orchestration + caching + affected detection (moon ci) |
| Bun | TS runtime for every script, CLI, glue tool, and test; root workspaces |
| uv / cargo | Python / Rust engines invoked natively from moon script: tasks |
TypeScript is the control plane; other languages are engines behind language-neutral contracts (JSON Schema 2020-12 / proto) with drift gates and parity tests.
Choose which language owns the code before choosing how to cross between them. This is a tiebreaker, not a mandate — a SOTA-native ecosystem and existing repo convention override it.
When work must cross languages, climb from cheapest to most coupled — stop at the first rung that satisfies the need (full doctrine + verified tool status: references/cross-language-interop.md):
script: task). Default.Pattern B gate amendment: after the 8-float-op test selects Pattern B, ask "does the kernel need threads?" → if yes, native core (cdylib/PyO3), not WASM.
TypeScript ↔ Python (the most common pair) verified picks, June 2026: rung 1 = Bun.spawn/child_process running Python via uv run --python 3.14 (NOT bun:ffi — C-ABI only); rung 2 = FastAPI + @hey-api/openapi-ts (HTTP) or buf-generated protobuf-es + protocolbuffers/python stubs (RPC); schema SSoT = Pydantic v2 → JSON Schema 2020-12 → TS, with a CI drift gate. Full table in the reference.
# After bootstrap:
moon ci # affected quality pipeline
moon run <project>:check # one project's full gate (lint+test+drift)
moon query projects # machine-readable project graph (agents read this)
moon query tasks # machine-readable task surface
proto use # install all .prototools pins on a fresh machine
Pre-2026-06 repos on Pants + mise: the old reference remains at ../mise-tasks/references/bootstrap-monorepo.md. Migrate per-repo (parity-first, cut tasks over one at a time), never big-bang.
Two cases (full recipes in references/bootstrap-monorepo.md Phase 9):
semantic-release, one .releaserc.yml, tag v${version}.<project>/v${version}) via @rimac-technology/semantic-release-monorepo (stock semantic-release ignores
commitPaths — upstream #1279/#1212), selected by a RELEASE_PROFILE-keyed .releaserc.cjs dispatcher that
derives each stream's processCommits from its commitPaths, plus a repo-wide umbrella on stock semantic-release.
Install the fork with npm i -D --ignore-scripts. Reference impl: claude-sys.itp:semantic-release - Release automation (local-first; Actions only for release/CodeQL/Dependabot/deploy)itp:mise-tasks / itp:mise-configuration - legacy mise-era orchestration (still valid for unmigrated repos)| Issue | Cause | Solution |
|---|---|---|
proto::detect::failed for moon | tool installed but no version pinned | proto pin --to global moon <version> (or add to .prototools) |
moon not found over ssh | shims not on non-interactive PATH | export PROTO_HOME + shims PATH in ~/.zshenv (NOT only .zshrc) |
| Python tests "No module named pytest" | uv run prunes dev extras | uv run --extra dev -p <version> pytest <path> from repo root |
PyO3 crate cargo test link errors (_PyBool_Type) | tests reference #[pyfunction] under extension-module | keep logic in pure-Rust core fns; tests call the core, wrapper stays thin |
| Task runs in wrong cwd | script assumes repo root | options: { runFromWorkspaceRoot: true } in the task |
| Guard task wrongly cached | moon caches by default | options: { cache: false } on guards/parity/network tasks |
| Commit "passed" but didn't land | a hook auto-fixed files and aborted | re-stage and retry; ALWAYS verify git log --oneline -1 after commit |
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.
npx claudepluginhub terrylica/cc-skills --plugin itpBuild efficient, scalable monorepos that enable code sharing, consistent tooling, and atomic changes across multiple packages and applications.
Guides setup and optimization of Turborepo, Nx, or pnpm monorepos including build caching, pipeline config, and code sharing.
Guides monorepo setup, build optimization, and dependency management using Nx, Turborepo, Bazel, or Lerna. Activates on monorepo architecture or scaling multi-project workflows.