Command Palette

Search for a command to run...

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

data-dictionary

БесплатноЗапускает вложенные скриптыНе проверен

Automate update and maintenance of data dictionaries in Treasure Data - generates 80-90% of column descriptions automatically, allowing users to review…

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

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

Data Dictionary: Automated Maintenance & Enhancement

Automate the update and maintenance of data dictionaries in Treasure Data - with 80-90% automated column descriptions that you can review, edit, and enhance. From schema extraction through TD write-back, this skill handles the heavy lifting while keeping you in control.

Usage

/data-dictionary [segment-name]

Example:

/data-dictionary customer_360

If segment name not provided, will list available Parent Segments.

Workflow Overview

This skill orchestrates 6 sequential stages:

  1. Context Gathering - Collect business context (industry, company, use cases)
  2. Schema Extraction - Extract schema from TD Parent Segment with sample data
  3. Description Generation - Generate AI-powered column descriptions
  4. Review Export - Export to CSV for human review
  5. Validation - Validate edited CSV and import back to JSON
  6. Write-back - Publish descriptions to Treasure Data

Each stage creates artifacts used by subsequent stages. Workflow supports resume from partial runs.

Stage 1: Context Gathering

Purpose: Collect business context to inform description generation.

Process: Ask 4 context questions ONE at a time (conversational, not all at once):

  1. "What industry is this data from?" (e.g., e-commerce, SaaS, healthcare)
  2. "Describe your company/business model briefly"
  3. "What is this segment used for?" (default: customer segmentation)
  4. "What are the primary use cases?" (e.g., marketing campaigns, analytics, personalization)

Output: Context stored in memory for Stage 3.

Progress:

✅ Stage 1 complete: Context gathered
➡️  Next: Stage 2 (Schema Extraction)

Stage 2: Schema Extraction

Purpose: Extract schema from TD Parent Segment with sample data for PII detection.

Command:

node src/index.js extract $SEGMENT --sample

Where $SEGMENT is the segment name from $ARGUMENTS[0].

Output:

✅ Stage 2 complete: Schema extracted
📁 Artifacts created:
   - ./schemas/{segment}.json
➡️  Next: Stage 3 (Description Generation)

Error Handling: If extraction fails:

  • Display error message
  • Offer options: [R] Retry | [E] Exit
  • If user chooses Retry, re-run extraction command
  • If user chooses Exit, stop workflow

Resume Detection: If ./schemas/{segment}.json already exists:

  • Ask: "Schema file found. Resume from Stage 3 or start fresh?"
  • If resume: skip to Stage 3
  • If fresh: delete schema file and re-run extraction

Stage 3: Description Generation

Purpose: Generate AI-powered column descriptions using Claude.

API Key Detection: Before running generation, check for API key:

if [ -z "$ANTHROPIC_API_KEY" ]; then
  echo "API key not found. Using Claude Code mode..."
  USE_CLAUDE_CODE=true
else
  echo "API key detected. Using API mode..."
  USE_CLAUDE_CODE=false
fi

Command (API Mode):

node src/index.js generate $SEGMENT

Command (Claude Code Mode):

node src/index.js generate $SEGMENT --claude-code

In Claude Code mode, the CLI will print instructions for manual generation. Follow those instructions:

  1. Read schema file shown in output
  2. Use context gathered in Stage 1
  3. Generate descriptions following format specified
  4. Save to ./descriptions/{segment}-descriptions.json

Output:

✅ Stage 3 complete: Descriptions generated
📁 Artifacts created:
   - ./descriptions/{segment}-descriptions.json
➡️  Next: Stage 4 (Review Export)

Error Handling: If generation fails:

  • Display error message
  • Offer options: [R] Retry | [C] Claude Code mode | [E] Exit
  • If user chooses Retry, re-run with same mode
  • If user chooses Claude Code, re-run with --claude-code flag
  • If user chooses Exit, stop workflow

Resume Detection: If ./descriptions/{segment}-descriptions.json already exists:

  • Ask: "Descriptions file found. Resume from Stage 4 or regenerate?"
  • If resume: skip to Stage 4
  • If regenerate: delete descriptions file and re-run generation

Stage 4: Review Export

Purpose: Export descriptions to CSV for human review and editing.

Command:

node src/index.js review $SEGMENT

This command will:

  1. Export descriptions to ./reviews/{segment}-descriptions.csv
  2. Open CSV file in default spreadsheet application
  3. Wait for user to review and edit

CSV Format: 6 columns: table, column, type, source, description, is_pii

  • table = table type (attribute, behavior, master)
  • column = column name
  • type = data type (may be empty — this is optional and doesn't affect write-back)
  • source = source database
  • description = AI-generated description (editable)
  • is_pii = PII flag (TRUE/FALSE)

Edit the description and is_pii columns as needed. Do NOT modify other columns (they are validated as immutable).

Output:

✅ Stage 4 complete: CSV exported and opened for review
📁 Artifacts created:
   - ./reviews/{segment}-descriptions.csv

Pleas
Полный SKILL.md на GitHub

Установить data-dictionary в Claude Code и Claude Desktop

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

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

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

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

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

Bash(node src/index.js *)
Read
Write
Glob

Вложенные файлы

.gitignoreREADME.mdpackage-lock.jsonpackage.jsonskills/final-data-dictionary.mdskills/generate-descriptions.md.backupsrc/commands/extract.jssrc/commands/generate.jssrc/commands/list.jssrc/commands/review.jssrc/commands/rollback.jssrc/commands/validate.jssrc/commands/writeback.jssrc/export/csv-exporter.jssrc/import/csv-importer.jssrc/index.jssrc/lib/claude-client.jssrc/lib/column-classifier.jssrc/lib/context-builder.jssrc/lib/description-generator.jssrc/lib/pii-detector.jssrc/lib/schema-validator.jssrc/lib/snapshot-manager.jssrc/lib/storage.jssrc/lib/td-api-client.jssrc/lib/tdx-client.jssrc/prompts/context-gatherer.jssrc/prompts/review-prompts.jssrc/prompts/sample-data.jssrc/prompts/segment-picker.jssrc/schemas/description-output.jssrc/validation/csv-validator.js

FAQ

Что делает скилл data-dictionary?

Automate update and maintenance of data dictionaries in Treasure Data - generates 80-90% of column descriptions automatically, allowing users to review results, make changes, and fill in gaps. Orchestrates schema extraction, AI-powered description generation, human review, and write-back as single workflow.

Как установить скилл data-dictionary?

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

Скилл data-dictionary запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить data-dictionary с