[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CCE5DVER8DQWJDY51HAJF7":3,"skill-same:01M6CCE5DVER8DQWJDY51HAJF7":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":15,"repositoryHtmlUrl":50,"repositoryHomepageUrl":51,"ownerHtmlUrl":52,"ownerBlogUrl":17,"ownerDescription":17,"updatedAt":53,"install":54,"resources":67},"01M6CCE5DVER8DQWJDY51HAJF7","schema-builder","Convex 数据库模式设计","Design and generate Convex database schemas with proper validation, indexes, and relationships. Use when creating schema.ts or modifying table definitions.","设计并生成 Convex 数据库模式（schema），包含完善的验证、索引和关系。在创建 schema.ts 或修改表定义时使用。","baisharg\u002FASTN","baisharg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F204916775?v=4","01M6CC8XHZYVK2DR22FZ1BESCG","BAISH","01M6CC8XP400QZ9DXAWTC8EG3X",2,"AGPL-3.0",null,"https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fschema-builder\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BS1P4QM1G70C9FKMTZ88VK","数据库管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41],"schema","builder","schema builder","design","convex","generate","validation","database","table","use","indexes","2026-11-10 10:12:30",false,"---\nname: schema-builder\ndescription: Design and generate Convex database schemas with proper validation, indexes, and relationships. Use when creating schema.ts or modifying table definitions.\n---\n\n# Convex Schema Builder\n\nBuild well-structured Convex schemas following best practices for relationships, indexes, and validators.\n\n## When to Use\n\n- Creating a new `convex\u002Fschema.ts` file\n- Adding tables to existing schema\n- Designing data model relationships\n- Adding or optimizing indexes\n- Converting nested data to relational structure\n\n## Schema Design Principles\n\n1. **Document-Relational**: Use flat documents with ID references, not deep nesting\n2. **Index Foreign Keys**: Always index fields used in lookups (userId, teamId, etc.)\n3. **Limit Arrays**: Only use arrays for small, bounded collections (\u003C8192 items)\n4. **Type Safety**: Use strict validators with `v.*` types\n\n## Schema Template\n\n```typescript\nimport { defineSchema, defineTable } from 'convex\u002Fserver'\nimport { v } from 'convex\u002Fvalues'\n\nexport default defineSchema({\n  tableName: defineTable({\n    \u002F\u002F Required fields\n    field: v.string(),\n\n    \u002F\u002F Optional fields\n    optional: v.optional(v.number()),\n\n    \u002F\u002F Relations (use IDs)\n    userId: v.id('users'),\n\n    \u002F\u002F Enums with union + literal\n    status: v.union(\n      v.literal('active'),\n      v.literal('pending'),\n      v.literal('archived'),\n    ),\n\n    \u002F\u002F Timestamps\n    createdAt: v.number(),\n    updatedAt: v.optional(v.number()),\n  })\n    \u002F\u002F Index for queries by this field\n    .index('by_user', ['userId'])\n    \u002F\u002F Compound index for common query patterns\n    .index('by_user_and_status', ['userId', 'status'])\n    \u002F\u002F Index for time-based queries\n    .index('by_created', ['createdAt']),\n})\n```\n\n## Common Patterns\n\n### One-to-Many Relationship\n\n```typescript\nexport default defineSchema({\n  users: defineTable({\n    name: v.string(),\n    email: v.string(),\n  }).index('by_email', ['email']),\n\n  posts: defineTable({\n    userId: v.id('users'),\n    title: v.string(),\n    content: v.string(),\n  }).index('by_user', ['userId']),\n})\n```\n\n### Many-to-Many with Junction Table\n\n```typescript\nexport default defineSchema({\n  users: defineTable({\n    name: v.string(),\n  }),\n\n  projects: defineTable({\n    name: v.string(),\n  }),\n\n  projectMembers: defineTable({\n    userId: v.id('users'),\n    projectId: v.id('projects'),\n    role: v.union(v.literal('owner'), v.literal('member')),\n  })\n    .index('by_user', ['userId'])\n    .index('by_project', ['projectId'])\n    .index('by_project_and_user', ['projectId', 'userId']),\n})\n```\n\n### Hierarchical Data\n\n```typescript\nexport default defineSchema({\n  comments: defineTable({\n    postId: v.id('posts'),\n    parentId: v.optional(v.id('comments')), \u002F\u002F null for top-level\n    userId: v.id('users'),\n    text: v.string(),\n  })\n    .index('by_post', ['postId'])\n    .index('by_parent', ['parentId']),\n})\n```\n\n### Small Bounded Arrays (OK to use)\n\n```typescript\nexport default defineSchema({\n  users: defineTable({\n    name: v.string(),\n    \u002F\u002F Small, bounded collections are fine\n    roles: v.array(\n      v.union(v.literal('admin'), v.literal('editor'), v.literal('viewer')),\n    ),\n    tags: v.array(v.string()), \u002F\u002F e.g., max 10 tags\n  }),\n})\n```\n\n## Validator Reference\n\n```typescript\n\u002F\u002F Primitives\nv.string()\nv.number()\nv.boolean()\nv.null()\nv.id('tableName')\n\n\u002F\u002F Optional\nv.optional(v.string())\n\n\u002F\u002F Union types (enums)\nv.union(v.literal('a'), v.literal('b'))\n\n\u002F\u002F Objects\nv.object({\n  key: v.string(),\n  nested: v.number(),\n})\n\n\u002F\u002F Arrays\nv.array(v.string())\n\n\u002F\u002F Records (arbitrary keys)\nv.record(v.string(), v.boolean())\n\n\u002F\u002F Any (avoid if possible)\nv.any()\n```\n\n## Index Strategy\n\n1. **Single-field indexes**: For simple lookups\n   - `by_user: [\"userId\"]`\n   - `by_email: [\"email\"]`\n\n2. **Compound indexes**: For filtered queries\n   - `by_user_and_status: [\"userId\", \"status\"]`\n   - `by_team_and_created: [\"teamId\", \"createdAt\"]`\n\n3. **Remove redundant**: `by_a_and_b` usually covers `by_a`\n\n## Checklist\n\n- [ ] All foreign keys have indexes\n- [ ] Common query patterns have compound indexes\n- [ ] Arrays are small and bounded (or converted to relations)\n- [ ] All fields have proper validators\n- [ ] Enums use `v.union(v.literal(...))` pattern\n- [ ] Timestamps use `v.number()` (milliseconds since epoch)\n\n## Migration from Nested to Relational\n\nIf converting from nested structures:\n\n**Before:**\n\n```typescript\nusers: defineTable({\n  posts: v.array(\n    v.object({\n      title: v.string(),\n      comments: v.array(v.object({ text: v.string() })),\n    }),\n  ),\n})\n```\n\n**After:**\n\n```typescript\nusers: defineTable({\n  name: v.string(),\n}),\n\nposts: defineTable({\n  userId: v.id(\"users\"),\n  title: v.string(),\n}).index(\"by_user\", [\"userId\"]),\n\ncomments: defineTable({\n  postId: v.id(\"posts\"),\n  text: v.string(),\n}).index(\"by_post\", [\"postId\"]),\n```\n","# Convex Schema Builder\n\nBuild well-structured Convex schemas following best practices for relationships, indexes, and validators.\n\n## When to Use\n\n- Creating a new `convex\u002Fschema.ts` file\n- Adding tables to existing schema\n- Designing data model relationships\n- Adding or optimizing indexes\n- Converting nested data to relational structure\n\n## Schema Design Principles\n\n1. **Document-Relational**: Use flat documents with ID references, not deep nesting\n2. **Index Foreign Keys**: Always index fields used in lookups (userId, teamId, etc.)\n3. **Limit Arrays**: Only use arrays for small, bounded collections (\u003C8192 items)\n4. **Type Safety**: Use strict validators with `v.*` types\n\n## Schema Template\n\n```typescript\nimport { defineSchema, defineTable } from 'convex\u002Fserver'\nimport { v } from 'convex\u002Fvalues'\n\nexport default defineSchema({\n  tableName: defineTable({\n    \u002F\u002F Required fields\n    field: v.string(),\n\n    \u002F\u002F Optional fields\n    optional: v.optional(v.number()),\n\n    \u002F\u002F Relations (use IDs)\n    userId: v.id('users'),\n\n    \u002F\u002F Enums with union + literal\n    status: v.union(\n      v.literal('active'),\n      v.literal('pending'),\n      v.literal('archived'),\n    ),\n\n    \u002F\u002F Timestamps\n    createdAt: v.number(),\n    updatedAt: v.optional(v.number()),\n  })\n    \u002F\u002F Index for queries by this field\n    .index('by_user', ['userId'])\n    \u002F\u002F Compound index for common query patterns\n    .index('by_user_and_status', ['userId', 'status'])\n    \u002F\u002F Index for time-based queries\n    .index('by_created', ['createdAt']),\n})\n```\n\n## Common Patterns\n\n### One-to-Many Relationship\n\n```typescript\nexport default defineSchema({\n  users: defineTable({\n    name: v.string(),\n    email: v.string(),\n  }).index('by_email', ['email']),\n\n  posts: defineTable({\n    userId: v.id('users'),\n    title: v.string(),\n    content: v.string(),\n  }).index('by_user', ['userId']),\n})\n```\n\n### Many-to-Many with Junction Table\n\n```typescript\nexport default defineSchema({\n  users: defineTable({\n    name: v.string(),\n  }),\n\n  projects: defineTable({\n    name: v.string(),\n  }),\n\n  projectMembers: defineTable({\n    userId: v.id('users'),\n    projectId: v.id('projects'),\n    role: v.union(v.literal('owner'), v.literal('member')),\n  })\n    .index('by_user', ['userId'])\n    .index('by_project', ['projectId'])\n    .index('by_project_and_user', ['projectId', 'userId']),\n})\n```\n\n### Hierarchical Data\n\n```typescript\nexport default defineSchema({\n  comments: defineTable({\n    postId: v.id('posts'),\n    parentId: v.optional(v.id('comments')), \u002F\u002F null for top-level\n    userId: v.id('users'),\n    text: v.string(),\n  })\n    .index('by_post', ['postId'])\n    .index('by_parent', ['parentId']),\n})\n```\n\n### Small Bounded Arrays (OK to use)\n\n```typescript\nexport default defineSchema({\n  users: defineTable({\n    name: v.string(),\n    \u002F\u002F Small, bounded collections are fine\n    roles: v.array(\n      v.union(v.literal('admin'), v.literal('editor'), v.literal('viewer')),\n    ),\n    tags: v.array(v.string()), \u002F\u002F e.g., max 10 tags\n  }),\n})\n```\n\n## Validator Reference\n\n```typescript\n\u002F\u002F Primitives\nv.string()\nv.number()\nv.boolean()\nv.null()\nv.id('tableName')\n\n\u002F\u002F Optional\nv.optional(v.string())\n\n\u002F\u002F Union types (enums)\nv.union(v.literal('a'), v.literal('b'))\n\n\u002F\u002F Objects\nv.object({\n  key: v.string(),\n  nested: v.number(),\n})\n\n\u002F\u002F Arrays\nv.array(v.string())\n\n\u002F\u002F Records (arbitrary keys)\nv.record(v.string(), v.boolean())\n\n\u002F\u002F Any (avoid if possible)\nv.any()\n```\n\n## Index Strategy\n\n1. **Single-field indexes**: For simple lookups\n   - `by_user: [\"userId\"]`\n   - `by_email: [\"email\"]`\n\n2. **Compound indexes**: For filtered queries\n   - `by_user_and_status: [\"userId\", \"status\"]`\n   - `by_team_and_created: [\"teamId\", \"createdAt\"]`\n\n3. **Remove redundant**: `by_a_and_b` usually covers `by_a`\n\n## Checklist\n\n- [ ] All foreign keys have indexes\n- [ ] Common query patterns have compound indexes\n- [ ] Arrays are small and bounded (or converted to relations)\n- [ ] All fields have proper validators\n- [ ] Enums use `v.union(v.literal(...))` pattern\n- [ ] Timestamps use `v.number()` (milliseconds since epoch)\n\n## Migration from Nested to Relational\n\nIf converting from nested structures:\n\n**Before:**\n\n```typescript\nusers: defineTable({\n  posts: v.array(\n    v.object({\n      title: v.string(),\n      comments: v.array(v.object({ text: v.string() })),\n    }),\n  ),\n})\n```\n\n**After:**\n\n```typescript\nusers: defineTable({\n  name: v.string(),\n}),\n\nposts: defineTable({\n  userId: v.id(\"users\"),\n  title: v.string(),\n}).index(\"by_user\", [\"userId\"]),\n\ncomments: defineTable({\n  postId: v.id(\"posts\"),\n  text: v.string(),\n}).index(\"by_post\", [\"postId\"]),\n```\n",{"name":5,"description":7},"main","83212e6d909b6a0fe9e93fd5a3ff1723300f5b5b",".claude\u002Fskills\u002Fschema-builder","https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN","https:\u002F\u002Fsafetytalent.org","https:\u002F\u002Fgithub.com\u002Fbaisharg","2026-11-15 03:33:22",{"source":9,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add baisharg\u002FASTN --skill schema-builder",{"tool":60,"command":61},"bunx","bunx skills add baisharg\u002FASTN --skill schema-builder",{"tool":63,"command":64},"pnpm","pnpm dlx skills add baisharg\u002FASTN --skill schema-builder","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fschema-builder\u002FSKILL.md",true,[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"bmad-skill-manifest.yaml","REFERENCE","参考文档",1036,"https:\u002F\u002Fgithub.com\u002FManju-Bharati-Mahto\u002FNerve\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbmad-agent-analyst\u002Fbmad-skill-manifest.yaml",[75,95,109,123,140,152],{"skillNo":76,"name":77,"nameZh":78,"description":79,"descriptionZh":80,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":81,"categories":82,"keywords":87,"publishedAt":42},"01M6CCE36AA57CG36R4VHKFRXV","integration-tanstack-start","TanStack Start 集成 PostHog","PostHog integration for TanStack Start full-stack applications","为 TanStack Start 全栈应用集成 PostHog","https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fposthog-integration-tanstack-start\u002FSKILL.md",[83,84],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":85,"categoryName":86,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BWDNFEHJCBZX47YY896K05","应用连接器集成",[88,89,90,91,92,93,94],"integration tanstack start","integration","start","tanstack","stack","applications","posthog",{"skillNo":96,"name":97,"nameZh":17,"description":98,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":42},"01M6CCE0FK6N8XAB093X7TTQ4F","migration-helper","Plan and execute Convex schema migrations safely, including adding fields, creating tables, and data transformations. Use when schema changes affect existing data.","https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmigration-helper\u002FSKILL.md",[],[102,103,35,104,105,106,107,40,31,108],"migration","migration helper","schema migrations safely","data","plan","execute","migrations",{"skillNo":110,"name":111,"nameZh":17,"description":112,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":42},"01M6CCDY3644G8WXXP0BDNMZPR","gsd:sprint","Autonomous phase execution with Codex validation. Runs plan\u002Fexecute\u002Fverify cycles in a bash loop until done or halted.","https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgsd-sprint\u002FSKILL.md",[],[111,116,117,118,106,119,120,107,121,122,37,90],"verify","Bash","loop","codex","autonomous","resume","execution",{"skillNo":124,"name":125,"nameZh":17,"description":126,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":42},"01M6CCDVTZRTFWWGREMV6FF956","gsd:second-opinion","Get a second opinion from OpenAI Codex (GPT-5.2-codex) on code, architecture, or implementation decisions. Use when you want independent verification or an alternative perspective.","https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgsd-second-opinion\u002FSKILL.md",[],[130,131,132,119,133,134,135,136,137,138,40,139],"gsd:second opinion","second opinion","architecture","code","verification","openai","gpt","decisions","question","implementation",{"skillNo":141,"name":142,"nameZh":17,"description":143,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":42},"01M6CCDSDPYYNEDERHP01N30PT","gsd:milestone-sprint","Run entire milestone autonomously with Codex validation. Auto-detects current milestone, executes all phases, and runs audit.","https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgsd-milestone-sprint\u002FSKILL.md",[],[147,119,148,37,149,150,151,121],"gsd:milestone sprint","run","audit","interactive","auto",{"skillNo":153,"name":154,"nameZh":17,"description":155,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":42},"01M6CCDQPC27AN5P984R46TRF7","gsd:health-check","Verify GSD setup - checks Claude, Codex, skills, and MCP servers are working correctly.","https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgsd-health-check\u002FSKILL.md",[],[159,160,161,162,119,163,164,116,165],"health check","gsd:health check","check","health","setup","mcp servers","MCP"]