Command Palette

Search for a command to run...

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

rp-source-csv

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

CSV file source adapter: parse core, vendor fingerprinting (Shopify, WooCommerce, Magento, BigCommerce), layout inference, file-set handling, and read…

wixот wix★ 40 звёзд на GitHub

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

rp-source-csv

CSV source adapter. Owns every CSV-specific detail the platform-agnostic skills must not hardcode: how to parse a file, how to identify which vendor produced it, how its rows group into entities, how a set of files resolves into entity streams, and what a generated reader must get right.

When this skill is used

This is not a stage in the migration flow — it is a reference consulted by two stages:

  • rp-discovery consults the Capture section to sample the files and produce the canonical source-profile.md + source-schema.json.
  • rp-import-codegen consults the Read contract section to generate a reader that extracts CSV data correctly (grouping, derived entities, empty-vs-absent) into durable project-local files for the later import step.

rp-execute-import never consults this skill — by the time execution runs, the CSV-specific knowledge is already baked into the generated reader.

Platform identity

  • Source platform: csv — a file-provided flow, not a URL probe.
  • Set "platform": "csv" in the emitted source-schema.json, and record the detected vendor per file in sourceMeta.vendor / sourceMeta.sourceFiles[].
  • Record sourcePlatform=csv, sourceMode=files_only, and every input file in fileInputPaths in orchestration/decisions.json. Preflight requires no source env keys for csv; the files_only branch enforces a non-empty fileInputPaths instead.

Three layers

  1. A generic core — lib/csv-parse.js (parse, dialect detection, type sniffing) and lib/csv-layout.js (layout inference, derived entities). Knows nothing about commerce and handles any CSV, including hand-rolled ones.
  2. Per-vendor overlays — declarative JSON profiles under vendors/ that specialize the core with a vendor's fingerprint anchors, known layout, column→Wix pre-map, and quirks. v1 ships shopify, woocommerce, magento, bigcommerce.
  3. A fingerprint detector — lib/csv-fingerprint.js picks the overlay from the header set, or honors a user-stated vendor, and falls back to custom below the threshold.

The overlay is advisory, never authoritative. The authoritative record of which columns a file contains is always the header row read at discovery time. The overlay only (a) identifies the vendor and (b) pre-fills mappings the LLM would otherwise propose.

Capture (discovery-time)

Sampling the files to learn their shape — not a bulk load.

Before capture, verify migrations/<project>/config/source.csv.env. Create it if missing, using empty values for the user to fill:

CSV_INPUT_ROOT=            # optional; directory the input paths are recorded relative to
CSV_DELIMITER=             # optional; blank = auto-detect , ; \t |
CSV_ENCODING=              # optional; blank = auto-detect (UTF-8 / BOM)
CSV_VENDOR=                # optional; user-stated vendor overrides fingerprint detection
CSV_MEDIA_URL_REWRITE_FROM=
CSV_MEDIA_URL_REWRITE_TO=
CSV_STORE_CURRENCY=        # ask the person: store currency, ISO 4217 (e.g. USD)
CSV_STORE_TIME_ZONE=       # ask the person: store time zone, IANA name (e.g. America/New_York)
CSV_STORE_LANGUAGE=        # ask the person: primary language, two letters (e.g. en) or en-US
CSV_STORE_COUNTRY=         # ask the person: store country, ISO 3166-1 alpha-2 (e.g. US)

A CSV does not carry the store's settings, so ask the person for the four CSV_STORE_* values at intake (each is optional; --currency, --time-zone, --language, --country override them). A value they cannot give stays blank and is recorded as unknown, never guessed. A currency column in the data is evidence only: it never fills in the store currency.

Unlike source.wordpress.env, source.csv.env is not secret-bearing — it holds delimiter/encoding/vendor/rewrite hints only, no credentials. Regular file handling applies. There is no acquisition-mode fork and no credentials request for a CSV run.

  1. Run the deterministic capture script from this skill's directory (the folder containing this SKILL.md; see CONVENTIONS.md):

    node scripts/csv-discovery.js --file <path> [--file <path> ...] \
      --out-dir <migrations-root>/<project>/data/csv-discovery
    

    --file is repeatable; pass the whole file set in one run so roles and split files are resolved together. For long runs, pass --progress-log execution/progress.ndjson (the runner's file) and wait for it with node <toolkit>/scripts/wait-background.js --project <dir> (CONVENTIONS.md#waiting-for-background-work), never a loop of your own.

    Useful options: --vendor (override detection), --delimiter / --encoding (override detection), --role <path>:<role> (name a file's entity when the script cannot), --allow-header-superset (union split files whose headers differ), --scan-rows.

  2. Per run the script: reads each header → detects the dialect → fingerprints the vendor per fi

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

Установить rp-source-csv в Claude Code и Claude Desktop

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

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

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

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

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

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

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

lib/canonical-record.jslib/csv-extractor.jslib/csv-fileset.jslib/csv-fingerprint.jslib/csv-layout.jslib/csv-parse.jslib/csv-regional.jsreader-catalog.jsonscripts/csv-discovery.jsscripts/csv-extract.jssource-schema.example.jsonvendors/bigcommerce.jsonvendors/magento.jsonvendors/shopify.jsonvendors/woocommerce.json

FAQ

Что делает скилл rp-source-csv?

CSV file source adapter: parse core, vendor fingerprinting (Shopify, WooCommerce, Magento, BigCommerce), layout inference, file-set handling, and read contract for codegen. Use when the migration starts from one or more CSV/export files instead of a live source URL.

Как установить скилл rp-source-csv?

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

Скилл rp-source-csv запускает скрипты?

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

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

Сравнить rp-source-csv с