Bazel Build Optimization

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

2,047 stars 295 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add rmyndharis/antigravity-skills --skill bazel-build-optimization
Manual install
git clone --depth 1 https://github.com/rmyndharis/antigravity-skills.git /tmp/antigravity-skills
mkdir -p ~/.claude/skills
cp -r /tmp/antigravity-skills/skills/bazel-build-optimization ~/.claude/skills/bazel-build-optimization

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Bazel Build Optimization

Production patterns for Bazel in large-scale monorepos.

## Do not use this skill when

- The task is unrelated to bazel build optimization
- You need a different domain or tool outside this scope

## Instructions

- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.

## Use this skill when

- 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

### Template 1: WORKSPACE Configuration
Read the full skill on GitHub

Details

Skill name
bazel-build-optimization
Path
skills/bazel-build-optimization/SKILL.md
License
MIT
Repo updated
7 November 2026
Copies
Found in 3 GitHub repos

FAQ

What does the Bazel Build Optimization skill do?

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

How do I install the Bazel Build Optimization skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add rmyndharis/antigravity-skills --skill bazel-build-optimization. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Bazel Build Optimization popular?

It lives in rmyndharis/antigravity-skills, which has 2,047 GitHub stars and 295 forks.

Related skills

Airflow Dag Patterns

2k

rmyndharis/antigravity-skills

Build production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.

Testing & QA295

Agent Orchestration Improve Agent

2k

rmyndharis/antigravity-skills

Systematic improvement of existing agents through performance analysis, prompt engineering, and continuous iteration.

AI, LLMs & Agents295

Agent Orchestration Multi Agent Optimize

2k

rmyndharis/antigravity-skills

Optimize multi-agent systems with coordinated profiling, workload distribution, and cost-aware orchestration. Use when improving agent performance, throughput, or reliability.

AI, LLMs & Agents295

C4 Architecture C4 Architecture

2k

rmyndharis/antigravity-skills

Generate comprehensive C4 architecture documentation for an existing repository/codebase using a bottom-up analysis approach.

Software Development295

Backend Patterns

2k

xu-xiang/everything-claude-code-zh

Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.

Software Development332

C4 Code

2k

rmyndharis/antigravity-skills

Expert C4 Code-level documentation specialist. Analyzes code directories to create comprehensive C4 code-level documentation including function signatures, arguments, dependencies, and code structure. Use when documenting code at the lowest C4 level for individual directories and code modules.

Software Development295

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.