Skip to main content

One post tagged with "skill"

View All Tags

AI Skill for the Control API

· 3 min read

Control API AI Skill

AI coding agents can now integrate with our Control API without guessing. We have released an open-source skill file that gives tools like Claude Code, Cursor, Windsurf, or Copilot working knowledge of the Control API, so generated code uses the real protocol, the official client libraries, and secure token handling from the first prompt. With that knowledge in place, agents can build nearly any kind of integration with our API.

Why a skill

Without context, coding agents tend to invent WebSocket message formats, miss that subscribe updates arrive as nested payloads without a path field, or skip the official client libraries entirely. The result is code that looks plausible and doesn't run.

The skill closes that gap: a single structured markdown file that carries the protocol details, data model, and library usage an agent needs to generate working code on the first attempt.

What's inside

  • Protocol: WebSocket and REST transports, authentication (including tokenless devices), connection lifecycle and heartbeat handling
  • Data model: the node tree, path conventions, value types, and the /range/ metadata tree for validating writes
  • WebSocket methods: get, set, subscribe/unsubscribe with request/response examples, including the nested update payload structure
  • RPC methods: snapshots, fadetovalue, channel labels, external button lists
  • Client libraries: usage of the official TypeScript and Go libraries
  • Security: token handling, POST vs. GET, transport encryption, connection limits

Every code example in the skill is compile-checked against the released packages: @dhdaudio/control-api 1.0.3 and control-api-go/v2 2.0.0.

Works with your agent

The skill follows the Claude Code skill format, where it is discovered automatically once placed in .claude/skills/. Since it is plain markdown, it works just as well as a context file for Cursor, Windsurf, Copilot, Aider, or any other tool that reads project knowledge files. Setup instructions for each tool are on the new AI Skills page in our Getting Started guide.

Get it

The skill is open-source under the MIT license. Contributions and feedback are welcome. Feel free to submit issues or pull requests.

Go Client Library 2.0.0

Alongside the skill, we released version 2.0.0 of the Go client library. It contains one breaking change: RPC() and NewRPCRequest() now take the method name and params as separate arguments instead of a single payload object. Following Go module conventions, the import path moves to github.com/dhd-audio/control-api-go/v2. The release notes include a short migration example.


Questions or feedback? Let us know. Community input helps shape future releases.