prism-node-api

Define a production-grade API specification for the PRISM Node K1 Light Lab editor.

15|1|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/synqing/K1.hardware --skill prism-node-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prism-node-api
Source: https://github.com/synqing/K1.hardware/tree/main/.claude/skills/PRISM.node-API
Command: npx skills add https://github.com/synqing/K1.hardware --skill prism-node-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing complex LED animation patterns for embedded devices is often a tedious, code-heavy process. This Skill provides the complete API specification for the PRISM.node K1 Light Lab, a visual node-based editor, enabling you to understand and interact with the system to create, preview, and export sophisticated LED patterns without writing low-level code.

Core Features & Use Cases

  • Node-Based Animation: Understand the architecture of a graph-based editor for creating dynamic LED effects.
  • Real-time Preview & Export: Learn how patterns are rendered in real-time and exported as binary TLV payloads to the K1 device.
  • Color Space Management: Leverage OKLCH (perceptual color space) for intuitive hue shifts and saturation adjustments.
  • Use Case: Develop custom nodes for the K1 Light Lab editor, or integrate external tools to generate and push LED patterns to the K1 device, automating complex visual design workflows.

Quick Start

Example: Sending a pattern to the K1 device via WebSocket

import { makePutPlan, sendPlanOverWs } from './transport/wsTlv'; const patternBytes = new Uint8Array(/* 960 bytes of RGB8 data */); const plan = makePutPlan(patternBytes); await sendPlanOverWs('ws://192.168.1.100:8080', plan);

Frequently Asked Questions about prism-node-api

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

FAQPage Schema
How do I export LED animation patterns to a K1 device using WebSocket?

Export LED patterns by converting your design to a binary TLV payload and sending it over WebSocket. Use the `makePutPlan()` and `sendPlanOverWs()` functions to transmit RGB8 data directly to the K1 device at its WebSocket endpoint, enabling real-time pattern deployment.

What is a node-based editor for designing LED animations?

A node-based editor is a visual graph interface where you connect nodes representing animation effects, color transforms, and timing logic without writing low-level code. PRISM.node K1 Light Lab implements this for WS2812B LED strips, supporting real-time preview and TLV export.

Can I use OKLCH color space for LED pattern design?

Yes, OKLCH is the perceptual color space used in the K1 Light Lab editor. It enables intuitive hue shifts and saturation adjustments for LED patterns, translating perceptual color changes directly to the 320-LED dual-strip controller with a 2x160 mapping.

How do I create custom nodes for a WebSocket-based LED animation editor?

Understand the K1 Light Lab API specification to define custom node types with proper type definitions and color space transforms. Integrate them into the graph architecture to extend the editor's animation capabilities while maintaining compatibility with TLV export and the WS2812B controller.

What are the payload size limits for exporting LED patterns?

LED pattern exports to the K1 device are limited to 256KB maximum payload size. This constraint applies to TLV-encoded RGB8 data across the 320-LED dual-strip (2x160) configuration, requiring optimization of frame data and node output.

Do I need TypeScript to work with the K1 Light Lab API?

TypeScript is the authoritative source for the K1 Light Lab API specification, providing type definitions for nodes, color transforms, and WebSocket protocol. While the frontend uses React 18 and Vite, TypeScript enables safe API integration and custom node development.