crud-proto-gen

Generate protobuf definitions and Go stubs for PowerX services.

357|65|Updated Jul 29, 2022
One-click install
npx skills add https://github.com/ArtisanCloud/PowerX --skill crud-proto-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crud-proto-gen
Source: https://github.com/ArtisanCloud/PowerX/tree/main/.codex/skills/crud/proto-gen
Command: npx skills add https://github.com/ArtisanCloud/PowerX --skill crud-proto-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It ensures consistent organization, generation, and linting of protobuf files across PowerX, removing manual setup errors and mismatched go_package paths.

Core Features & Use Cases

  • Unified proto layout: source files in api/grpc/** and generated code in api/grpc/gen/**.
  • Buf integration: workspace management, linting, breaking-change checks, and generation via buf.gen.yaml.
  • Automatic Make targets: proto-gen, proto-lint, proto-clean for reproducible builds.
  • Version‑controlled outputs: go_package prefixes aligned with repository path and optional .gitignore handling. Use case: When adding a new service, developers follow the provided yaml rules and make targets to generate Go stubs without hand‑editing.

Quick Start

Execute the proto-gen make target from the repository root to generate the Go protobuf stubs for the new service.

Frequently Asked Questions about crud-proto-gen

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

FAQPage Schema
How do I generate Go stubs from protobuf definitions using buf and Make?

Generating Go stubs requires running the proto-gen Make target from the repository root, which uses your buf.gen.yaml configuration to compile api/grpc/** source files into api/grpc/gen/** outputs.

Why do I need a buf workspace for protobuf code generation?

A buf workspace, defined by buf.work.yaml, is needed for protobuf code generation because it manages multiple proto modules, enforces consistent go_package prefixes, and enables breaking-change checks across your repository.

What Make targets are required for linting and cleaning generated proto files?

The required Make targets for proto files are proto-lint to check formatting and breaking changes, and proto-clean to remove generated Go stubs, ensuring reproducible builds without manual file editing.

Do I need specific buf configuration files to generate Go protobuf stubs?

Yes, generating Go protobuf stubs requires buf.yaml, buf.gen.yaml, and buf.work.yaml configuration files, along with appropriate go_package options and Makefile entries to define the workspace and generation rules.

What is the best way to organize proto files and generated Go code in a repository?

The best way to organize proto files is placing source definitions under api/grpc/** and directing generated Go stubs into api/grpc/gen/**, aligning go_package prefixes with your repository path for version-controlled outputs.

When should I not use automated buf generation for protobuf files?

You should not use automated buf generation when your repository lacks the required buf.yaml, buf.gen.yaml, buf.work.yaml workspace files, or the necessary proto-gen, proto-lint, and proto-clean Makefile entries.