Skip to main content
skill Claude Code CX Codex Cursor

bazel-build-optimization — Claude Code skill

This skill helps configure Bazel for monorepos, remote execution, and build caching. Use it when build setup or debugging needs a clear Bazel workflow.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install developer-essentials@claude-code-workflows
Open on GitHub

What bazel-build-optimization does

bazel-build-optimization covers Bazel setup for large monorepos. It explains how to arrange WORKSPACE.bazel, .bazelrc, .bazelversion, and BUILD.bazel, then work with packages, targets, labels, rules, and aspects. The skill also addresses Bazel migration, custom rules, build warnings, and build failures.

Its guidance favors fine-grained targets for better caching, pinned dependencies for reproducible builds, remote caching, and deliberate visibility settings. Worked templates and detailed examples are stored in references/details.md; read that file when you need concrete patterns. The project needs Bazel and its standard configuration files.

Install it when you are configuring or migrating a Bazel monorepo. It has little to add to a project that does not use Bazel.

What it helps with

  • set up Bazel for a monorepo
  • enable remote caching and execution
  • trace a slow Bazel build
  • write a custom Bazel rule
  • debug a build failure

Example prompts for the agent

  • Set up Bazel for this monorepo and inspect `WORKSPACE.bazel`.
  • Find the cause of the slow build and suggest finer-grained targets for caching.
  • Create a custom Bazel rule using the templates in `references/details.md`.

How to install bazel-build-optimization

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install developer-essentials@claude-code-workflows

This installs the whole developer-essentials plugin with all its skills

2Skills CLI (Vercel)

npx skills add wshobson/agents --skill bazel-build-optimization -a claude-code

3Manually: put the files in place

~/.claude/skills/bazel-build-optimization/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/bazel-build-optimization/

From the same set213

The whole set →
typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs tailwind-design-system Seth Hobson Helps build design systems with Tailwind CSS v4, from theme tokens to component variants. Use it when a project needs shared UI patterns. Claude Code CX Codex Cursor 70,180installs brand-landingpage Travis D. Elliott This skill interviews you about the product and its visual direction, then builds a landing page through Stitch. Use it when there’s no established design yet. Claude Code CX Codex Cursor 39,476installs python-testing-patterns Seth Hobson This skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. Claude Code CX Codex Cursor 36,943installs python-performance-optimization Seth Hobson This skill profiles Python code to locate CPU and memory bottlenecks. Use it when an application responds slowly or consumes too many resources. Claude Code CX Codex Cursor 35,675installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs api-design-principles Seth Hobson Use this skill to plan or review REST and GraphQL APIs. It helps when writing a specification or setting API conventions for a team. Claude Code CX Codex Cursor 30,348installs code-review-excellence Seth Hobson This skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. Claude Code CX Codex Cursor 30,193installs

Similar

google-cloud-solution-hybrid-search-alloydb official google This skill helps design and validate AlloyDB hybrid search, combining semantic retrieval with keyword search and structured SQL filters. Claude Code Gemini CLI CX Codex 3,300installs terraform-skill Anton Babenko Guides Terraform and OpenTofu refactoring, state migrations, and CI workflows. Diagnoses risks like identity churn and blast radius before generating HCL. Claude Code CX Codex Cursor +1 7,400installs google-cloud-storage-bucket-architect official google This skill plans and creates Google Cloud Storage buckets around a workload and the project's security settings. Use it when an app, service, or pipeline needs object storage. Claude Code Gemini CLI CX Codex 2,800installs wizard Matt Pocock This skill creates an interactive bash wizard for manual setup steps, CI secrets, third-party dashboards, and one-off migrations. Claude Code 553,369installs hyperframes-cli heygen-com Controls HyperFrames video workflows from the CLI: audits layouts and contrast, edits timeline clips, captures snapshots, and renders locally or in cloud runtimes. Claude Code CX Codex Cursor +1 1,200,000installs setup-pre-commit Matt Pocock This skill configures pre-commit checks for a JavaScript repository, running Prettier, type checking, and tests before each commit. Claude Code 489,289installs using-git-worktrees Jesse Vincent Prepares an isolated workspace before feature work or plan execution. It checks the repository first, then uses native worktree support or Git. Claude Code CX Codex 217,153installs finishing-a-development-branch Jesse Vincent This skill checks the test suite and guides branch completion: merge locally, open a Pull Request, or leave the work in place. Claude Code CX Codex 214,439installs

Questions about bazel-build-optimization

How do I install bazel-build-optimization in Claude Code?

Run npx skills add wshobson/agents --skill bazel-build-optimization -a claude-code. The skill file is placed at ~/.claude/skills/bazel-build-optimization/SKILL.md.

What does bazel-build-optimization do?

It guides Bazel configuration, remote caching and execution, build debugging, monorepo migration, and custom rule authoring.

Which Bazel files does it cover?

It covers the roles of WORKSPACE.bazel, .bazelrc, .bazelversion, and BUILD.bazel, including per-directory BUILD files.

Source text

SKILL.md · MIT
---
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

© Seth Hobson · MIT · wshobson/agents

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor