> **convex-seed** — skill 27 of 33 in [convex/agent-skills](https://skillsdocs.com/convex/agent-skills).
>
> Book (all skills, one file): https://skillsdocs.com/convex/agent-skills.md
> Machine manifest: https://skillsdocs.com/convex/agent-skills/.well-known/agent-skills/index.json
> Install the book: `npx skills add convex/agent-skills`
> Upstream: https://github.com/convex/agent-skills/blob/main/skills/convex-seed/SKILL.md @ `main`
> Raw bytes, no header: https://raw.githubusercontent.com/convex/agent-skills/main/skills/convex-seed/SKILL.md
> Base for relative paths: https://raw.githubusercontent.com/convex/agent-skills/main/skills/convex-seed/
> Licence: Apache-2.0 — https://spdx.org/licenses/Apache-2.0.html
>
> Content © its authors, served unmodified. Takedown: https://github.com/DreambaseAI/skillsdocs/issues/new?labels=takedown&title=Takedown+request

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: convex-seed
description: "Seed or import data into the Convex database."
---

<!-- GENERATED from convex-agents content/capabilities/seed.json — do not edit by hand. -->

# Seed / import data

Populate tables via an internalMutation seed function (re-runnable) or `npx convex import`, matching the schema.

## Workflow

1. For fixtures: write an internalMutation that inserts sample rows; run it with `npx convex run`.
2. For bulk import: shape the data to the schema and use `npx convex import`.
3. Make seeding idempotent (clear-then-insert or upsert) so re-running is safe.
4. Verify row counts.

## Rules

- Seed via internalMutation or convex import, matching validators.
- Make seeding idempotent.
- Never seed secrets/PII into a shared deployment.
