bazel-build-optimization
What it does
This skill helps optimize how Bazel, a build tool, works on large projects. It teaches production patterns so your projects build faster and more reliably.
When to use it
- βWhen setting up Bazel for the first time on a large project.
- βWhen trying to make Bazel use remote computers to speed up builds.
- βWhen trying to figure out why builds are taking too long.
Skill link
https://github.com/wshobson/agents/blob/main/plugins/developer-essentials/skills/bazel-build-optimization/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHow can I configure Bazel to make my builds faster on our large project?β
5 new skills a week. 1 minute to read.
How it works
It provides examples and best practices for organizing your project files and configuring Bazel. This helps Bazel better understand how to build your code, making the process more efficient.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
FAQ
What is Bazel?
Bazel is a tool that helps build (turn code into an executable program) software projects, especially large and complex ones.
What is a 'monorepo'?
A monorepo is a single code repository that holds many different projects.
What does 'optimize builds' mean?
It means making the software building process faster and use fewer computer resources.
Details
Original description by the author
Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.
repo: wshobson/agents
Popularity
- GitHub stars
- 41k
- Ranking position
- #6675
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
screen-reader-testing
41kHas your agent test websites using screen readers to ensure they are accessible.
wcag-audit-patterns
41kHelps your agent audit websites for accessibility and fix issues according to WCAG guidelines.
multi-reviewer-patterns
41kEnables your agent to coordinate parallel code reviews, deduplicating findings and consolidating reports.
parallel-debugging
41kAllows the agent to debug complex issues with parallel investigations and root cause analysis.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.