bazel
Use when writing Bazel BUILD files with cc_library or cc_binary rules, Bzlmod dependencies, toolchain registration, remote execution, sandbox debugging, or bazel query and cquery graphs.
Install / Use
npx skills add OutlineDriven/outline-driven-development --skill bazelInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Content & MediaSupported Platforms
Tags
Our assessment of bazel
bazel scores 69/100 on our quality scale, 1091st of 1,180 Content & Media skills we index.
Its SKILL.md is 7.0 KB long, well organised into 13 sections with 11 code examples: a thorough specification that gives an agent plenty to work with.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- We could not determine when the repository was last updated.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit โ read the skill file before letting an agent act on it.
bazel compared with similar skills
All 4 of these similar skills score higher than bazel; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| bazel (this skill)by OutlineDriven | 69 | 0 | โ | SKILL.md |
| siyuanby siyuan-note | 100 | 46.9k | today | MCP Server |
| algorithmic-artby anthropics | 100 | 177.9k | 34d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 34d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 137.2k | 12d ago | SKILL.md |
Frequently asked questions
- How do I install bazel?
- Run
npx skills add OutlineDriven/outline-driven-development --skill bazel. The install tabs above show the steps for each supported agent. - Which AI agents does bazel work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is bazel safe to use?
- It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is bazel still maintained?
- We could not determine when the repository was last updated.
Skill content
View source on GitHubname: bazel description: 'Use when writing Bazel BUILD files with cc_library or cc_binary rules, Bzlmod dependencies, toolchain registration, remote execution, sandbox debugging, or bazel query and cquery graphs.' disable-model-invocation: true
Bazel
Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency graph queries, and sandbox debugging. Grounded against Bazel 9.2.0, where Bzlmod is always enabled, all WORKSPACE logic is removed, and every C++ rule loads from @rules_cc.
Contract
| Field | Bound contract |
|---|---|
| Trigger | The task writes or debugs Bazel BUILD files, cc_library/cc_binary/cc_test rules, Bzlmod dependencies, toolchain registration, remote execution, sandbox failures, or bazel query/cquery/aquery dependency graphs. |
| Authority | Reversible local: writes only BUILD files, MODULE.bazel, .bzl files, and Bazel output directories (bazel-out, bazel-bin); rollback is version control plus bazel clean. No remote mutation. |
| Side effect | Local builds write to the Bazel output base; remote execution and remote cache flags contact a user-supplied endpoint. |
| Done | The requested targets build or test with bazel build/bazel test, or the blocker is reported with the failing command and output. |
Inputs
- Project layout (required): the source tree and where BUILD files should live.
- Bazel version (required if not inferrable): run
bazel version. Bazel 9 removed WORKSPACE and the native C++ rules; instructions below assume Bazel 9. - External dependencies (optional): library names; versions come from the Bazel Central Registry.
- Remote execution endpoint (optional): a user-supplied remote execution or cache service URL.
Procedure
- Lay out the workspace. Bazel 9 uses
MODULE.bazelas the only dependency file; there is no WORKSPACE. Put aBUILDfile in each package directory. Done when:MODULE.bazelexists at the root and each package has aBUILDfile.
my-project/
โโโ MODULE.bazel
โโโ BUILD
โโโ src/
โ โโโ BUILD
โ โโโ main.cc
โโโ lib/
โโโ BUILD
โโโ mylib.cc
โโโ mylib.h
- Write BUILD rules. Load every C++ rule from
@rules_cc; the nativecc_library/cc_binary/cc_testrules were removed from Bazel 9. Done when: every target builds withbazel build.
# lib/BUILD
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
cc_library(
name = "mylib",
srcs = ["mylib.cc"],
hdrs = ["mylib.h"],
copts = ["-Wall", "-Wextra", "-std=c++23"],
visibility = ["//visibility:public"],
deps = [
"@abseil-cpp//absl/strings",
"//util:helpers",
],
)
cc_test(
name = "mylib_test",
srcs = ["mylib_test.cc"],
deps = [
":mylib",
"@googletest//:gtest_main",
],
)
# src/BUILD
load("@rules_cc//cc:defs.bzl", "cc_binary")
cc_binary(
name = "main",
srcs = ["main.cc"],
deps = ["//lib:mylib"],
linkopts = ["-lpthread"],
)
bazel build //src:main
bazel build //...
bazel test //lib:mylib_test
bazel run //src:main -- arg1 arg2
# Binary lands at bazel-bin/src/main
- Declare dependencies in
MODULE.bazelwithbazel_dep. Versions come from the Bazel Central Registry; the pins below are the versions Bazel 9.2.0 itself depends on. Done when:bazel mod graphresolves without errors.
# MODULE.bazel
module(name = "my_project", version = "1.0")
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "abseil-cpp", version = "20250814.1")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
bazel mod graph # full resolved dependency graph
bazel mod deps # direct and indirect module deps
bazel mod tidy # fix up MODULE.bazel declarations
- Query the dependency graph. Done when: the query answers the question asked.
bazel query "deps(//src:main)" # transitive deps
bazel query "rdeps(//..., //lib:mylib)" # reverse deps
bazel query "somepath(//src:main, //lib:mylib)" # dependency path
bazel cquery "deps(//src:main)" --output=files # configuration-aware
bazel cquery "//lib:mylib" --output=build # effective rule
bazel aquery "//src:main" # action graph: flags, inputs, outputs
- Register toolchains with platforms. Define a
platformwith constraint values, atoolchainbinding a toolchain target to a toolchain type, thenregister_toolchainsinMODULE.bazel. The C++ toolchain configuration API lives in rules_cc undercc/toolchains; seereferences/bazel-cpp-toolchain.md. Done when:bazel build --platforms=//platforms:<name>selects the registered toolchain.
# platforms/BUILD
platform(
name = "linux_x86_64",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
)
# MODULE.bazel
register_toolchains("//toolchains:my_cc_toolchain")
- Configure remote execution or caching when the user supplies an endpoint. Done when: the build runs against the endpoint or the flag is rejected and reported.
bazel build //... \
--remote_executor=grpc://build.example.com:50051 \
--remote_instance_name=main
# Cache only, no remote execution
bazel build //... --remote_cache=grpc://cache.example.com:9092
- Debug sandbox failures. Done when: the failing action is identified and its missing input or disallowed write is fixed.
bazel build //src:main --sandbox_debug # show sandbox inputs/outputs
bazel build //src:main --verbose_failures --sandbox_debug
bazel build //src:main --spawn_strategy=local # bypass sandbox to isolate it
bazel build //src:main --subcommands # print each command run
Common sandbox causes: "No such file or directory" means a missing data or srcs entry; "Permission denied" means a write outside the sandbox, fixed by routing outputs through declared rule outputs.
Failure and recovery
bazel buildfails on a missing load: addload("@rules_cc//cc:defs.bzl", ...)for the rule used; Bazel 9 has no native C++ rules.bazel_depversion not found: runbazel mod graphto see the error, then pick a version listed in the Bazel Central Registry.- Sandbox error persists after adding inputs: reproduce with
--spawn_strategy=local; if the local run passes, the sandbox is missing a declared input. - Remote execution unreachable: drop
--remote_executorand rebuild locally; report the endpoint failure rather than retrying blindly. - Query returns empty: check the target pattern with
bazel query "//..."first; an empty pattern means the package path is wrong. - Migration from WORKSPACE: run the Bzlmod migration path (
bazel mod tidyafter declaring deps); do not recreate WORKSPACE, Bazel 9 ignores it.
Output
Working BUILD files and MODULE.bazel declarations, a verified bazel build/bazel test invocation, and for debugging tasks the identified failing action with its fix. For toolchain work, a registered toolchain plus platform pair verified by --platforms.
Related Skills
siyuan
46.9kAn open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together ๅผๆบใ้็งไผๅ ใ่ชๆ็ฎก็็ฅ่ฏๅทฅไฝ็ฉบ้ด๏ผ่ฎฉไบบไธๆบ่ฝไฝๅจๆญคๅไฝ
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way โ as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an emโฆ
design
137.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVGโฆ
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit โ see the Safety scan above for what the skill file itself contains.
