libtype

Provide shared Protocol Buffer type definitions across Copilot-LD services.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

libtype provides shared Protocol Buffer type definitions generated from proto/ files to ensure consistent data models across Copilot-LD services.

Core Features & Use Cases

  • Protobuf type definitions organized by namespaces (common, agent, memory, graph, vector, tool, trace, llm, resource).
  • Creation of typed messages via fromObject() for easy construction of requests and responses.
  • identifier() utilities to generate resource identifiers suitable for cross-service references and provenance.

Quick Start

Create a typed protobuf object by importing the libtype package and constructing a type fromObject.

Frequently Asked Questions about libtype

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

FAQPage Schema
How do I share protobuf types across multiple microservices?

Sharing protobuf types across microservices requires a centralized type library generated from proto files. This approach ensures consistent data models and typed message construction across different services using shared namespaces like common, agent, and memory.

What is the best way to construct protobuf messages from plain JavaScript objects?

The best way to construct protobuf messages from plain JavaScript objects is using a fromObject() utility. This allows you to create typed requests and responses easily without manually mapping every field to the generated type definitions.

How do I generate resource identifiers for cross-service provenance?

To generate resource identifiers for cross-service provenance, use a dedicated identifier() utility provided by the shared type library. This generates suitable references for tracking data origin and linking resources across distributed services.

Do I need to manually define protobuf schemas for agent, memory, and graph namespaces?

You do not need to manually define schemas if you use a shared type library. It provides pre-generated type definitions organized by namespaces such as agent, memory, and graph for immediate cross-service integration and consistent data modeling.

Why use shared protobuf type definitions instead of duplicating schemas in each service?

Using shared protobuf type definitions prevents data model drift and ensures consistency across services. Duplicating schemas in each service often leads to misaligned fields, increased maintenance overhead, and integration failures as the system scales.