
Bazel Build Optimization
For teams running multi-language monorepos at scale, this handles the gnarly parts of Bazel configuration that usually take weeks to figure out. It covers remote caching setup, proper .bazelrc tuning for CI/CD, and cross-language dependency management between TypeScript, Python, and other ecosystems. The custom rule templates and query examples are especially useful when you're debugging why builds are slow or writing your own tooling. Most teams underestimate Bazel's complexity until they hit performance walls, and this gives you the production patterns that Google-scale companies actually use rather than basic tutorials.
- skills.sh installs
- 10.6K
- GitHub stars
- 42.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wshobson/agents --skill bazel-build-optimization --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Sponsors
Promote your product hereReach 125k+ visitors monthlyPromote your product hereReach 125k+ visitors monthly
Agent CaffeineSponsoredClose your lid, come back to finished work
SnugSponsoredThe clipboard manager for the AI eraPromote your product hereReach 125k+ visitors monthly
WaxSponsoredBlock anything with supervision, without erasing your iPhonePromote your product hereReach 125k+ visitors monthly
knobsSponsoredSee your site on any phone, any day, in any language
Details
- Repository
- github.com/wshobson/agents
- Categories
- DevOps & CI/CD, Debugging
More from wshobson/agents
All 174- Istio Traffic Management10.6K
- Nft Standards10.6K
- Linkerd Patterns10.6K
- Parallel Debugging10.4K
- Parallel Feature Development10.3K
- Task Coordination Strategies10.2K
- Multi Reviewer Patterns10.2K
- Team Communication Protocols10K
- Team Composition Patterns10K
- Evaluation Methodology7.6K
- Hads6.9K
- Block No Verify Hook6.9K
- Signed Audit Trails Recipe6.7K
- Protect Mcp Setup6.3K
- Review Agent Setup5.6K
- Scan5K
- Recsys Pipeline Architect4.6K
- Social Publishing4K
- Before You Build3.5K
- File Conversion3.4K
- Ai Debt Detector3.4K
- Session Guard3.2K
- Dataset Curation3K
- Eval Harness First3K
Recommended
More DevOps & CI/CD1
asc-build-lifecyclerorkai/app-store-connect-cli-skillsTrack build processing, find latest builds, and clean up old builds with asc. Use when managing build retention or waiting on processing.7.6Kskills.sh installs
2
build-mcpbanthropics/claude-plugins-officialThis skill should be used when the user wants to "package an MCP server", "bundle an MCP", "make an MCPB", "ship a local MCP server", "distribute a local MCP", 6.9Kskills.sh installs
5
incident-responseanthropics/knowledge-work-pluginsRun an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs sev6Kskills.sh installs
6
orch-pipelineaffaan-m/eccShared orchestration engine for the orch-* skill family. Defines the gated Research-Plan-TDD-Review-Commit pipeline, the size classifier, the agent map, and the4.8Kskills.sh installs