libcodegen

Generate JavaScript message classes, service stubs, and type definitions from .proto files.

1|1|Updated Aug 7, 2025
One-click install
npx skills add https://github.com/copilot-ld/copilot-ld --skill libcodegen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: libcodegen
Source: https://github.com/copilot-ld/copilot-ld/tree/main/packages/libcodegen
Command: npx skills add https://github.com/copilot-ld/copilot-ld --skill libcodegen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Protobuf-driven code generation for JavaScript reduces manual toil by producing strongly-typed message classes, service stubs, and type definitions from .proto files, ensuring consistency across services.

Core Features & Use Cases

  • TypeGenerator: Generates JavaScript classes from protobuf message definitions with type annotations.
  • ServiceGenerator: Creates gRPC service stubs matching proto service definitions.
  • DefinitionGenerator: Produces type definitions for IDE support and runtime validation.
  • Use Case: After changing .proto files, run codegen to keep generated code in sync across packages.

Quick Start

Run the code generation workflow to produce types, services, and definitions from your proto files.

Frequently Asked Questions about libcodegen

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

FAQPage Schema
How do I generate JavaScript types and gRPC service stubs from .proto files?

You can generate JavaScript types and gRPC service stubs from .proto files by running a protobuf code generation workflow that outputs strongly-typed message classes and service stubs into generated/types, generated/services, and generated/definitions directories.

What is the best way to keep generated protobuf code in sync across JavaScript packages?

Running a protobuf codegen workflow after changing .proto files keeps generated code in sync across packages by regenerating message classes, service stubs, and type definitions consistently across the repository.

Do I need protobufjs and grpc-tools to generate JavaScript code from protobuf definitions?

Yes, protobufjs, grpc-tools, and mustache are required tooling during code generation to produce JavaScript message classes, gRPC service stubs, and type definitions from .proto files.

Can I integrate protobuf code generation into my make codegen workflow?

Yes, protobuf code generation integrates with the project's make codegen workflow, reading .proto files and outputting generated code into dedicated generated/ directories for runtime loading across the repository.

How does generating type definitions from protobuf improve IDE support for JavaScript services?

Generating type definitions from protobuf produces type annotations for IDE support and runtime validation, ensuring strongly-typed message classes are available during development and reducing manual toil.