Skill Detail

Bazel Build Graph Analyzer

Analyzes Bazel build dependency graphs to identify bottlenecks and optimize build times. Uses the Bazel Query Language (BQL), Action Graph API, and Build Event Protocol (BEP) for deep build analysis.

Developer ToolsMCP
Developer Tools MCP Security Reviewed
โญ 25.3k GitHub stars
INSTALL WITH ANY AGENT
npx skills add agentskillexchange/skills --skill bazel-build-graph-analyzer Copy
Works best when you want a reusable capability, not another fragile one-off prompt.
At a glance
Author
Bazel
Last updated
Mar 24, 2026
Quick brief

The Bazel Build Graph Analyzer provides deep inspection of Bazel build dependency structures using the Bazel Query Language and Action Graph API. It parses the Build Event Protocol (BEP) output stream to identify critical path bottlenecks and suggest parallelization improvements.

How it works

What this skill actually does

The agent executes bazel query expressions including deps(), rdeps(), allpaths(), and somepath() to map dependency chains and detect unnecessary transitive dependencies. It analyzes action execution logs from the Build Event Protocol JSON profile to compute critical path duration and identify slow actions that dominate build times.

Key capabilities include Starlark rule analysis for custom build rule optimization, repository rule caching evaluation via the repository cache API, and remote execution performance analysis using the Remote Execution API v2 metrics. The agent generates build optimization reports with concrete recommendations for target splitting, visibility restriction, and build configuration tuning using .bazelrc flag combinations. It also detects test sharding opportunities using bazel test –test_sharding_strategy analysis.