proto-regen

Regenerate Go, Python, and TypeScript code from edited proto files via just gen.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

After editing any .proto file under proto/ or server/sdk/v1/pb/, or modifying root/server buf.yaml, buf.gen.yaml, or buf.lock, you must regenerate all generated code to keep server handlers, client APIs, and SDKs in sync and prevent stale shapes.

Core Features & Use Cases

  • Automatically trigger end-to-end regeneration after proto changes to reflect updated messages, services, and fields across Go, Python, and TypeScript code.
  • Ensure server handlers, client API hooks, and SDK consumers stay in sync with proto definitions by coordinating code generation steps via just gen.
  • Use case: after adding a new RPC or field, run just gen and confirm all generated outputs and wiring are up to date to avoid runtime discrepancies.

Quick Start

From the repo root, run just gen after editing proto files to regenerate all outputs.

Frequently Asked Questions about proto-regen

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

FAQPage Schema
How do I regenerate code after editing proto files?

To regenerate code after editing proto files, run the just gen command from the repository root. This executes buf generate to update all generated Go, Python, and TypeScript outputs, ensuring server handlers and client APIs reflect the new proto shapes.

When should I run buf generate after modifying proto definitions?

You must run buf generate whenever you edit any .proto file under proto/ or server/sdk/v1/pb/, or modify buf.yaml, buf.gen.yaml, or buf.lock. Regenerating keeps server handlers, client API hooks, and SDK consumers synced with updated proto definitions.

Does proto-regen support generating code for Go, Python, and TypeScript clients?

Yes, proto-regen supports generating code for Go server, Go SDK, Python SDK, and TypeScript clients. It coordinates the code generation pipeline via just gen to ensure all client API hooks and server handlers align with the edited proto messages and services.

Why are my server handlers out of sync after adding a new RPC field?

Server handlers are out of sync because generated code was not regenerated after proto edits. Running just gen drives buf generate to update all outputs, verifying that server handlers and client API hooks reflect the newly added RPC fields to prevent runtime discrepancies.

What is the best way to keep SDKs in sync with proto changes?

The best way to keep SDKs in sync is running just gen after modifying proto files or buf configuration. This end-to-end regeneration ensures Go and Python SDKs, along with TypeScript clients, consume updated message and service shapes.

Do I need to update buf.lock before regenerating protobuf code?

If you modify buf.lock, you must regenerate code by running just gen. The proto-regen process monitors changes to buf.lock, buf.yaml, and buf.gen.yaml to trigger buf generate, ensuring all generated outputs align with the updated dependency and plugin configurations.