Claude-skill-registry libcodegen

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/libcodegen" ~/.claude/skills/majiayu000-claude-skill-registry-libcodegen && rm -rf "$T"
manifest: skills/data/libcodegen/SKILL.md
source content

libcodegen Skill

When to Use

  • Generating JavaScript types from Protocol Buffer schemas
  • Creating gRPC service stubs automatically
  • Updating generated code after .proto changes
  • Maintaining type consistency across microservices

Key Concepts

TypeGenerator: Generates JavaScript classes from protobuf message definitions with proper type annotations.

ServiceGenerator: Creates gRPC service stubs with method signatures matching the proto service definitions.

DefinitionGenerator: Generates type definitions for IDE support and documentation.

Usage Patterns

Pattern 1: Generate types from protos

import { TypeGenerator } from "@copilot-ld/libcodegen";

const generator = new TypeGenerator("./proto");
await generator.generate("./generated/types");

Pattern 2: Generate service stubs

import { ServiceGenerator } from "@copilot-ld/libcodegen";

const generator = new ServiceGenerator("./proto");
await generator.generate("./generated/services");

Integration

Run via

make codegen
after modifying .proto files. Output used by libtype and librpc.