🎯

bazel-build-optimization

🎯Skill

Helps you make Bazel, a tool that builds and tests code, faster and easier to manage in very large code projects. It covers setup, sharing build results between machines, custom build rules and fixing build problems.

wshobson/agents7,923 Installs27,673Last Updated Jan 19, 2026

Installation

$npx skills add wshobson/agents --skill bazel-build-optimization

Run it in a terminal; it asks which AI coding tools to install it for (Claude Code, Codex, Cursor and more).

Uses skills.sh Β· Node.js 22.20+

After installing

Ask for related work and the agent uses it on its own, or call it yourself.

Run it (Claude Code)/bazel-build-optimization
Install by hand

Copy the whole skill folder from GitHub to the place below. Copying only SKILL.md can leave out files the skill uses.

Open the skill folder β†’
  • This project .claude/skills/bazel-build-optimization/
  • All projects ~/.claude/skills/bazel-build-optimization/

These paths are for Claude Code. For other tools, the command above puts it in the right place.

What this skill does

Overview

This skill gives an AI assistant proven patterns for using Bazel in large monorepos. Bazel is a tool that builds and tests code. A monorepo is a single repository that holds many projects. The skill explains key files and ideas, such as targets, which are the things Bazel can build.

Key Features

  • Set up a Bazel project layout with the right config files.
  • Turn on remote caching so machines can reuse each other's build results.
  • Split code into small build targets so less needs to be rebuilt after a change.
  • Write custom build rules and debug builds that fail.
  • Move an existing project over to Bazel.

Who is this for?

It suits engineers working on large company codebases where builds are slow. It also helps teams adopting Bazel who want a short list of do's and don'ts.

Summarized by AI from this skill's SKILL.md. Suggest a better one

Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.

Bazel Build Optimization

Production patterns for Bazel in large-scale monorepos.

When to Use This Skill

  • Setting up Bazel for monorepos
  • Configuring remote caching/execution
  • Optimizing build times
  • Writing custom Bazel rules
  • Debugging build issues
  • Migrating to Bazel

Core Concepts

1. Bazel Architecture

workspace/
β”œβ”€β”€ WORKSPACE.bazel       # External dependencies
β”œβ”€β”€ .bazelrc              # Build configurations
β”œβ”€β”€ .bazelversion         # Bazel version
β”œβ”€β”€ BUILD.bazel           # Root build file
β”œβ”€β”€ apps/
β”‚   └── web/
β”‚       └── BUILD.bazel
β”œβ”€β”€ libs/
β”‚   └── utils/
β”‚       └── BUILD.bazel
└── tools/
    └── bazel/
        └── rules/

2. Key Concepts

ConceptDescription
TargetBuildable unit (library, binary, test)
PackageDirectory with BUILD file
LabelTarget identifier //path/to:target
RuleDefines how to build a target
AspectCross-cutting build behavior

Templates and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's

  • Use fine-grained targets - Better caching
  • Pin dependencies - Reproducible builds
  • Enable remote caching - Share build artifacts
  • Use visibility wisely - Enforce architecture
  • Write BUILD files per directory - Standard convention

Don'ts

  • Don't use glob for deps - Explicit is better
  • Don't commit bazel-* dirs - Add to .gitignore
  • Don't skip WORKSPACE setup - Foundation of build
  • Don't ignore build warnings - Technical debt

More from this repository10

🎯
tailwind-design-system🎯Skill

Helps you build a consistent look for your app with Tailwind CSS v4. It sets up shared colors, sizes, dark mode and reusable components so every screen matches.

🎯
typescript-advanced-types🎯Skill

A guide to TypeScript's advanced type features, which describe the shape of your data so mistakes are caught before the code runs. It covers reusable types, types that change based on rules, and built-in helper types, with short examples.

🎯
nodejs-backend-patterns🎯Skill

Guidance for building reliable server-side apps with Node.js, using Express or Fastify. It covers login, error handling, databases, API design and a list of proven best practices.

πŸͺ
wshobson-agentsπŸͺMarketplace

Intelligent automation and multi-agent orchestration for Claude Code

πŸ”Œ
framework-migrationπŸ”ŒPlugin

Claude Code plugin for AI-powered framework migration workflows, coordinating specialized agents to plan and execute transitions between technology stacks as part of the wshobson/agents marketplace.

πŸ”Œ
payment-processingπŸ”ŒPlugin

A Claude Code plugin for payment system integration covering Stripe, PayPal, and billing platforms with checkout flows, subscription management, and webhook handling in the wshobson/agents ecosystem.

πŸ”Œ
developer-essentialsπŸ”ŒPlugin

A Claude Code plugin bundling core development tools and agents for everyday tasks like debugging and code generation, part of the wshobson/agents marketplace with 73 focused plugins.

πŸ”Œ
observability-monitoringπŸ”ŒPlugin

Claude Code plugin for observability and monitoring including logging, metrics, distributed tracing, and alerting, part of the wshobson/agents marketplace with 73 focused plugins.

πŸ”Œ
deployment-strategiesπŸ”ŒPlugin

A Claude Code plugin providing specialized AI agents for deployment strategy planning and execution, covering blue-green deployments, canary releases, rolling updates, and zero-downtime patterns.

πŸ”Œ
jvm-languagesπŸ”ŒPlugin

Claude Code plugin for JVM language development including Java, Kotlin, and Scala with specialized agents for idiomatic patterns, build tools, and runtime optimization in the wshobson/agents marketplace.