/cairn:ingestfrom cairn
Use when a Cairn user wants to load a batch of existing records into a collection that already exists — phrasings like "import these / load this data / add these rows / bulk upload" (rows pasted, generated, or from a file).
Ships in cairn. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Get a batch of rows into an existing collection without corrupting it. The win is reliability, not speed: shape to the schema, dry-run, read the report, and never write blind. (Sourcing or generating the rows is your own research — this skill owns shape-to-schema + safe insert.)
get_data_schema for the collection. Note the required fields, the oneOf/enum values, any x-unique business key, x-references, and x-calculation fields.oneOf/select value is its const (e.g. dehydration: "severe"). Omit every x-calculation field — the server computes those. A row is { id, data }: put the data columns in data; never put an id inside data.x-references) stores the target row's uuid, not its name. To map a name → id, query_records the referenced collection projecting its label field (e.g. fields: ["name"]) — the row id is returned automatically. Don't project id (it's reserved and errors). Put the looked-up uuid in the field; never leave a named link blank or invent an id.dry_run_create_records (writes nothing). Show the user the counts and every per-row validation_error/duplicate. On a validation_error or an ambiguous value (e.g. dehydration: "moderate" when the schema allows none/some/severe), ask — don't silently coerce or drop the row. A row can also fail as "You are not allowed to create this record" — that's the collection's create_when permission (admins bypass), not a data problem: report it, don't reshape the row to dodge it (get_permissions shows the rule).bulk_create_records with the same rows and ids you dry-ran. Then verify: report inserted vs. failed counts honestly; never claim "done" without checking.The dry-run's duplicate status keys on the row id, not on any x-unique business key:
id per row (derive it from the row's natural key). Re-running then reports prior rows as duplicate instead of inserting them twice.case_id), query_records for those keys first — a same-key/new-id row reads as ok in the dry-run but collides at insert.x-calculation fields, or an id inside data.What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/designUse when a Cairn user wants to start tracking something — one thing or a whole project. Phrasings like "I want to track / collect / register / make a form for X", or "set up my project / we need to track several things / here's our paper system". Covers a single new collection, a multi-collection setup with links and permissions, and adding collections to an existing project. Not for loading data (ingest), answering data questions (explore), or restructuring existing collections./designing-tdd-ingestUse when a Cairn user wants to load data they need to *trust* — a recurring or pipeline-fed import where correctness must be checked, not assumed. Phrasings like "make sure the import is right / the totals should match / verify these loaded correctly / this runs every week / import from my pipeline and check it / did anything get dropped". Adds an assertion-first discipline — state the expected counts, coverage, categories, and shape *before* loading, then dry-run, verify, land, and re-verify — on top of a plain import. For a one-off paste-and-go load with no correctness to prove, use `ingest` instead./evolveUse when a Cairn user wants to change or remove something that already exists — phrasings like "add a field / rename a column / change the type / make it required or unique / change who can see or edit records / add skip-logic to the form / delete this record / delete the collection". For creating new collections, use design instead./exploreUse when a Cairn user asks a question about the data already in a collection — phrasings like "how many / which / show me / top N / trend over time / breakdown by ..." — answered as a table or an aggregation (counts, group-by, time trend)./getting-startedUse the first time a Cairn user arrives — phrasings like "hi / how do I start / get started / show me how Cairn works / what can this do", or any opening message when the user's workspace has no collections yet and they haven't named something specific to do. Welcomes a newcomer and walks them through a two-minute example end to end./reviewUse when a Cairn user wants to handle work awaiting approval — phrasings like "what's waiting for me / anything to review / approve these / check the pending entries". Working through a moderated collection's pending queue — approving or rejecting records and edits.Other plugins' skills for the same job
npx claudepluginhub platyplus/cairn-plugin --plugin cairn