[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M698S3TH2RZF6C1BRNZ2AHE8":3,"skill-same:01M698S3TH2RZF6C1BRNZ2AHE8":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M698S3TH2RZF6C1BRNZ2AHE8","create-and-cleanup-migration",null,"Use for end-to-end ClawHub Convex production migrations, backfills, destructive cleanups, and one-off maintenance functions that must be created, validated, shipped, run, verified, then removed after completion.","openclaw\u002Fclawhub","openclaw","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F252820863?v=4","01M698P3FSAZ6B4R928ZF19KPT","01M698PDMKEC6E49395505BD05",9555,"MIT","https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawhub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcreate-and-cleanup-migration\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"create and cleanup migration","cleanup","create","migration","clawhub convex","convex","clawhub","run","Production","use","maintenance","functions","migrations","end","verified","for","2026-11-10 10:12:30",false,"---\nname: create-and-cleanup-migration\ndescription: Use for end-to-end ClawHub Convex production migrations, backfills, destructive cleanups, and one-off maintenance functions that must be created, validated, shipped, run, verified, then removed after completion.\n---\n\n# Create And Cleanup Migration\n\nDrive a ClawHub Convex migration from implementation through production cleanup,\nwith explicit operator gates before destructive execution and before removing the\ntemporary migration code.\n\n## When To Use\n\n- A Convex production data migration, backfill, destructive cleanup, schema\n  narrowing, table reshaping, or one-off maintenance function is needed.\n- Temporary Convex code must be created, deployed, run, verified, and then\n  removed after it is no longer useful.\n- The user asks for the full lifecycle: implement migration, PR, deploy, dry run,\n  apply, verify, cleanup PR, deploy cleanup.\n\n## Required Companion Guidance\n\n1. Start with `convex-migration-helper`.\n2. Read `convex\u002F_generated\u002Fai\u002Fguidelines.md` before editing Convex code.\n3. Default to `@convex-dev\u002Fmigrations` for production data changes.\n4. If not using `@convex-dev\u002Fmigrations`, write down why the component is\n   unnecessary and provide equivalent:\n   - dry-run support\n   - cursor batching\n   - resumable\u002Fprogress behavior\n   - destructive confirmation token\n   - real Convex runtime validation\n5. Use `clawhub-convex` for repository-specific file placement and runtime\n   targeting. Use `clawhub-production-release` for production deploy phases.\n\n## Safety Rules\n\n- Never run a destructive production apply step until after presenting dry-run\n  results and receiving explicit user confirmation in the current thread.\n- Before implementing anything, classify the requested \"migration\" as one of:\n  code deploy, existing Convex function run, operator import\u002Fexport command,\n  schema narrowing, data cleanup, or cleanup-code removal. Do not invent a new\n  Convex migration function when the issue or PR specifies an operator command\n  such as `convex import --replace`.\n- Never remove migration code until after presenting apply\u002Fverification results\n  and receiving explicit user confirmation in the current thread.\n- Keep production commands pointed at the explicit deployment name when known;\n  do not rely on generic `--prod` if this repo's guidance says to verify the\n  actual deployment.\n- If the migration can affect visibility, moderation, ownership, billing,\n  installability, or public API output, call that out before the apply gate.\n- Preserve resume cursors, run IDs, PR URLs, deploy URLs, and final stats in the\n  handoff.\n\n## Phase 1: Design The Migration\n\n1. Identify the intended data change and whether it is:\n   - schema widen\u002Fmigrate\u002Fnarrow\n   - field cleanup\n   - table cleanup\n   - ownership\u002Frelationship repair\n   - recurring maintenance\n2. Choose the implementation:\n   - Prefer `@convex-dev\u002Fmigrations` for non-trivial production data.\n   - Use a hand-rolled internal function only for a clearly small or special\n     case, and document the exception.\n3. Define done criteria:\n   - dry-run expected counts\n   - apply expected counts\n   - verification query\u002Fresult proving no remaining targets\n   - cleanup PR scope\n\n## Phase 2: Implement\n\n1. Add or update the Convex migration\u002Fmaintenance code.\n2. Include argument validators for every Convex function.\n3. Include dry-run support.\n4. Include batching and resume\u002Fprogress state.\n5. Include a confirmation token for destructive writes.\n6. Keep apply logic idempotent where practical.\n7. Add targeted tests for business logic and safety gates.\n8. Add real Convex runtime validation for Convex semantics such as pagination,\n   validators, internal\u002Fpublic function boundaries, scheduler behavior, and\n   action\u002Fquery\u002Fmutation interactions.\n\n## Phase 3: Local Validation\n\nRun the smallest meaningful set first, then broaden before PR handoff:\n\n- targeted unit tests for the migration logic\n- `bunx convex codegen` when Convex API\u002Fschema changed\n- `bunx tsc --noEmit` or the repo's Convex deploy typecheck path\n- `bun run ci:static`\n- `bun run ci:unit` for source\u002Ftest changes unless explicitly waived\n- a real local Convex validation path, such as `bunx convex dev --once`,\n  `convex run`, HTTP smoke, or local-auth Playwright, covering the changed\n  Convex behavior\n\nIf local real Convex validation is blocked, record the blocker and make the PR\nor deployment plan explicitly compensate with an equivalent runtime proof.\n\n## Phase 4: PR, Review, Merge, Deploy\n\n1. Open a focused PR containing the migration implementation.\n2. Include:\n   - summary\n   - migration strategy\n   - dry-run\u002Fapply safety gates\n   - tests and runtime validation\n   - cleanup plan\n3. Run the repo's review\u002FCI workflow required by `AGENTS.md`.\n4. Address actionable review findings.\n5. Merge only after required checks are green or the user explicitly accepts a\n   documented risk.\n6. Deploy the relevant production target from `main`.\n7. Wait for deployment success before running the production dry run.\n\n## Phase 5: Production Dry Run\n\n1. Run the production dry run with bounded batch settings.\n2. Resume until either:\n   - `isDone: true`, or\n   - a clearly documented safety cap is reached.\n3. Present results to the user before apply:\n   - deployment name\n   - command shape\n   - `dryRun`\n   - `isDone`\n   - done\u002Fprogress fields\n   - scanned\u002Fmatched\u002Fpatched\u002Fdeleted stats\n   - sample IDs\n   - resume cursors if incomplete\n   - known user-visible or operational implications\n4. Stop and wait for explicit user confirmation before applying.\n\n## Phase 6: Production Apply\n\n1. Run only after explicit user confirmation of the dry-run results.\n2. Use the destructive confirmation token.\n3. Resume in bounded batches until complete or until a documented safety cap.\n4. Present apply results:\n   - patched\u002Fdeleted counts\n   - skipped\u002Fmissing counts if tracked\n   - final cursors\u002Fprogress\n   - any errors or partial completion\n5. Run verification:\n   - dry run or status command should show zero remaining targets, or\n   - explain why remaining targets are expected.\n6. Stop and wait for explicit user confirmation before cleanup-code removal.\n\n## Phase 7: Cleanup PR\n\n1. Remove temporary migration functions, tests, docs, scripts, and generated API\n   entries that are no longer needed.\n2. Keep durable specs\u002Fdocs only if they explain lasting behavior or invariants.\n3. Run targeted validation plus the repo-required gates for the touched surface.\n4. Open a cleanup PR with:\n   - apply results\n   - verification proof\n   - explanation of removed temporary code\n5. Merge after checks\u002Freview.\n6. Deploy the cleanup PR if removing Convex functions or schema\u002Fcode that affects\n   production.\n\n## Final Handoff\n\nReport:\n\n- implementation PR URL and merge SHA\n- production deploy run URL and deployed SHA\n- dry-run result\n- apply result\n- verification result\n- cleanup PR URL, merge SHA, and deploy run URL\n- any remaining follow-up tasks or intentional retained migration code\n","# Create And Cleanup Migration\n\nDrive a ClawHub Convex migration from implementation through production cleanup,\nwith explicit operator gates before destructive execution and before removing the\ntemporary migration code.\n\n## When To Use\n\n- A Convex production data migration, backfill, destructive cleanup, schema\n  narrowing, table reshaping, or one-off maintenance function is needed.\n- Temporary Convex code must be created, deployed, run, verified, and then\n  removed after it is no longer useful.\n- The user asks for the full lifecycle: implement migration, PR, deploy, dry run,\n  apply, verify, cleanup PR, deploy cleanup.\n\n## Required Companion Guidance\n\n1. Start with `convex-migration-helper`.\n2. Read `convex\u002F_generated\u002Fai\u002Fguidelines.md` before editing Convex code.\n3. Default to `@convex-dev\u002Fmigrations` for production data changes.\n4. If not using `@convex-dev\u002Fmigrations`, write down why the component is\n   unnecessary and provide equivalent:\n   - dry-run support\n   - cursor batching\n   - resumable\u002Fprogress behavior\n   - destructive confirmation token\n   - real Convex runtime validation\n5. Use `clawhub-convex` for repository-specific file placement and runtime\n   targeting. Use `clawhub-production-release` for production deploy phases.\n\n## Safety Rules\n\n- Never run a destructive production apply step until after presenting dry-run\n  results and receiving explicit user confirmation in the current thread.\n- Before implementing anything, classify the requested \"migration\" as one of:\n  code deploy, existing Convex function run, operator import\u002Fexport command,\n  schema narrowing, data cleanup, or cleanup-code removal. Do not invent a new\n  Convex migration function when the issue or PR specifies an operator command\n  such as `convex import --replace`.\n- Never remove migration code until after presenting apply\u002Fverification results\n  and receiving explicit user confirmation in the current thread.\n- Keep production commands pointed at the explicit deployment name when known;\n  do not rely on generic `--prod` if this repo's guidance says to verify the\n  actual deployment.\n- If the migration can affect visibility, moderation, ownership, billing,\n  installability, or public API output, call that out before the apply gate.\n- Preserve resume cursors, run IDs, PR URLs, deploy URLs, and final stats in the\n  handoff.\n\n## Phase 1: Design The Migration\n\n1. Identify the intended data change and whether it is:\n   - schema widen\u002Fmigrate\u002Fnarrow\n   - field cleanup\n   - table cleanup\n   - ownership\u002Frelationship repair\n   - recurring maintenance\n2. Choose the implementation:\n   - Prefer `@convex-dev\u002Fmigrations` for non-trivial production data.\n   - Use a hand-rolled internal function only for a clearly small or special\n     case, and document the exception.\n3. Define done criteria:\n   - dry-run expected counts\n   - apply expected counts\n   - verification query\u002Fresult proving no remaining targets\n   - cleanup PR scope\n\n## Phase 2: Implement\n\n1. Add or update the Convex migration\u002Fmaintenance code.\n2. Include argument validators for every Convex function.\n3. Include dry-run support.\n4. Include batching and resume\u002Fprogress state.\n5. Include a confirmation token for destructive writes.\n6. Keep apply logic idempotent where practical.\n7. Add targeted tests for business logic and safety gates.\n8. Add real Convex runtime validation for Convex semantics such as pagination,\n   validators, internal\u002Fpublic function boundaries, scheduler behavior, and\n   action\u002Fquery\u002Fmutation interactions.\n\n## Phase 3: Local Validation\n\nRun the smallest meaningful set first, then broaden before PR handoff:\n\n- targeted unit tests for the migration logic\n- `bunx convex codegen` when Convex API\u002Fschema changed\n- `bunx tsc --noEmit` or the repo's Convex deploy typecheck path\n- `bun run ci:static`\n- `bun run ci:unit` for source\u002Ftest changes unless explicitly waived\n- a real local Convex validation path, such as `bunx convex dev --once`,\n  `convex run`, HTTP smoke, or local-auth Playwright, covering the changed\n  Convex behavior\n\nIf local real Convex validation is blocked, record the blocker and make the PR\nor deployment plan explicitly compensate with an equivalent runtime proof.\n\n## Phase 4: PR, Review, Merge, Deploy\n\n1. Open a focused PR containing the migration implementation.\n2. Include:\n   - summary\n   - migration strategy\n   - dry-run\u002Fapply safety gates\n   - tests and runtime validation\n   - cleanup plan\n3. Run the repo's review\u002FCI workflow required by `AGENTS.md`.\n4. Address actionable review findings.\n5. Merge only after required checks are green or the user explicitly accepts a\n   documented risk.\n6. Deploy the relevant production target from `main`.\n7. Wait for deployment success before running the production dry run.\n\n## Phase 5: Production Dry Run\n\n1. Run the production dry run with bounded batch settings.\n2. Resume until either:\n   - `isDone: true`, or\n   - a clearly documented safety cap is reached.\n3. Present results to the user before apply:\n   - deployment name\n   - command shape\n   - `dryRun`\n   - `isDone`\n   - done\u002Fprogress fields\n   - scanned\u002Fmatched\u002Fpatched\u002Fdeleted stats\n   - sample IDs\n   - resume cursors if incomplete\n   - known user-visible or operational implications\n4. Stop and wait for explicit user confirmation before applying.\n\n## Phase 6: Production Apply\n\n1. Run only after explicit user confirmation of the dry-run results.\n2. Use the destructive confirmation token.\n3. Resume in bounded batches until complete or until a documented safety cap.\n4. Present apply results:\n   - patched\u002Fdeleted counts\n   - skipped\u002Fmissing counts if tracked\n   - final cursors\u002Fprogress\n   - any errors or partial completion\n5. Run verification:\n   - dry run or status command should show zero remaining targets, or\n   - explain why remaining targets are expected.\n6. Stop and wait for explicit user confirmation before cleanup-code removal.\n\n## Phase 7: Cleanup PR\n\n1. Remove temporary migration functions, tests, docs, scripts, and generated API\n   entries that are no longer needed.\n2. Keep durable specs\u002Fdocs only if they explain lasting behavior or invariants.\n3. Run targeted validation plus the repo-required gates for the touched surface.\n4. Open a cleanup PR with:\n   - apply results\n   - verification proof\n   - explanation of removed temporary code\n5. Merge after checks\u002Freview.\n6. Deploy the cleanup PR if removing Convex functions or schema\u002Fcode that affects\n   production.\n\n## Final Handoff\n\nReport:\n\n- implementation PR URL and merge SHA\n- production deploy run URL and deployed SHA\n- dry-run result\n- apply result\n- verification result\n- cleanup PR URL, merge SHA, and deploy run URL\n- any remaining follow-up tasks or intentional retained migration code\n",{"name":5,"description":7},"main","fd6beef619775fe02dd2548b0658bf88b46d7740",".agents\u002Fskills\u002Fcreate-and-cleanup-migration",1492,"https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawhub","https:\u002F\u002Fclawhub.ai","https:\u002F\u002Fgithub.com\u002Fopenclaw","https:\u002F\u002Fopenclaw.ai","Your personal, open source AI assistant.","2026-11-15 03:03:27",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add openclaw\u002Fclawhub --skill create-and-cleanup-migration",{"tool":55,"command":56},"bunx","bunx skills add openclaw\u002Fclawhub --skill create-and-cleanup-migration",{"tool":58,"command":59},"pnpm","pnpm dlx skills add openclaw\u002Fclawhub --skill create-and-cleanup-migration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawhub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcreate-and-cleanup-migration\u002FSKILL.md",true,[],[64,72,79,102,132,147],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":71},"01M7415W7GWE5XEH7ETJ1YWCF2","notes","Turn user-provided notes into a concise agenda.","https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawhub\u002Fblob\u002Fmain\u002Fscripts\u002Fsecurity\u002Ffixtures\u002Ftemplate-qualification\u002Fskills\u002Fnotes\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":71},"01M7415V57FG63ZGV9W35MV3TH","hosted-research","Read approved reference material for the hosted proof.","https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawhub\u002Fblob\u002Fmain\u002Ffixtures\u002Ftemplates\u002Fhosted-e2e\u002Fpackage\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":34},"01M698QE868QCJ1HN5H03NAKCZ","convex-advisor","Read the Convex deployment's 72h insights (read limits, OCC contention), root-cause each event in code, report evidence-backed perf\u002Fcost findings with fixes.","https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawhub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fconvex-advisor\u002FSKILL.md",[],[86,87,23,88,89,90,91,92,93,94,95,96,97,98,99,100,101],"convex advisor","advisor","with","cost","perf","evidence","limits","fixes","event","deployment","read","report","insights","code","root","root-cause",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":113,"publishedAt":34},"01M698QD01M039DZ8WCRE8J6WY","convex-add","Add a capability to the CURRENT Convex app — consults the served Convex capability catalog for always-current procedures (billing, crons, auth, agent, search, …); falls back to built-in hosting or @convex-dev component search. TRIGGER when the user runs \u002Fadd, or asks to add hosting\u002Fpublishing or any backend capability to an existing Convex app.","https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawhub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fconvex-add\u002FSKILL.md",[108],{"categoryNo":109,"categoryName":110,"taxonomyType":111,"taxonomyTypeDesc":112},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[114,23,115,116,117,118,119,120,121,122,123,124,125,33,126,127,128,129,130,131],"add","convex add","publishing","user","when","Existing","dev","auth","hosting","catalog","trigger","search","back","capability","backend","app","billing","component",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":34},"01M698QBS5JVY310XM3RGFZCK4","convex-acquire-domain","Find and buy a domain for the current Convex app through Convex, then bind it (labs; spend action).","https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawhub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fconvex-acquire-domain\u002FSKILL.md",[],[23,139,140,141,142,129,33,143,144,145,146],"domain","acquire","convex acquire domain","bind","find","buy","action","it",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":34},"01M698Q9P74GJAVDMCP33QBBWX","controlling-costs","Analyzes Axiom query patterns to find unused data, then builds dashboards and monitors for cost optimization. Use when asked to reduce Axiom costs, find unused columns or field values, identify data waste, or track ingest spend.","https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawhub\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcontrolling-costs\u002FSKILL.md",[],[154,155,33,156,157,158,159,27,118,160,161,89,162,163,164,143,165,166,167],"controlling costs","data","Optimization","cost optimization","ingest","unused","reduce","query","track","values","axiom","columns","patterns","dashboards"]