.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/agent-skills/convex-migration-helper
home/skills/get-convex/agent-skills/convex-migration-helper
get-convex avatar

convex-migration-helper

byget-convex· 29 skills

Installs

92k

Stars

40

Forks

8

Category

Backend & APIs

View on GitHub

TL;DR

Plans Convex schema and data migrations with widen-migrate-narrow and @convex-dev/migrations. Use for breaking schema changes, backfills, table reshaping, or zero-downtime rollouts.

How to install convex-migration-helper?

get-convex/agent-skills/convex-migration-helper
$npx -y skills add get-convex/agent-skills --skill convex-migration-helper

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/get-convex/agent-skills" --skill "get-convex/agent-skills/convex-migration-helper"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/get-convex/agent-skills" that are relevant to the current task. Run `npx skills add "https://github.com/get-convex/agent-skills"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1# Convex Migration Helper
2 
3Safely migrate Convex schemas and data when making breaking changes.
4 
5## When to Use
6 
7- Adding new required fields to existing tables
8- Changing field types or structure
9- Splitting or merging tables
10- Renaming or deleting fields
11- Migrating from nested to relational data
12 
13## When Not to Use
14 
15- Greenfield schema with no existing data in production or dev
16- Adding optional fields that do not need backfilling
17- Adding new tables with no existing data to migrate
18- Adding or removing indexes with no correctness concern
19- Questions about Convex schema design without a migration need
20 
21## Key Concepts
22 
23### Schema Validation Drives the Workflow
24 
25Convex will not let you deploy a schema that does not match the data at rest.
26This is the fundamental constraint that shapes every migration:
27 
28- You cannot add a required field if existing documents don't have it
29- You cannot change a field's type if existing documents have the old type
30- You cannot remove a field from the schema if existing documents still have it
31 
32This means migrations follow a predictable pattern: **widen the schema, migrate
33the data, narrow the schema**.
34 
35### Online Migrations
36 
37Convex migrations run online, meaning the app continues serving requests while
38data is updated asynchronously in batches. During the migration window, your
39code must handle both old and new data formats.
40 
41### Prefer New Fields Over Changing Types
42 
43When changing the shape of data, create a new field rather than modifying an
44existing one. This makes the transition safer and easier to roll back.
45 
46### Don't Delete Data
47 
48Unless you are certain, prefer deprecating fields over deleting them. Mark the
49field as `v.optional` and add a code comment explaining it is deprecated and why
50it existed.
51 
52## Safe Changes (No Migration Needed)
53 
54### Adding Optional Field
55 
56```typescript
57// Before
58users: defineTable({
59 name: v.string(),
60});
61 
62// After - safe, new field is optional
63users: defineTable({
64 name: v.string(),
65 bio: v.optional(v.string()),
66});
67```
68 
69### Adding New Table
70 
71```typescript
72posts: defineTable({
73 userId: v.id("users"),
74 title: v.string(),
75}).index("by_user", ["userId"]);
76```
77 
78### Adding Index
79 
80```typescript
81users: defineTable({
82 name: v.string(),
83 email: v.string(),
84}).index("by_email", ["email"]);
85```
86 
87## Breaking Changes: The Deployment Workflow
88 
89Every breaking migration follows the same multi-deploy pattern:
90 
91**Deploy 1 - Widen the schema:**
92 
931. Update schema to allow both old and new formats (e.g., add optional new
94 field)
952. Update code to handle both formats when reading
963. Update code to write the new format for new documents
974. Deploy
98 
99**Between deploys - Migrate data:**
100 
1015. Run migration to backfill existing documents
1026. Verify all documents are migrated
103 
104**Deploy 2 - Narrow the schema:**
105 
1067. Update schema to require the new format only
1078. Remove code that handles the old format
1089. Deploy
109 
110## Using the Migrations Component
111 
112For any non-trivial migration, use the
113[`@convex-dev/migrations`](https://www.convex.dev/components/migrations)
114component. It handles batching, cursor-based pagination, state tracking, resume
115from failure, dry runs, and progress monitoring.
116 
117See `references/migrations-component.md` for installation, setup, defining and
118running migrations directly with `npx convex run migrations:myMigration`, dry
119runs, status monitoring, and configuration options.
120 
121## Common Migration Patterns
122 
123See `references/migration-patterns.md` for complete patterns with code examples
124covering:
125 
126- Adding a required field
127- Deleting a field
128- Changing a field type
129- Splitting nested data into a separate table
130- Cleaning up orphaned documents
131- Zero-downtime strategies (dual write, dual read)
132- Small table shortcut (single internalMutation without the component)
133- Verifying a migration is complete
134 
135## Common Pitfalls
136 
1371. **Making a field required before migrating data**: Convex rejects the deploy
138 because existing documents lack the field. Always widen the schema first.
1392. **Using `.collect()` on large tables**: Hits transaction limits or causes
140 timeouts. Use the migrations component for proper batched pagination.
141 `.collect()` is only safe for tables you know are small.
1423. **Not writing the new format before migrating**: Documents created during the
143 migration window will be missed, leaving unmigrated data after the migration
144 "completes."
1454. **Skipping the dry run**: Use `dryRun: true` to validate migration logic
146 before committing changes to production data. Catches bugs before they touch
147 real documents.
1485. **Deleting fields prematurely**: Prefer deprecating with `v.optional` and a
149 comment. Only delete after you are confident the data is no longer needed and
150 no code references it.
1516. **Using crons for migration batches**: The migrations component handles
152 batching via recursive scheduling internally. Crons require manual cleanup
153 and an extra deploy to remove.
154 
155## Migration Checklist
156 
157- [ ] Identify the breaking change and plan the multi-deploy workflow
158- [ ] Update schema to allow both old and new formats
159- [ ] Update code to handle both formats when reading
160- [ ] Update code to write the new format for new documents
161- [ ] Deploy widened schema and updated code
162- [ ] Define migration using the `@convex-dev/migrations` component
163- [ ] Test with `npx convex run migrations:myMigration '{"dryRun": true}'`
164- [ ] Run migration directly with `npx convex run migrations:myMigration` and
165 monitor status
166- [ ] Verify all documents are migrated
167- [ ] Update schema to require new format only
168- [ ] Clean up code that handled old format
169- [ ] Deploy final schema and code
170- [ ] Remove migration code once confirmed stable

Security

Passed

  • Gen Agent Trust Hubpass
  • Socketpass
  • Snykpass
  • ZeroLeakspass

Preview

get-convex/agent-skillsget-convex/agent-skills

$ npx -y skills add get-convex/agent-skills --skill convex-migration-helper

▸ installing to .claude/skills…

✓ convex-migration-helper ready

Repoget-convex/agent-skills
TypeSkills
CategoryBackend & APIs
ForDeveloperArchitect
UpdatedJul 2026
License—
First seenJul 26, 2026

Tags

Skill

Related

6 picks
Type
  1. microsoft avatarazure-messagingTroubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus.SkillsJul 2026473k1.3k
  2. larksuite avatarlark-openapi-explorer飞书/Lark 原生 OpenAPI 探索:从官方文档库中挖掘未经 CLI 封装的原生 OpenAPI 接口。当用户的需求无法被现有 lark-* skill 或 lark-cli 已注册命令满足,需要查找并调用原生飞书 OpenAPI 时使用。SkillsJul 2026386k16k
  3. larksuite avatarlark-skill-maker创建 lark-cli 的自定义 Skill。当用户需要把飞书 API 操作封装成可复用的 Skill(包装原子 API 或编排多步流程)时使用。SkillsJul 2026385k16k
  4. mattpocock avatarimplementImplement a piece of work based on a spec or set of tickets.SkillsJul 2026237k189k
  5. supabase avatarsupabaseUse when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client…SkillsJul 2026188k2.4k
  6. firebase avatarfirebase-basicsProvides foundational setup, authentication, and project management workflows for Firebase using the Firebase CLI.SkillsJul 2026117k389