bazel-build-optimization

Optimize Bazel build performance for large monorepos.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Jhabbig/Habbig --skill bazel-build-optimization-jhabbig
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bazel-build-optimization
Source: https://github.com/Jhabbig/Habbig/tree/main/.claude/plugins/wshobson/developer-essentials/skills/bazel-build-optimization
Command: npx skills add https://github.com/Jhabbig/Habbig --skill bazel-build-optimization-jhabbig

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams reduce slow, unreliable Bazel builds in large monorepos by improving configuration, caching, and target structure.

Core Features & Use Cases

  • Build Performance Tuning: Improve incremental build speed by adjusting Bazel flags, resource settings, and dependency boundaries.
  • Remote Caching and Execution: Set up shared caches and remote workers to accelerate CI and developer workflows.
  • Rule and Toolchain Design: Create or refine BUILD files, custom rules, platforms, and toolchains for JavaScript, Python, and Docker-based workloads.
  • Troubleshooting and Analysis: Diagnose build failures and performance bottlenecks with queries, profiling, and dependency inspection.

Quick Start

Ask for a Bazel optimization plan for your monorepo, including caching, remote execution, BUILD file improvements, and a step-by-step tuning strategy.

Frequently Asked Questions about bazel-build-optimization

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

FAQPage Schema
How do I speed up slow Bazel builds in a large monorepo?

Speed up Bazel builds in large monorepos by tuning resource settings, adjusting build flags, and refining dependency boundaries to improve incremental build speed and overall throughput. You can also configure remote caching and execution to accelerate CI workflows.

How do I set up remote caching and execution for Bazel?

Set up remote caching and execution for Bazel by configuring shared caches and remote workers, which accelerates both CI pipelines and local developer workflows by reusing existing build outputs across your team.

Can I optimize Bazel custom rules and toolchains for Python and JavaScript?

Optimize Bazel custom rules and toolchains for Python and JavaScript by creating or refining BUILD files, platforms, and toolchain setups to improve build reproducibility and cache hit rates across your codebase.

What is the best way to troubleshoot Bazel build performance bottlenecks?

Troubleshoot Bazel build performance bottlenecks by running dependency analysis, profiling queries, and inspecting target structures to diagnose failures and identify inefficient dependency boundaries in your monorepo.

Do I need a specific .bazelrc configuration to improve Bazel cache hit rates?

You need an efficient .bazelrc configuration alongside WORKSPACE and BUILD.bazel files to improve Bazel cache hit rates, requiring precise platform and toolchain setup to maximize build reproducibility and throughput.