bazel-adopt

Evaluates Bazel adoption readiness and plans staged repository migrations with measured signals.

Updated Aug 13, 2026
One-click install
npx skills add https://github.com/ocx-sh/grimoire-lore --skill bazel-adopt-ocx-sh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bazel-adopt
Source: https://github.com/ocx-sh/grimoire-lore/tree/main/skills/bazel-adopt
Command: npx skills add https://github.com/ocx-sh/grimoire-lore --skill bazel-adopt-ocx-sh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Deciding whether a repository should move to Bazel is usually driven by hype or invented thresholds, and migrations often break the build or never reach CI. This Skill replaces guesswork with a measured go/no-go gate and an ordered migration procedure that keeps the tree green at every step. ## Core Features & Use Cases - Measured go/no-go gate: Five adoption signals, each with the exact command that produces it (CI wall-clock medians via gh, generator maturity via the Bazel Central Registry, submodule coupling, team ownership), recorded in a decision file with no invented thresholds. - Staged migration procedure: Eleven ordered steps covering pilot selection, .bazelversion pinning, the 8.x-versus-9.x call, MODULE.bazel and lockfile setup with a day-one freshness gate, rc-file layering, four-stage cache wiring, and CI lane taxonomy. - Per-language branches: Dedicated migration branches for Rust (crate_universe, crates_vendor, prost), Python (rules_python, pip.parse, pytest wrappers), TypeScript (rules_js/rules_ts, pnpm-only ingestion), and C++ (toolchain constraint tree), each with its first three rules to satisfy. - Use Case: A team with a polyglot monorepo and 45-minute CI runs asks whether Bazel is worth it. The Skill measures their actual CI wall-clock, checks generator maturity per language, produces a written go decision, then migrates a Rust pilot with a pinned toolchain and a committed lockfile before touching anything else. ## Quick Start Ask the assistant to evaluate whether your repository should adopt Bazel and produce a migration plan using the bazel-adopt skill.

Frequently Asked Questions about bazel-adopt

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

FAQPage Schema
How do I decide whether my repository should adopt Bazel?▼

Measure five signals instead of applying a threshold: median whole-repo CI wall-clock, whether the largest CI job is actually a build, generator maturity per language, cross-repository coupling, and build ownership. No published numeric cutoff exists, so the verdict names which measured signal decided it.

How do I migrate a repository to Bazel without breaking the build?▼

Follow an ordered procedure: pick a small hermetic pilot in one language, pin an exact Bazel version in .bazelversion, create MODULE.bazel with a committed lockfile and a day-one freshness gate, layer rc files, then wire the disk cache before any remote cache. Run both old and new builds as required checks throughout.

Should I pin Bazel 8.x or 9.x for a new adoption?▼

Start on the Active LTS, which is 9.2.0 as of the skill's verification date, unless a consumer pins the Maintenance major. Note that 9.x deletes all WORKSPACE logic, empties autoload so every py_*, sh_*, and cc_* symbol needs an explicit load(), and removes bazel sync and bazel analyze-profile.

Bazel vs Nx, Turborepo, Pants, or sccache: which should I use?▼

Try the narrower fix first: sccache and cargo nextest for Rust, uv for Python, pnpm with Nx or Turborepo for TypeScript. The evidence steers Python-heavy monorepos toward Pants before Bazel and holds Nx or Turborepo sufficient for JS-only teams; Bazel fits multi-language repos where build time is the measured cost.

Why does my Bazel lockfile check fail with exit code 37?▼

Exit 37 covers two distinct cases: an existing dependency's locked version changed (an internal IllegalStateException) or MODULE.bazel gained a new bazel_dep (the documented missing-checksum message). Gate CI on the exit code, never on matched stderr text, and never hardcode the lock schema version.

When should I add remote execution or target selection to Bazel?▼

Remote execution comes last, only after a five-step readiness gate passes, and target selection is deferred until whole-repo median wall-clock consistently exceeds roughly 40 minutes. Both production selection tools document real false-negative classes, so whole-repo bazel test //... remains the default backstop.