port-system

Design and validate ChainGraph port systems with nine port types, plugins, factory, and transfer rules.

15|3|Updated Apr 29, 2025
One-click install
npx skills add https://github.com/chaingraphlabs/chaingraph --skill port-system
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: port-system
Source: https://github.com/chaingraphlabs/chaingraph/tree/main/.claude/skills/port-system
Command: npx skills add https://github.com/chaingraphlabs/chaingraph --skill port-system

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers understand and implement the ChainGraph port system, including nine port types, plugins, a factory for port creation, and transfer rules to enforce type-safe connections across nodes in complex graphs.

Core Features & Use Cases

  • Nine distinct port types with strong typing, validation, and serialization support.
  • Port plugins for per-type validation, configuration, and value serialization.
  • Port Factory to create single or multiple ports from concise configurations.
  • Transfer rules that govern compatibility and safe data flow between ports.
  • Frontend and node integration patterns for rendering and managing ports in UI.

Use cases:

  • Designing custom ports for specialized data shapes (strings, numbers, objects, streams).
  • Debugging port compatibility in visual graphs and ensuring end-to-end type safety.
  • Rapid prototyping of nodes with complex input/output schemas.

Quick Start

Set up a minimal port configuration, instantiate it via the PortFactory, and validate a basic connection between source and target ports in a simple test node.

Frequently Asked Questions about port-system

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

FAQPage Schema
How do I design type-safe ports for nodes in a visual graph?

To design type-safe ports for nodes, use the ChainGraph port system to define nine distinct port types with built-in validation. This enforces strict type compatibility and safe data flow across complex node connections.

How do I validate port compatibility and enforce transfer rules between nodes?

Validate port compatibility by applying transfer rules that govern safe data flow between source and target ports. The system uses per-type port plugins to execute validation and ensure connections are type-safe.

What is the best way to create multiple ports from a concise configuration?

The best way to create multiple ports from a concise configuration is using the Port Factory. It instantiates single or multiple ports rapidly, enabling quick prototyping of nodes with complex input and output schemas.

Can I render and manage custom port configurations in a frontend UI?

Yes, you can render and manage custom port configurations in a frontend UI. The system provides integration patterns to connect port plugins with UI components for visualizing and managing data streams.

Why does my port connection fail validation during node prototyping?

Port connection validation fails when transfer rules detect mismatched types between source and target ports. Check your port plugins to ensure the data shape configuration matches the expected schema validation requirements.