use-buf
Skill207 starsChanged 36 days agoApache-2.0View on GitHub
Configure, inspect, update, validate, and troubleshoot Buf workspaces and modules. Use when working with buf.yaml, buf.lock, buf.gen.yaml or domain-specific Buf generation templates; managing BSR dependencies; formatting, linting, generating, detecting breaking Protobuf changes; locating dependency schemas; or diagnosing missing types and generation failures.
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/unsafe-checker/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/rust-rustrover-cargo.mdcCursor rule
- ast-grepSkill
- auv-wayland-renderingSkill
- create-prSkill
- domain-cliSkill
- domain-cloud-nativeSkill
- domain-mlSkill
- domain-webSkill
- m01-ownershipSkill
- m02-resourceSkill
- m03-mutabilitySkill
- m04-zero-costSkill
- m05-type-drivenSkill
- m06-error-handlingSkill
- m07-concurrencySkill
- m09-domainSkill
- m10-performanceSkill
- m11-ecosystemSkill
- m12-lifecycleSkill
- m13-domain-errorSkill
- m14-mental-modelSkill
- m15-anti-patternSkill
- rust-call-graphSkill
- rust-code-navigatorSkill
- rust-deps-visualizerSkill
- rust-refactor-helperSkill
- rust-symbol-analyzerSkill
- rust-trait-explorerSkill
- simple-englishSkill
- unsafe-checkerSkill
- use-buf-pluginsSkill
- use-pixiSkill
- use-protobufSkill
- auvSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 6 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use the Buf CLI as the source of truth for Protobuf compilation, dependency resolution, linting, breaking-change detection, and code …
- Very specific: line 13
Search the repository root and likely API directories for buf.yaml, buf.lock, buf.gen.yaml, and buf.gen.<domain>.yaml files.
- Very specific: line 15
Run buf --version and check repository/CI tool pins before using features from a newer configuration schema.
- Very specific: line 18
Use one default buf.gen.yaml.
- Very specific: line 22
Use buf.yaml for workspaces/modules, BSR dependencies, lint rules, breaking rules, policies, and Buf check plugins.
- Very specific: line 23
Use buf.gen.yaml or buf.gen.<domain>.yaml for protoc-gen-* code-generation plugins, inputs, output directories, options, and managed mode.
- Very specific: line 24
Use buf.lock as generated dependency resolution state.
- Distinctive: line 25
Keep configuration in the repository root or the established API workspace directory unless repository structure requires otherwise.
- Distinctive: line 27
Read references/configuration.md before adding modules, dependencies, check plugins, generation templates, or output paths.
- Distinctive: line 31
Prefer BSR modules for maintained dependencies, including Google APIs, well-known types, Protovalidate, and grpc-gateway annotations.
- Very specific: line 32
Add or remove dependencies in buf.yaml, then run buf dep update and inspect the buf.lock diff.
- Very specific: line 33
Use buf dep graph --format json to identify the resolved dependency chain.
- Very specific: line 34
Use buf dep prune only after confirming an import is genuinely unused.
- Very specific: line 35
When a type appears missing, inspect configuration and the lockfile, run buf dep update, then run buf build or buf generate to obtain the …
- Very specific: line 36
Never hardcode an operating system's Buf cache location.
- Distinctive: line 40
After changing first-party Protobuf or Buf configuration, MUST run:
- Distinctive: line 61
Run the breaking check against main.
- Very specific: line 63
Use $use-buf-plugins for remote/local plugin selection, offline generation, rate limits, or plugin wrappers.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Use Buf
Use the Buf CLI as the source of truth for Protobuf compilation, dependency resolution, linting, breaking-change detection, and code generation.
Inspect Before Changing
- Read repository instructions.
- Search the repository root and likely API directories for
buf.yaml,buf.lock,buf.gen.yaml, andbuf.gen.<domain>.yamlfiles. - Inspect the configuration version, module paths, dependency declarations, lint policy, breaking policy, inputs, plugin pins, output paths, and existing generation scripts.
- Run
buf --versionand check repository/CI tool pins before using features from a newer configuration schema. - Diagnose configuration or dependency problems before changing
.protofiles to work around them.
Use one default buf.gen.yaml. Introduce buf.gen.<domain>.yaml only when generation products genuinely require isolated plugin sets, inputs, or outputs. Pass non-default templates explicitly with buf generate --template <file>.
Keep Configuration Responsibilities Clear
- Use
buf.yamlfor workspaces/modules, BSR dependencies, lint rules, breaking rules, policies, and Buf check plugins. - Use
buf.gen.yamlorbuf.gen.<domain>.yamlforprotoc-gen-*code-generation plugins, inputs, output directories, options, and managed mode. - Use
buf.lockas generated dependency resolution state. Do not edit it manually. - Keep configuration in the repository root or the established API workspace directory unless repository structure requires otherwise.
Read references/configuration.md before adding modules, dependencies, check plugins, generation templates, or output paths.
Manage Dependencies Deliberately
- Prefer BSR modules for maintained dependencies, including Google APIs, well-known types, Protovalidate, and grpc-gateway annotations.
- Add or remove dependencies in
buf.yaml, then runbuf dep updateand inspect thebuf.lockdiff. - Use
buf dep graph --format jsonto identify the resolved dependency chain. - Use
buf dep pruneonly after confirming an import is genuinely unused. - When a type appears missing, inspect configuration and the lockfile, run
buf dep update, then runbuf buildorbuf generateto obtain the compiler's concrete import/type error. - Never hardcode an operating system's Buf cache location. Export the pinned module with
buf exportwhen source inspection is required.
Required Validation
After changing first-party Protobuf or Buf configuration, MUST run:
buf lint
buf generate
buf breaking --against '.git#branch=main'Also run buf format --diff or the repository's format check and all language-specific tests/type checks for generated outputs.
Do not skip the breaking check merely because a break is intentional. Run it, capture the violations, and report that the change is an approved experimental/unreleased break. If the repository does not have a main branch, report that exact baseline failure and resolve the intended integration baseline rather than silently omitting compatibility validation.
Diagnose in Dependency Order
- Confirm the current directory and discovered
buf.yaml. - Confirm module paths and import paths.
- Confirm dependencies and
buf.lockwithbuf dep graph. - Compile with
buf build. - Lint with
buf lint. - Generate with the selected template.
- Inspect plugin stderr, output collisions, and generated diffs.
- Run the breaking check against main.
Use $use-buf-plugins for remote/local plugin selection, offline generation, rate limits, or plugin wrappers. Read references/commands-and-troubleshooting.md for precise inspection commands and failure handling.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

