Bazel Skill
SkillDev toolsHermetic Bazel build, test, and packaging commands for the Moosync project. Covers building all targets through rules_rust, running tests, creating distribution packages via @pkg//:all, dependency management with bzlmod (MODULE.bazel), sandbox-safe builds, and patching external rules.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Bazel Skill skill
What this skill tells your AI
The instructions your AI receives, as published by moosync/moosync in .agents/skills/bazel/SKILL.md and read by ahel’s review.
Description
The Bazel skill wraps common Bazel commands used throughout the Moosync repository. It enforces hermetic builds and provides quick shortcuts for building targets, running tests, and packaging the entire project.
Hermeticity is a core requirement: all dependencies must be declared in
BUILD.bazelfiles or fetched viarules_rust. This skill avoids accidental use ofbazel cleanor non-hermetic commands.
Commands
| Command | Description | Example |
|---|---|---|
| Build target | Build any Bazel label. | bazel build //core/player:player |
| Test target | Run tests for a given target. | bazel test //core/database:database_test |
| Package all | Build distribution packages defined under the package/ directory (AUR, DEB, Flatpak, etc.). | bazel build @pkg//:all |
Usage Guidelines
- Never run
bazel cleanunless explicitly requested by a user; it can invalidate cached outputs and mask real build issues. - Use the
@pkgrepository to trigger packaging for all supported platforms. - For incremental builds, rely on Bazel's caching rather than manual cleaning.
- Never add extra flags or change the platform while building bazel rules unless explicitly specified by the user.
Example Workflow
# Build a core crate
bazel build //core/player:player
# Run tests (aggregated under core_tests at root level)
bazel test //core/database:database_test
# Package all distribution artifacts
bazel build @pkg//:all
Bzlmod Dependency Management
- All dependencies are managed through
MODULE.bazeland included sub-files undermodules/. - Rust crates: declared in
modules/crates.MODULE.bazelvia thecrates.iointegration. - Toolchains: registered in
modules/rust_toolchains.MODULE.bazel.
Patching External Rules
When patching external rules, always:
- Generate patches via
git diffagainst the clean remote repository commit. - Place patches under
patches/and expose them viaexports_files()in aBUILDfile. - Configure
git_overridewithpatchesandpatch_stripattributes inMODULE.bazel.
Signals
- GitHub stars
- 257
- Forks
- 13
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
bazel-moosync- Source
- github.com/moosync/moosync