KDL v2 syntax reference for writing correct KDL documents. Use when writing KDL code blocks in responses, proposing changes to .kdl files, designing KDL syntax or node structure, reviewing or analyzing KDL documents, debugging KDL parsing errors, or answering questions about KDL nodes, values, strings, numbers, properties, arguments, comments, type annotations, identifiers, or escapes. Also covers JSON-IN-KDL (JiK/JIK) - the microsyntax for encoding JSON within KDL.
Provides comprehensive KDL v2 syntax guidance for writing correct KDL documents.
This skill helps with:
.kdl files| Area | Description |
|---|---|
| Nodes | Structure with arguments, properties, and optional children |
| Values | Strings (bare, quoted, raw, multiline), numbers, keywords |
| Type Annotations | Reserved types for integers, floats, and strings |
| Comments |
Line (//), block (/* */), slashdash (/-) |
| Identifiers | Bare, quoted, and raw forms with specific restrictions |
| JSON-IN-KDL (JiK) | Microsyntax for losslessly encoding JSON within KDL |
title "Hello World"
server main port=8080 tls=true
database {
host localhost
port 5432
name myapp
}
published (date)"2024-01-15"
timeout (duration)"30s"
description """
This is a multiline
raw string in KDL v2
"""
// Line comment
node "value" /* inline comment */ key="val"
/- disabled-node "skipped"
references/reference.md for complete KDL v2 syntax details before writing KDLkdl code blocks.1 is illegal (use 0.1), bare identifiers have restrictionsreferences/json-in-kdl.md when encoding JSON in KDL, converting between JSON and JiK, or using (array)/(object) type annotations for JiK| File | Contents |
|---|---|
references/reference.md | Complete KDL v2 syntax specification |
references/json-in-kdl.md | JSON-IN-KDL (JiK) microsyntax reference |