rt-config-id-stitching
БесплатноБез исполняемых скриптовНе проверенConfigure RT 2.0 ID stitching - merge real-time profiles across different identifiers using stitching keys and primary keys
от treasure-data★ 23 звезды на GitHubОб этом скилле
RT 2.0 ID Stitching Configuration
Configure profile merging across multiple identifiers in real-time.
Prerequisites
- RT 2.0 enabled and event tables configured
- Understanding of available ID fields in event data
ID Stitching Structure
id_stitching:
primary_key: "td_client_id" # Main unique identifier
stitching_keys: # All identifiers for merging
- name: "td_client_id"
exclude_regex: "^test_.*" # Filter invalid IDs
- name: "email"
exclude_regex: ".*@test\\.com$"
- name: "user_id"
ext_lookup_key: "email" # Optional: External lookup
Primary Key
The main unique identifier for profiles:
primary_key: "td_client_id"
Requirements:
- Must be one of the
stitching_keys - Should be stable and unique
- Available in most events
- Not null for most users
Common choices:
td_client_id- TD cookie/device ID (recommended for web)user_id- Your application's user IDcustomer_id- CRM customer ID
Stitching Keys
All identifiers used to merge profiles:
stitching_keys:
- name: "td_client_id"
exclude_regex: "^test_.*" # Exclude test IDs
- name: "email"
exclude_regex: ".*@(test|example)\\.com$" # Exclude test emails
- name: "user_id"
exclude_regex: "^guest_" # Exclude guest users
- name: "phone_number"
# No exclusion pattern
Key Selection:
- Include all IDs present in event data
- Order doesn't matter
- Primary key must be in this list
- Can add more keys later
Exclude Regex Patterns
Filter out invalid or test identifiers:
Common Patterns
# Test IDs
exclude_regex: "^test_.*" # Starts with "test_"
exclude_regex: ".*_test$" # Ends with "_test"
# Test emails
exclude_regex: ".*@test\\.com$" # @test.com domain
exclude_regex: ".*@example\\.com$" # @example.com domain
exclude_regex: ".*@(test|example|demo)\\.com$" # Multiple test domains
# Guest/anonymous users
exclude_regex: "^guest_" # Starts with "guest_"
exclude_regex: "^anon_" # Starts with "anon_"
exclude_regex: "^(guest|anonymous)_" # Starts with guest_ or anonymous_
# Development IDs
exclude_regex: "^dev_" # Development IDs
exclude_regex: "localhost" # Localhost IDs
# Invalid formats
exclude_regex: "^$" # Empty strings
exclude_regex: "^null$" # String "null"
exclude_regex: "^undefined$" # String "undefined"
External Lookup Key
Optional key for external profile lookups:
ext_lookup_key: "email"
Use cases:
- External API lookups by email
- CRM integrations
- Customer service lookups
Requirements:
- Must be one of the
stitching_keys - Typically
emailoruser_id
Complete Examples
E-commerce
id_stitching:
primary_key: "td_client_id"
stitching_keys:
- name: "td_client_id"
exclude_regex: "^test_"
- name: "email"
exclude_regex: ".*@(test|example)\\.com$"
- name: "customer_id"
exclude_regex: "^guest_"
- name: "user_id"
ext_lookup_key: "email"
B2B/SaaS
id_stitching:
primary_key: "user_id"
stitching_keys:
- name: "user_id"
exclude_regex: "^test_"
- name: "email"
exclude_regex: ".*@(test|example|localhost)\\.com$"
- name: "td_client_id"
- name: "account_id"
ext_lookup_key: "email"
Mobile App
id_stitching:
primary_key: "td_client_id"
stitching_keys:
- name: "td_client_id" # Device ID
- name: "user_id" # App user ID
exclude_regex: "^guest_"
- name: "advertising_id" # IDFA/GAID
- name: "email"
exclude_regex: ".*@test\\.com$"
ext_lookup_key: "user_id"
How ID Stitching Works
When an event comes in with multiple IDs:
{
"td_client_id": "abc123",
"email": "[email protected]",
"user_id": "user_456"
}
- Check existing profiles with any of these IDs
- Merge profiles if multiple profiles found
- Update primary key to the value from the event
- Associate all IDs with the merged profile
Discover Available IDs
Check what ID fields are in your event tables:
# View table schema
tdx table describe <database> <table>
# Check ID field distribution
tdx query "
select
count(distinct td_client_id) as client_ids,
count(distinct email) as emails,
count(distinct user_id) as user_ids,
count(*) as total_events
from <database>.<table>
where td_interval(time, '-7d')
"
# Check ID co-occurrence
tdx query "
select
count(*) as events,
count(case when td_client_id is not null then 1 end) as has_client_id,
count(case when email is not null then 1 end) as has_email,
count(case when user_id is not null then 1 end) as has_user_id
from <database>.<table>
where td_interval(time, '-7d')
"
# Find test patterns to exclude
tdx query "
select
email,
count(*) as event_count
from
Установить rt-config-id-stitching в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rt-config-id-stitching?
Configure RT 2.0 ID stitching - merge real-time profiles across different identifiers using stitching keys and primary keys
Как установить скилл rt-config-id-stitching?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rt-config-id-stitching запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic