writing-clusters

Implement Matter clusters in C++ with XML definitions and ServerClusterInterface.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/renne/skills --skill writing-clusters
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: writing-clusters
Source: https://github.com/renne/skills/tree/main/matter/writing-clusters
Command: npx skills add https://github.com/renne/skills --skill writing-clusters

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill streamlines the process of creating and updating Matter clusters in C++, enabling developers to define, implement, and integrate new cluster functionalities efficiently.

Core Features & Use Cases

  • Code-Driven Cluster Implementation: Write C++ classes that implement ServerClusterInterface for new Matter clusters.
  • XML Definition & Code Generation: Utilize XML definitions and run code generation scripts to build cluster logic.
  • Build System Integration: Integrate new clusters into the project's build system using BUILD.gn and CMake files.
  • Migration Assistance: Provides guidance on migrating existing Ember-based clusters to the modern code-driven pattern.
  • Use Case: When developing a new smart home device that requires custom functionality, use this Skill to define and implement the corresponding Matter cluster within the SDK.

Quick Start

Use the writing-clusters skill to create a new Matter cluster by defining its XML and implementing the C++ ServerClusterInterface.

Frequently Asked Questions about writing-clusters

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

FAQPage Schema
How do I create a custom Matter cluster in C++?▼

To create a custom Matter cluster, define its structure using XML definitions and implement the cluster logic by writing a C++ class that implements the ServerClusterInterface within the connectedhomeip SDK.

How do I migrate an Ember cluster to the code-driven pattern?▼

Migrating an Ember cluster to the code-driven pattern involves transitioning your existing cluster logic to implement ServerClusterInterface directly in C++, replacing the older Ember-based configuration approach.

How do I integrate a new Matter cluster into the build system?▼

You integrate a new Matter cluster into the build system by updating the project's BUILD.gn and CMake files to include your new C++ cluster implementation and generated code.

What is the role of XML in Matter cluster development?▼

XML is used to define the structure and attributes of Matter clusters, which are then processed by running code generation scripts to produce the foundational C++ cluster logic.

Do I need to run code generation scripts when developing Matter clusters?▼

Yes, running code generation scripts is required to generate the necessary C++ code from your XML definitions before implementing the ServerClusterInterface for your new cluster.