buf-version-pinning

Pin Buf plugin versions across buf.yaml, buf.lock, and buf.gen.yaml.

49|15|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/block/proto-fleet --skill buf-version-pinning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: buf-version-pinning
Source: https://github.com/block/proto-fleet/tree/main/.claude/skills/buf-version-pinning
Command: npx skills add https://github.com/block/proto-fleet --skill buf-version-pinning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pinning Buf plugin versions keeps generated code stable by preventing unintended diffs when buf.gen.yaml, buf.yaml, or buf.lock change.

Core Features & Use Cases

  • Pin and align plugin versions across buf.yaml, buf.lock, and buf.gen.yaml to prevent drift.
  • Predict and surface regen impact before merging.
  • Validate that buf.lock and dependencies align after plugin changes.
  • Guidance to run just gen and group diffs for downstream consumers (Connect-RPC, sqlc, SDK shapes).

Quick Start

Update the plugin version in buf.gen.yaml and run just gen to review the regen impact before committing.

Frequently Asked Questions about buf-version-pinning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does updating buf.gen.yaml cause large unrelated diffs in generated code?

Unpinned Buf plugin versions cause large unrelated diffs in generated code because version bumps trigger wide regeneration across all outputs. Pinning plugin versions across buf.yaml, buf.lock, and buf.gen.yaml prevents this unintended drift and keeps generated code stable.

How do I pin Buf plugin versions to prevent downstream breakage?

To pin Buf plugin versions, update the plugin version in buf.gen.yaml, run just gen to review the regen impact, then reconcile buf.lock with buf.yaml changes. This ensures generated outputs remain consistent and prevents downstream breakage for Connect-RPC, sqlc, and SDK consumers.

What is the best way to predict regen impact before merging Buf plugin changes?

The best way to predict regen impact is to update the plugin version in buf.gen.yaml and run just gen to group diffs for downstream consumers. This surfaces compatibility concerns for Connect-RPC, sqlc, and SDK shapes before merging the changes.

When do I need to reconcile buf.lock with buf.yaml after a plugin version change?

You need to reconcile buf.lock with buf.yaml immediately after any Buf plugin version change to validate that dependencies align. This prevents drift across configuration files and ensures generated outputs remain consistent after regeneration.

Does pinning Buf plugin versions work with Connect-RPC and sqlc generated code?

Yes, pinning Buf plugin versions works with Connect-RPC and sqlc generated code. It stabilizes SDK shapes by preventing unintended diffs when configuration files change, requiring deliberate version updates and verification that generated outputs remain consistent.