[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CCE5DVER8DQWJDY51HAJF7":3,"skill-same:01M6CCE5DVER8DQWJDY51HAJF7":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":14,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":46,"install":47,"resources":60},"01M6CCE5DVER8DQWJDY51HAJF7","schema-builder",null,"Design and generate Convex database schemas with proper validation, indexes, and relationships. Use when creating schema.ts or modifying table definitions.","baisharg\u002FASTN","baisharg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F204916775?v=4","01M6CC8XHZYVK2DR22FZ1BESCG","BAISH","01M6CC8XP400QZ9DXAWTC8EG3X",2,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fschema-builder\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34],"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-13 01:54:27",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add baisharg\u002FASTN --skill schema-builder",{"tool":53,"command":54},"bunx","bunx skills add baisharg\u002FASTN --skill schema-builder",{"tool":56,"command":57},"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,[61],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"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",[68,82,96,110,127,139],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":35},"01M6CCE36AA57CG36R4VHKFRXV","integration-tanstack-start","PostHog integration for TanStack Start full-stack applications","https:\u002F\u002Fgithub.com\u002Fbaisharg\u002FASTN\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fposthog-integration-tanstack-start\u002FSKILL.md",[],[75,76,77,78,79,80,81],"integration tanstack start","integration","start","tanstack","stack","applications","posthog",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":35},"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",[],[89,90,28,91,92,93,94,33,24,95],"migration","migration helper","schema migrations safely","data","plan","execute","migrations",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":35},"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",[],[98,103,104,105,93,106,107,94,108,109,30,77],"verify","Bash","loop","codex","autonomous","resume","execution",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":35},"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",[],[117,118,119,106,120,121,122,123,124,125,33,126],"gsd:second opinion","second opinion","architecture","code","verification","openai","gpt","decisions","question","implementation",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":35},"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",[],[134,106,135,30,136,137,138,108],"gsd:milestone sprint","run","audit","interactive","auto",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":148,"publishedAt":35},"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",[145],{"categoryNo":146,"categoryName":147,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[149,150,151,152,106,153,154,103,155],"health check","gsd:health check","check","health","setup","mcp servers","MCP"]