Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

rt-personalization-validation

БесплатноБез исполняемых скриптовНе проверен

Validates RT Personalization Entity payloads before creation to prevent common API errors. MUST be invoked proactively during rt-setup-personalization…

treasure-dataот treasure-data★ 23 звезды на GitHub

Об этом скилле

RT Personalization Entity Validation

Validates personalization entity payloads and provides error-free templates.

When to Use This Skill

Proactive Validation (REQUIRED)

During rt-setup-personalization workflow at Step 9c:

  • MUST be invoked BEFORE making the personalization entity creation API call
  • Validates the complete payload JSON with actual values (not placeholders)
  • Prevents common API errors by catching issues before submission
  • This is a mandatory workflow step, not optional

Reactive Validation (Debugging)

After encountering API errors:

  • When seeing "Attribute payload can't be blank" errors
  • When personalization creation fails with validation errors
  • When reviewing existing personalization configurations
  • When troubleshooting payload structure issues

Critical Validation Rules

Rule #1: Empty Arrays Cause Errors

The #1 cause of "Attribute payload can't be blank" errors:

// ❌ FAILS - Empty arrays trigger validation errors
"stringBuilder": []
"attributePayload": []

// ✅ WORKS - Use null instead
"stringBuilder": null
"attributePayload": null
Value Result
null or omitted ✅ OK - skips validation
[] (empty array) ❌ ERROR - "can't be blank"

Rule #2: At Least One Payload Required

Section definition must include at least ONE of:

  • attributePayload (with content)
  • stringBuilder (with content)
  • catalogPayload (with content, feature-flagged)

All three cannot be null/empty simultaneously.

Rule #3: Misleading Error Messages

The API reports errors incorrectly:

Error: "sections[0].payload.node_id.definition.attribute_payload": ["Attribute payload can't be blank"]

Actual cause: stringBuilder: [] (empty array) Reported cause: attribute_payload (misleading)

Always check stringBuilder first when seeing "can't be blank" errors.


Field Validation Rules

attributePayload

Field Validation
outputName Required, max 256 chars, unique across all payload types
realtimeAttributeId Required, must exist in CDP cache
subAttributeIdentifier Required for ListAttribute/SlidingCounterAttribute only

subAttributeIdentifier rules:

  • ListAttribute → must match aggregation identifier
  • SlidingCounterAttribute → must match sub_duration identifier
  • SingleAttribute/CounterAttribute → must be absent

stringBuilder

Field Validation
outputName Required, max 256 chars, unique
values Required array of {type: "String", value: "..."}
values Cannot contain {{ or }} (template brackets forbidden)

segmentPayload

{
  "segmentPayload": {
    "batchSegments": [
      {"id": "segment_id_1"},
      {"id": "segment_id_2"}
    ]
  }
}
  • batchSegments required array
  • Each id required and unique

catalogPayload (Feature-Flagged)

Field Validation
catalogName Required
lookupAttributeId Required, must be SingleAttribute or ListAttribute
lookupColumn Required
outputName Required, max 256 chars, unique

Unsupported attribute types: ImportedAttribute, CounterAttribute Error: unsupported_attribute_type_for_lookup_catalog


Common Errors & Solutions

Error Message Root Cause Solution
attribute_payload: can't be blank stringBuilder: [] or attributePayload: [] Change [] to null
sub_attribute_identifier: invalid_attribute Missing for ListAttribute or wrong identifier Add correct aggregation identifier
output_name: duplicated Same name in multiple payloads Use unique names across all payload types
unsupported_attribute_type_for_lookup_catalog Counter/Imported in catalog lookup Use SingleAttribute or ListAttribute
personalization_invalid_string_builder {{ or }} in string values Remove template brackets
Name has already been taken Duplicate personalization name Use unique name or update existing

Error-Free Templates

Template 1: Minimal Valid Entity

{
  "attributes": {
    "audienceId": "PARENT_SEGMENT_ID",
    "name": "personalization_name",
    "description": "Description of use case",
    "sections": [{
      "name": "section_name",
      "entryCriteria": {
        "name": "trigger_name",
        "keyEventCriteria": {
          "keyEventId": "KEY_EVENT_ID",
          "keyEventFilters": null
        }
      },
      "payload": {
        "UNIQUE_NODE_ID": {
          "type": "ResponseNode",
          "name": "response_name",
          "definition": {
            "attributePayload": [{
              "realtimeAttributeId": "RT_ATTR_ID",
              "outputName": "output_name"
            }],
            "segmentPayload": null,
            "stringBuilder": null
          }
        }
      },
      "includeSensitive": false
    }]
  },
  "relat
Полный SKILL.md на GitHub

Установить rt-personalization-validation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл rt-personalization-validation?

Validates RT Personalization Entity payloads before creation to prevent common API errors. MUST be invoked proactively during rt-setup-personalization workflow at Step 9c before making the entity creation API call. Also use when encountering "Attribute payload can't be blank" errors or when reviewing personalization entity JSON.

Как установить скилл rt-personalization-validation?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rt-personalization-validation запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rt-personalization-validation с