Bazel Build Optimization
SkillAI & modelsBazel build optimization is a skill that guides an AI agent through configuring Bazel for large monorepos. It covers workspace setup, remote caching and execution, custom rules, and build performance tuning. The agent uses its patterns and reference examples to help you set up and speed up Bazel builds in enterprise codebases.
Use Bazel Build Optimization in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Bazel Build Optimization and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Bazel Build Optimization skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Have a Bazel project or monorepo that you want to configure or speed up.
What your AI can do with it
- Set up Bazel workspaces for monorepos
- Configure remote caching and remote execution
- Write custom Bazel rules
- Optimize build times with fine-grained targets
- Debug Bazel build issues
- Migrate an existing build to Bazel
Getting started
- Have a Bazel project or monorepo that you want to configure or speed up.
- Add the skill to your agent so it can read the Bazel patterns and reference file.
- Ask the agent to review your WORKSPACE.bazel, .bazelrc, and BUILD files.
- Have the agent apply the templates and best practices to your build configuration.
- Run your Bazel build and check that caching and target setup work as intended.
What this skill tells your AI
The instructions your AI receives, as published by wshobson/agents in plugins/developer-essentials/skills/bazel-build-optimization/SKILL.md and read by ahel’s review.
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
Signals
- GitHub stars
- 40k
- Forks
- 4k
- Last commit
- Sep 2026
Others that do the same job
Questions
- When should I use this skill?
- Use it when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.
- Does it support remote caching and execution?
- Yes. The skill includes patterns for configuring remote caching and remote execution in large monorepos.
- Can it help write custom Bazel rules?
- Yes. It provides patterns and worked examples for writing custom Bazel rules.
- Where are the templates and worked examples?
- They live in a reference file called references/details.md, which the agent reads when concrete templates are needed.
Advanced
- Item type
- skill
- Key
bazel-build-optimization-wshobson- Source
- github.com/wshobson/agents
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptskill-creator
Skill · anthropics
More in AI & modelswayfinder
Skill · mattpocock
More in AI & modelsalgorithmic-art
Skill · anthropics
More in AI & modelscode-review-and-quality
Skill · addyosmani
More in AI & models