KN

knx-xml-context

Provides instant context and validation rules for KNX XML development to prevent common errors in Kaenx Creator.

Install

mkdir -p .claude/skills/knx-xml-context && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17656" && unzip -o skill.zip -d .claude/skills/knx-xml-context && rm skill.zip

Installs to .claude/skills/knx-xml-context

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Context loader for KNX XML development. Use when user says "knx context", "load knx", "knx validation", "knx xml rules", or starts working on KNX XML/knxprod files.
164 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Load context for KNX XML development
  • Check validation rules before importing to Kaenx Creator
  • Design Dynamic sections for ETS UI
  • Create or modify .knxprod files
  • Debug import errors in Kaenx Creator
  • Run a Python script to validate KNX XML files

How it works

The skill provides context, validation rules, and crash points from Kaenx Creator source code analysis, and can run a Python script to validate KNX XML files.

Inputs & outputs

You give it
KNX XML file
You get back
Validation results indicating passes, warnings, or errors

When to use knx-xml-context

  • Validating KNX XML files before import
  • Debugging import errors in Kaenx Creator
  • Designing ETS UI sections
  • Creating .knxprod files

About this skill

KNX XML Development Context

This skill provides instant context for KNX XML development, including validation rules, crash points, and optimization best practices from Kaenx Creator source code analysis.

When to Use This Skill

  • Load context for KNX XML development in new conversations
  • Check validation rules before importing to Kaenx Creator
  • Design Dynamic sections for ETS UI
  • Debug import errors in Kaenx Creator
  • Create or modify .knxprod files
  • NOT for general XML editing (use standard XML tools)

Prerequisites

  • Python 3.x (for validation script)
  • Access to POC_KNX_XML_Source/ directory

How to Use

Step 1: Load Context

Simply mention "knx context" or "knx validation" in your message, and this skill will be activated.

Step 2: Reference Quick Cards

Use the quick reference cards below for common validation rules.

Step 3: Run Validation (Optional)

python POC_KNX_XML_Source/Validate_Tool/validate_knx_comprehensive.py <xml_file>

Step 4: Consult Strict Rules

Always check: POC_KNX_XML_Source/XML_Import_Rule/Rule.md

Quick Reference Cards

Critical Crash Points (Must Avoid)

IssueRequirementError Type
Hardware.VersionNumberMust exist (NOT Version)NullReferenceException
Hardware2ProgramRefId suffix≥13 chars after _HP-ArgumentOutOfRangeException
All ID suffixesMust be numeric onlyFormatException
Manufacturer.RefId≥3 charactersOutOfRangeException
RefId duplicatesMust be UNIQUE globallyImport Error (Nicht eindeutig)
OrderNumberAlphanumeric only (no special chars)Encoding Warning

ID Format Rules

ElementOffsetValid ExampleInvalid Example
Parameter2..._P-123..._P-Btn1
ParameterRef2..._R-456..._R-Mode
ComObject0..._O-1..._O-Switch
ModuleDef3..._MD-1..._MD-Main
ParameterBlock3..._PB-1..._PB-Config

Hardware Mandatory Attributes

<Hardware 
    Name="DeviceName"
    SerialNumber="1234567890"
    VersionNumber="1"             <!-- MANDATORY -->
    BusCurrent="10"               <!-- MANDATORY -->
    HasIndividualAddress="true"   <!-- MANDATORY -->
    HasApplicationProgram="true"  <!-- MANDATORY -->
/>

Character Encoding in IDs

CharEncodedCharEncoded
-.2D..2E
.20/.2F
+.2B,.2C

DatapointType & ObjectSize Formats

<ComObject DatapointType="DPST-1-1" />  <!-- Switch On/Off -->
<ComObject DatapointType="DPT-9" />      <!-- 2-Byte Float -->
<ComObject ObjectSize="1 Bit" />
<ComObject ObjectSize="2 Bytes" />

Examples

Example 1: Validate Before Import

python validate_knx_comprehensive.py my_device.xml

Output:

