bazel-build-optimization
π―SkillHelps 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.
Installation
npx skills add wshobson/agents --skill bazel-build-optimizationRun 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.
/bazel-build-optimizationInstall 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
SKILL.md
View on GitHub β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
| Concept | Description |
|---|---|
| Target | Buildable unit (library, binary, test) |
| Package | Directory with BUILD file |
| Label | Target identifier //path/to:target |
| Rule | Defines how to build a target |
| Aspect | Cross-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
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.
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.
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.
Intelligent automation and multi-agent orchestration for Claude Code
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.
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.
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.
Claude Code plugin for observability and monitoring including logging, metrics, distributed tracing, and alerting, part of the wshobson/agents marketplace with 73 focused plugins.
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.
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.