Tooluck logoTooluck
SKILL.md

bazel-build-optimization

Agent skill fromrmyndharis/antigravity-skills

Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.

How to install bazel-build-optimization

install bazel-build-optimization
# install the antigravity-skills pack with the skills CLI
npx skills add rmyndharis/antigravity-skills

# or add only this skill to Claude Code: copy the folder

skills/bazel-build-optimization/

# into

~/.claude/skills/bazel-build-optimization/ (all projects)

.claude/skills/bazel-build-optimization/ (one project)

skills/bazel-build-optimization/SKILL.md

MITFull file
1# Bazel Build Optimization
2
3Production patterns for Bazel in large-scale monorepos.
4
5## Do not use this skill when
6
7- The task is unrelated to bazel build optimization
8- You need a different domain or tool outside this scope
9
10## Instructions
11
12- Clarify goals, constraints, and required inputs.
13- Apply relevant best practices and validate outcomes.
14- Provide actionable steps and verification.
15
16## Use this skill when
17
18- Setting up Bazel for monorepos
19- Configuring remote caching/execution
20- Optimizing build times
21- Writing custom Bazel rules
22- Debugging build issues
23- Migrating to Bazel
24
25## Core Concepts
26
27### 1. Bazel Architecture
28
29```
30workspace/
31├── WORKSPACE.bazel # External dependencies
32├── .bazelrc # Build configurations
33├── .bazelversion # Bazel version
34├── BUILD.bazel # Root build file
35├── apps/
36│ └── web/
37│ └── BUILD.bazel
38├── libs/
39│ └── utils/
40│ └── BUILD.bazel
41└── tools/
42 └── bazel/
43 └── rules/
44```
45
46### 2. Key Concepts
47
48| Concept | Description |
49|---------|-------------|
50| **Target** | Buildable unit (library, binary, test) |
51| **Package** | Directory with BUILD file |
52| **Label** | Target identifier `//path/to:target` |
53| **Rule** | Defines how to build a target |
54| **Aspect** | Cross-cutting build behavior |
55
56## Templates
57
58### Template 1: WORKSPACE Configuration
59
60```python
61# WORKSPACE.bazel
62workspace(name = "myproject")
63
64load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
65…

Excerpt shown under the repository's MIT license.

More skills in antigravity-skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates