技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
importer-scaffolder【数据与研究】Use when asked to build an importer from a competitor's export, migrate users' data from another tool, map a CSV or JSON export onto my data model, or make switching to my project easy. Given a sample export (CSV or JSON), produces a field mapping table, an importer code skeleton, a rule that unmatched records are kept rather than dropped, and test f…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
People switch tools when leaving costs them nothing, and an importer is how a small project removes that cost. Importers fail quietly: a column is renamed, a date is in another format, a record has no match, and data disappears without anyone noticing. This skill builds an importer from a real sample export, with a mapping that is explicit and a rule that nothing is silently dropped.
Ask for these if not provided:
What the sample shows: format, encoding, delimiter, header names, date and number formats, nested fields, and anything ambiguous. List assumptions explicitly.
| Source field | Example value | Target field | Transform | Required? | If missing or invalid |
|---|
Every source field appears in the table, mapped or not. Unmapped fields go to the extras destination named in the inputs.
State it in the code and the docs: no source record is dropped. A record that fails validation is imported with what could be parsed, flagged, and listed in an import report; its raw source is preserved in the extras destination.
Code in the requested language with these parts, each a small function:
read(source): streams rows; detects encoding and delimiter; never loads a huge file wholemapRow(row): applies the mapping table; returns { record, warnings, extras }validate(record): required fields and types; returns problems without throwingwrite(record): idempotent upsert keyed on a stable source ID, so re-running an import does not duplicate datareport(): counts of imported, imported with warnings, and per-warning examplesInclude a dry-run mode that prints the report without writing.
Fixture files plus the expected result for each:
Five to eight steps telling users how to export from the source tool and import, including what the import report means.