跳到正文
Skillpedia
API 与服务器(后端)9.5k · #12255

convex-seed

它能做什么

这个技能会向 Convex 数据库添加示例数据或批量数据。适合需要测试数据或初始数据集的开发者。

适用场景

  • ✓当你需要示例记录来测试 Convex 应用时。
  • ✓当你想把一批现有数据导入 Convex 时。
  • ✓当你需要重新填充测试数据库,并希望这个过程可以安全地重复执行时。

技能链接

https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-seed/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-seed/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请向我的测试数据库填充 50 个示例客户,以便我试用这个应用。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会编写一个可重复执行的 seed 函数,或使用导入工具,确保数据与 schema 相符,然后统计行数以确认结果。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

<!-- 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.
常见问题

我可以多次运行 seed 吗?

可以。技能会让填充过程可以重复执行,例如先清空再重新插入,或更新已有记录。

应该填充真实用户数据吗?

不应该。技能会说明,绝不要把敏感信息或个人数据填充到共享数据库中。

如何检查数据?

智能体会在 seed 运行后核对行数。

详情

作者的原始描述

Seed or import data into the Convex database.

repo: openclaw/clawhub

热度

GitHub 星标
9.5k
排名
#12255
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能