bazel-build-optimization
Makes your agent optimize the building of large code projects. It improves speed and efficiency when code is compiled.
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.
Example of what to ask your AI
“How can I configure Bazel to make my builds faster on our large project?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
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.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add wshobson/agents --skill bazel-build-optimizationOr download just the file:
curl -L https://raw.githubusercontent.com/wshobson/agents/main/plugins/developer-essentials/skills/bazel-build-optimization/SKILL.md -o SKILL.mdTechnical 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
- #4842
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
screen-reader-testing
Has your agent test websites using screen readers to ensure they are accessible.
wshobson/agents
wcag-audit-patterns
Helps your agent audit websites for accessibility and fix issues according to WCAG guidelines.
wshobson/agents
multi-reviewer-patterns
Enables your agent to coordinate parallel code reviews, deduplicating findings and consolidating reports.
wshobson/agents
parallel-debugging
Allows the agent to debug complex issues with parallel investigations and root cause analysis.
wshobson/agents
Similar skills
bun-runtime
Has your agent use Bun to run, organize, and test code. It helps choose Bun over other tools and migrate existing projects.
affaan-m/ECC
database-migrations
Helps your agent make safe changes to databases. It ensures changes can be undone and minimizes downtime.
affaan-m/ECC
deployment-patterns
Sets up deployment and CI/CD workflows, containerization, and rollback strategies to ensure safe releases.
affaan-m/ECC