{"id":100980,"plugin_id":"plugins_6aed3278a3848191925fc74753ecbe72","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-17T06:15:21.401Z","digest":"1fdd275b4889242bf1993fca3bc10da132aff626b7d693fabac1813392a3ddf0","against":null,"payload":{"description":"IDMP data import/export skill. Use it to inspect exportable root elements, review import/export records, download artifacts, and distinguish package export, artifact download, and import flows.","included_files":[{"relative_path":"references/data-read-flows.md","size_in_bytes":846}],"name":"idmp-data","skill_md_contents":"---\nname: idmp-data\ndescription: \"IDMP data import/export skill. Use it to inspect exportable root elements, review import/export records, download artifacts, and distinguish package export, artifact download, and import flows.\"\nmetadata:\n  author: \"TAOS Data\"\n  version: \"0.5.1\"\n  owner_team: \"AI\"\n  requires:\n    bins:\n      - idmp-cli\n  cliHelp: \"idmp-cli data --help\"\n---\n\n# data\n\n**Read [`../idmp-shared/SKILL.md`](../idmp-shared/SKILL.md) first.**\n\n## What this skill covers\n\n- Discover which top-level elements are available for package import/export.\n- Review import/export records before downloading artifacts or investigating failures.\n- Distinguish package export, artifact download, package import, and single import/export operations.\n- Use records as the operator’s source of truth for status, filenames, and error messages.\n- Accept both valid export outcomes: a record-backed artifact or a ZIP archive streamed directly to stdout.\n\n## Recommended shortcuts\n\n| Shortcut | Purpose |\n|----------|---------|\n| `+roots` | List first-level elements visible to import/export |\n| `+records` | List import/export records |\n| `+download` | Download the artifact for a known record |\n\n## Recommended reference\n\n- [`Data import/export read flows`](references/data-read-flows.md)\n\n## Missing context to resolve first\n\n| Context | Why it must be resolved before import or export |\n| --- | --- |\n| Workflow type | Package export, package import, and datasource CSV import are different mutation chains. |\n| Scope | You need the final `elementIds`, `elementTemplateIds`, or datasource scope before the write. |\n| Expected artifact | Exports can either stream a ZIP directly to stdout or create a record that later exposes `fileName`. |\n| Datasource context | CSV import needs a validated `connectionId`, `dbName`, and table or stable names from earlier reads. |\n| Verification window | Decide when and how you will reread `data records list` after the write. |\n\n## Constrained live behaviors\n\n- Package export, package import, and datasource CSV import must not share guessed payloads or filenames.\n- `data records list` is the authoritative confirmation after every write; a quick success response is not the final state.\n- `data download get` must use the real record artifact name as the `name` path parameter, not a guessed path.\n- A successful export can end in two valid ways: ZIP bytes on stdout or a later record-backed artifact with `fileName`.\n- High-impact import or export work should start with schema inspection or `--dry-run` before the real write.\n- If a probe import creates assets you do not want to keep, cleanup belongs to the owning asset workflow, not to record deletion.\n\n## Operator workflow\n\n1. Start with `first-level-elements` before any export or import decision.\n2. Read `records` before downloading an artifact, reviewing a failure, or confirming the generated filename.\n3. Use `import-and-export export` for package creation, `download get` only when a record exposes `fileName`, and `import-and-export import` or `single-import create` for uploads.\n4. Expect exports and imports to be long-running or asynchronous; the CLI response alone is not the final confirmation.\n5. If export already streamed ZIP bytes to stdout, treat that stream as the artifact and still re-check `records` for audit history.\n6. Re-check `records` after every write to confirm status, artifact name, and failure details.\n\n## Key commands\n\n```bash\nidmp-cli schema data.first-level-elements.list\nidmp-cli data first-level-elements list\n\nidmp-cli schema data.records.list\nidmp-cli data records list\n\nidmp-cli schema data.import-and-export.export\nidmp-cli data import-and-export export --ack-risk --data '{\"elementIds\":[123]}'\n\nidmp-cli schema data.download.get\nidmp-cli data download get --params '{\"name\":\"export.zip\"}'\n\nidmp-cli schema data.import-and-export.import\n# `data.import-and-export.import` is multipart/form-data in the current schema.\n# Inspect the schema output first and build the request with the exact transport and fields\n# (for example `json_file` / `taosgen_file`) instead of assuming a plain JSON body.\nidmp-cli data import-and-export import --ack-risk --data '{...}'\n\nidmp-cli schema data.single-import.create\n# `data.single-import.create` is also multipart/form-data in the current schema.\n# Inspect the schema output first and use the exact upload fields instead of guessing a JSON DTO.\nidmp-cli data single-import create --ack-risk --data '{...}'\n```\n\n## Exception paths\n\n- `first-level-elements` is empty: confirm the current account can see any import/export roots before troubleshooting files.\n- The export call returns quickly but no usable record appears: check whether stdout already contains a ZIP artifact before retrying.\n- A download fails with file-not-found behavior: re-read `records`, use the exact artifact name as `name`, or skip download when the export already streamed ZIP bytes.\n- An import fails validation: inspect the schema first, then read `records` for the real failure reason instead of guessing from the upload step.\n- Package and single import/export results differ: confirm the operator chose the correct flow before retrying.\n\n## Validation scenarios\n\n### 1. Export root discovery\n\nList first-level elements before choosing an export scope:\n\n```bash\nidmp-cli data first-level-elements list\n```\n\n### 2. Record baseline\n\nRead import/export records before writing anything:\n\n```bash\nidmp-cli data records list\n```\n\n### 3. Package export\n\nExport one known element package:\n\n```bash\nidmp-cli data import-and-export export --ack-risk --data '{\"elementIds\":[123]}'\n```\n\n### 4. Artifact branch detection\n\nRe-read records and distinguish a record-backed artifact from a ZIP that was already streamed to stdout:\n\n```bash\nidmp-cli data records list\n```\n\n### 5. Download only when the record exposes fileName\n\nDownload the reported artifact when the export created a downloadable record:\n\n```bash\nidmp-cli data download get --params '{\"name\":\"export.zip\"}'\n```\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}