Command Palette

Search for a command to run...

Назад к скиллам
скилл № 16948

bazel-adopt

Go/no-go gate and staged migration procedure for moving a repository onto Bazel, covering the measured adoption signals, the pilot choice, MODULE.bazel and…

БесплатноБез исполняемых скриптов
ocx-shот ocx-sh★ 20 звёзд на GitHub

Установить bazel-adopt в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

bazel-adopt

Two questions, in order. Should this repository move to Bazel at all, and if yes, in what order does it move without ever leaving the tree red.

The first question has no numeric answer. No published source gives a target count, a repository count, a language count or a team size above which Bazel becomes correct — verified end to end across the vendor blogs, the case studies and the one peer-reviewed study, as of 2026-09-06. So the gate here is a checklist of signals you measure, each with the command that produces it, and a written decision that records the measured value beside each answer.

This skill assumes the bazel-quality rule set is installed. It cites rules by ID and never restates their tables; the handful a migration violates on day one are duplicated below as a short list, deliberately.

Contents: Stop condition · Before you start · The procedure · The migration plan file · What agents get wrong · References

Stop condition

Stop when the adoption decision file exists on disk with every signal filled in with a measured value, and either

  • the decision is no-go, and the file names which signal decided it and what would have to change; or
  • the decision is go, and a migration plan file exists in the repository naming the order, the Bazel pin, the lock mechanism per language, and the first CI lane.

Then stop. Do not migrate a second subtree, do not add target selection, and do not wire remote execution. Each of those is a later decision this procedure deliberately leaves open.

A decision file with an unmeasured signal — a number recalled, estimated or inferred from a badge — is not a decision. Delete the row and measure it.

Before you start

The evidence rule. Every number in the decision file comes from a command you ran in this repository or from a registry you fetched. Never from memory, never from a blog post, never from a threshold you synthesised because adoption advice usually has one. Before writing any number as a go/no-go criterion, name the source and quote it; if you cannot, drop the number and keep the checklist answer.

Read the pinned binary, never a page. bazel help build --long and bazel help startup_options on the exact pinned version are the authority for whether a flag exists and what it defaults to. bazel help all --long is not a command. bazel help package is not a command either. Both were tried (BZL-MOD-13, BZL-FLAG-11).

The rules a migration violates first. These are merge-blocking and land before any of them can be reviewed away. Repeated here because the scoped rule may not have fired yet on a repository with no Bazel files in it.

# Finding Rule
1 .bazelversion missing, or holding a channel keyword (latest, rolling, last_green) or a floating pattern (8.x, 9.*) — the Bazel 8 line is a legitimate pin, 8.x as a string is not BZL-FLAG-01
2 MODULE.bazel.lock gitignored instead of committed BZL-MOD-01
3 A .bazelversion bump commit that does not carry the regenerated lock BZL-MOD-06
4 A worktree or legacy build directory absent from .bazelignore — Bazel does not read .gitignore BZL-ARCH-26
5 The Bazel-side lockfile hand-edited to fix a drift BZL-ARCH-24
6 A fork or pull_request_target lane holding the cache write credential BZL-CACHE-01
7 --credential_helper configured from a committed .bazelrc BZL-CACHE-04
8 Any WORKSPACE* file on a 9.x pin — a hard break, not a warning BZL-FLAG-12

Scope note that applies to every grep in this skill. They read committed workspace text only. BUILD and .bzl content a repository rule generates into an external repository at fetch time is out of reach of all of them; only a build from the generated repository sees that text.

The procedure

Run the steps in order. Stop at the first one that fails and record why.

1. Name the narrower fix and why it was rejected

Every language has a cheaper answer that is already available: cargo's own incremental build plus sccache and cargo nextest for Rust, uv's resolver and cache for Python, pnpm's content-addressable store plus Nx or Turborepo for TypeScript. No source states a point at which any of them stops being enough, and for two of the three shapes the sourced argument runs the other way — a Python-heavy monorepo is steered toward Pants before Bazel, and the comparison consensus holds Nx and Turborepo sufficient for a JS-only team permanently.

git ls-files -z --cached --others --exclude-standard -- ':(glob).github/workflows/**' | xargs -0 -r grep -E -l -e 'actions/cache' -e 'rust-cache' -e 'sccache' -e 'cache:' --

A non-empty list means some caching is already in place and you can state what it does not cover. **Empty output means no cheaper fix has been tried

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/branch-rust.md
  • references/branches-python-ts-cpp.md
  • references/cache-and-ci.md
  • references/go-no-go.md
  • references/workspace-setup.md

FAQ

Что делает скилл bazel-adopt?

Go/no-go gate and staged migration procedure for moving a repository onto Bazel, covering the measured adoption signals, the pilot choice, MODULE.bazel and lockfile setup, the .bazelversion pin and the 8.x-versus-9.x call, rc-file layering, cache wiring order, CI lanes, and one branch per language for Rust, Python, TypeScript and C++. Use when someone asks whether a repo should move to Bazel, wants a Bazel migration plan or adoption plan, asks how to start with Bazel, how to add a MODULE.bazel, which Bazel version to pin, how to set up a remote cache or remote execution for the first time, what to migrate first, or whether Bazel is worth it against Nx, Turborepo, Pants, sccache or plain cargo and uv caching. Not for diagnosing or speeding up a build that is already on Bazel, which is bazel-diagnose, and not for the standards themselves, which are the bazel-quality rules.

Как установить скилл bazel-adopt?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bazel-adopt запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bazel-adopt с