✓ PASSED (12): XML syntax, Hardware.VersionNumber...
⚠️ WARNINGS (2): Missing BusCurrent...
❌ ERRORS (1): Parameter ID has non-numeric suffix
RESULT: FAIL - 1 error(s) will cause import failure

Example 2: Dynamic Section with Master Switch

<Channel Name="Channel 1" Number="1">
    <ParameterBlock Id="PB-1" Name="CH1_Config">
        <ParameterRefRef RefId="P_CH1_Mode_Ref" />
        <choose ParamRefId="P_CH1_Mode_Ref">
            <when test="0" />  <!-- Disabled: empty -->
            <when test="1">    <!-- Switch Mode -->
                <ParameterRefRef RefId="P_Switch_Delay_Ref" />
                <ComObjectRefRef RefId="O_Switch_Ref" />
            </when>
        </choose>
    </ParameterBlock>
</Channel>

Best Practices

5 Golden Rules for Dynamic Section

  1. Default to Hidden: Always wrap refs in <choose><when>
  2. Master Switch Pattern: Every block starts with Enum, value 0 = Disabled
  3. Nesting is King: Use nested <choose> for hierarchical UI
  4. Use Comparison Operators: test="<3", test=">0" for flexible conditions
  5. Conflict Prevention: Check GPIO state before showing options

ID Naming & Consistency (Golden Rule)

  • ✅ Use numeric suffixes: _P-1, _O-2, _R-3
  • Deep Referential Integrity: Cross-check every RefId, ParameterType, and ParamRefId.
  • ❌ Avoid text suffixes: _P-Button, _O-Switch
  • ⚠️ Zero Typo Risk: Even a single extra 0 in a reference suffix (e.g., 00001 vs 000001) will trigger a "Sequence contains no matching element" crash in ETS/Kaenx.

Hardware2ProgramRefId Format

✅ ..._HP-0000-00-00001   (13 chars after _HP-)
❌ ..._HP-1-1-1           (5 chars - CRASH!)

Troubleshooting

Error MessageRoot CauseSolution
Unknown Error (Crash)NullReference or OutOfRangeCheck Hardware.VersionNumber exists
Input string was not in correct formatNon-numeric ID suffixRename IDs to use numbers only
Sequence contains no matching elementBroken Reference (RefId Typo)Verify all ParameterType and RefId suffixes match exactly
Index outside boundsString too shortPad Hardware2ProgramRefId to 13+ chars

Resources

For detailed documentation, see:

Workflow Summary

1. Design XML    → Follow Optimization Guide
2. Validate      → Run Python script
3. Import        → Kaenx Creator
4. Export        → .knxprod file
5. Test          → ETS

When not to use it

  • For general XML editing

Prerequisites

Python 3.xAccess to POC_KNX_XML_Source/ directory

Limitations

  • Not for general XML editing

How it compares

This skill provides specific KNX XML validation and context, unlike general XML tools that lack domain-specific rules and crash point analysis.

Compared to similar skills

knx-xml-context side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
knx-xml-context (this skill)03moReviewIntermediate
n8n-expression-syntax63moNo flagsBeginner
python-repl64moReviewBeginner
n8n-validation-expert63moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

n8n-expression-syntax

czlonkowski

Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.

6111

python-repl

gptme

Interactive Python REPL automation with common helpers and best practices

6102

n8n-validation-expert

czlonkowski

Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator structure issues, or need help understanding validation results. Also use when asking about validation profiles, error types, or the validation loop process.

697

powershell-windows

davila7

PowerShell Windows patterns. Critical pitfalls, operator syntax, error handling.

2379

bats

OleksandrKucherenko

Bash Automated Testing System (BATS) for TDD-style testing of shell scripts. Use when: (1) Writing unit or integration tests for Bash scripts, (2) Testing CLI tools or shell functions, (3) Setting up test infrastructure with setup/teardown hooks, (4) Mocking external commands (curl, git, docker), (5) Generating JUnit reports for CI/CD, (6) Debugging test failures or flaky tests, (7) Implementing test-driven development for shell scripts.

991

browser-daemon

noiv

Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.

587

Search skills

Search the agent skills registry