Command Palette

Search for a command to run...

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

convert-tabular-to-text

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

Convert tabular data (CSV, Stata, Parquet, etc.) to textual representations for LLM fine-tuning and evaluation. Supports dictionary, narrative, and…

niznik-devот niznik-dev★ 15 звёзд на GitHub

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

Convert Tabular to Text

Convert tabular data into textual representations for use in LLM fine-tuning and evaluation experiments. This skill runs after design-experiment and before scaffold-experiment.

create-tabular-schema → design-experiment → convert-tabular-to-text → scaffold-experiment

Prerequisites

  • Schema file must already exist in ck-data/schemas/. If it doesn't, run create-tabular-schema first.
  • experiment_summary.yaml should exist (from design-experiment) for guided mode. Standalone usage is also supported.

Your Task

Walk the user through generating text datasets from tabular source data. Each invocation of the underlying convert.py tool produces one output file for one (condition x split) pair. This skill orchestrates multiple calls to produce all the files an experiment needs.

IMPORTANT: Throughout this workflow, create a detailed log at {experiment_dir}/logs/convert-tabular-to-text.log (or {scratch_dir}/ck-data/generated/logs/convert-tabular-to-text.log for standalone usage). Write entries incrementally as actions complete. See logging.md for the complete format specification and action types.

Step 1: Check for Existing Datasets

Ask: "Do you have existing generated datasets, or do we need to create new ones?"

Check ck-data/generated/ (under the user's scratch directory from claude.local.md) for any matching files:

ls {scratch_dir}/ck-data/generated/*.json 2>/dev/null

If the user has existing datasets, collect their paths and skip to Step 4.

Step 2: Load Schema

Load the schema from ck-data/schemas/:

ls {scratch_dir}/ck-data/schemas/ 2>/dev/null

If a matching schema exists: Load it and confirm with the user.

If no schema exists: Stop and advise the user to run create-tabular-schema first. The schema defines columns, types, and value maps that are needed for generation.

Step 3: Determine Template Style

If the user has an experiment_summary.yaml with a data_generation section:

The template style is already specified per condition. Read the template, template_file, and style_guidance fields from each condition. Confirm with the user: "The experiment design specifies [template types] — proceeding with those."

For each condition with template: narrative:

  • If template_file is set: Use the specified template file. Verify it exists:
    ls {template_file_path}
    
  • If template_file is not set and style_guidance is set: A custom template needs to be generated. Spawn the generate-jinja-template subagent (see below).
  • If neither template_file nor style_guidance is set: Use the built-in generic narrative template.

For each condition with template: llm_narrative:

  • Confirm ANTHROPIC_API_KEY is set and anthropic is installed.
  • Read style_guidance from the condition (if present) — it will be passed as --style-guidance at generation time.
  • A --cache-path should be used in Step 6 for consistency across re-runs.

If no experiment_summary.yaml exists (standalone usage):

Present the available template styles (see design-experiment/references/tabular_to_text_gen.md for the full reference):

Which template style would you like?

  1. Dictionary — Bulleted key-value pairs. Simple, explicit, no prose.
  2. Narrative — Natural prose from a Jinja2 template.
    • Do you have an existing Jinja2 template file, or would you like to generate one?
  3. LLM narrative (llm_narrative) — API-generated unique text per row. Non-deterministic. Requires ANTHROPIC_API_KEY.

If the user picks narrative without an existing template or llm_narrative, gather style preferences:

  1. Intended use — Fine-tuning, evaluation, or both? (Affects token density.)
  2. Style preference — Concise/dense or natural/verbose? Any specific tone?
  3. Any other guidance — e.g., avoid certain phrasings, emphasize particular features.

Generating Custom Narrative Templates

If a custom narrative template is needed (no template_file but style_guidance is present, or the user requests one in standalone mode), spawn the generate-jinja-template subagent:

Agent: generate-jinja-template
Prompt: Generate a Jinja2 narrative template for:
  - Schema: {schema_path}
  - Source data: {source_path}
  - Output: {scratch_dir}/ck-data/templates/{dataset_name}.j2
  - Features: {feature_list} (if known from experiment_summary.yaml)
  - Intended use: {from style_guidance or user input}
  - Style preference: {from style_guidance or user input}
  - Additional instructions: {from style_guidance or user input}

When the agent returns:

  1. Show the user the generated template content and sample renderings
  2. Ask if they want any changes (if so, describe changes and re-run the agent, or edit the .j2 file directly)
  3. Once approved, note the template path — it will be used as --template-file in Step 6

Step 4: Dete

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

Установить convert-tabular-to-text в Claude Code и Claude Desktop

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

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

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

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

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

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

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

logging.mdvalidation.md

FAQ

Что делает скилл convert-tabular-to-text?

Convert tabular data (CSV, Stata, Parquet, etc.) to textual representations for LLM fine-tuning and evaluation. Supports dictionary, narrative, and LLM-generated formats with configurable perturbations.

Как установить скилл convert-tabular-to-text?

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

Скилл convert-tabular-to-text запускает скрипты?

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

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

Сравнить convert-tabular-to-text с