Skip to content

Bazel Build Optimization

Guides an agent through configuring and speeding up Bazel builds in large monorepos.

Repository
wshobson/agents
Stars
42,095
Licence
MIT
Files
2 files

What it does

Once installed, the agent knows common Bazel patterns for large codebases: how to lay out workspace files, use fine-grained build targets, set up remote caching and remote execution, and debug build problems. It also points to a reference file with templates and worked examples that it reads when concrete code is needed. The skill is written as guidance; it does not itself build or change anything.

Great for

  • Engineers setting up Bazel for a monorepo with many packages
  • Teams trying to cut slow build and test times using remote caching
  • Developers migrating an existing project from another build system to Bazel

Skip it if

  • Small single-package projects where Bazel's setup overhead is not worth it
  • Anyone expecting the skill to run builds or verify results automatically, since it only supplies guidance and the output still needs testing against a real Bazel install

Try asking

  • “Set up a .bazelrc with remote caching for our monorepo”
  • “Split this large BUILD.bazel into finer-grained targets to improve caching”
  • “Help me debug why this Bazel target keeps rebuilding”
  • “Outline a migration plan from Make to Bazel for our web and libs folders”
Step-by-step guide: how to use Bazel Build OptimizationInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    bazel-build-optimization.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip bazel-build-optimization.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip bazel-build-optimization.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the agent your existing WORKSPACE or MODULE file and .bazelrc so its advice matches your setup
  • Ask for specific templates by name, since the agent reads references/details.md only when needed
  • Check any generated configuration against your Bazel version, because the skill does not pin one

What's inside

  • references/details.md
  • SKILL.md

Redistributed unmodified from wshobson/agents under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.