/bazel-build-optimization
Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.
Claude Code
$ npx -y skills add wshobson/agents --skill bazel-build-optimization --agent claude-code
Codex
$ npx skills add wshobson/agents --skill bazel-build-optimization -a codex -y
Cursor
$ npx skills add wshobson/agents --skill bazel-build-optimization -a cursor -y
Gemini CLI
$ npx skills add wshobson/agents --skill bazel-build-optimization -a gemini-cli -y
GitHub Copilot
$ npx skills add wshobson/agents --skill bazel-build-optimization -a github-copilot -y
OpenCode
$ npx skills add wshobson/agents --skill bazel-build-optimization -a opencode -y
Windsurf
$ npx skills add wshobson/agents --skill bazel-build-optimization -a windsurf -y
SKILL.md
bazel-build-optimization.SKILL.mdname: bazel-build-optimization
description: 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
Read more
name: bazel-build-optimization description: 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
Use one collection of plugins, agents, skills, and commands across Claude Code, OpenAI Codex CLI, Cursor, OpenCode, Antigravity CLI, GitHub Copilot, and Pi. A harness is the coding tool that loads and runs the components.
Other skills on agents.
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, orโฆ
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Questions about bazel-build-optimization.
- Which coding agents can use bazel-build-optimization?
- bazel-build-optimization installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

