← ClaudeAtlas

importlisted

Import an existing history CSV into the estimator from a file path, instead of building it with `sync`. Use when the user wants to load / import an existing estimation history (e.g. "import my history from ./history.csv", "load this dataset", "import estimator history"). Supports merging into or replacing the current history.
vslipchenko/ai · ★ 0 · Data & Documents · score 68
Install: claude install-skill vslipchenko/ai
# Estimator — Import History Load an external history CSV into the plugin so a user who already has a dataset can skip `/sync`. Supports **merge** (into an existing history) and **replace**. ## Data location Resolve `<DATA_DIR>` as the other skills do — the per-user data dir `~/.estimator`: - Bash: `DATA_DIR="$HOME/.estimator"` - PowerShell: `$DATA_DIR = Join-Path $env:USERPROFILE '.estimator'` ## Step 1 — Resolve the source path Take the source path from the user's message/argument; if none, prompt for it. Expand `~` and environment variables. Verify the file exists and is readable. Canonicalize both paths before comparing — expand `~`/env vars, resolve symlinks, and normalize case on Windows — and if the source resolves to the live `<DATA_DIR>/history.csv`, refuse (you cannot import a file onto itself). ## Step 2 — Determine mode If `<DATA_DIR>/history.csv` exists, ask the user: **merge** the imported records into it (dedup by key, imported wins) or **replace** it entirely. Replace requires explicit confirmation. If it does not exist, proceed as a straight import (mode = `replace` into an empty target) — no confirmation needed. ## Step 3 — Import Run with the first available runtime: 1. `python3 "<PLUGIN_ROOT>/skills/import/scripts/import_records.py" "<source>" "<DATA_DIR>/history.csv" <merge|replace>` 2. else `python "<PLUGIN_ROOT>/skills/import/scripts/import_records.py" "<source>" "<DATA_DIR>/history.csv" <merge|replace>` 3. else `py -3 "<PLUGIN_ROOT>/skills/imp