[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6J6TXVBKXATBAHJZF6GQBXR":3,"skill-same:01M6J6TXVBKXATBAHJZF6GQBXR":112},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":30,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":6,"ownerHtmlUrl":60,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":61,"install":62,"resources":75},"01M6J6TXVBKXATBAHJZF6GQBXR","database-design",null,"Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.","caobingsheng\u002Fskills","caobingsheng","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F18641728?v=4","01M6J6H1N0RR38WEA1KVM9V4GB","01M6J6H1SB287CPJQARKE9FXS0",1,"MIT","https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002FSKILL.md",[17,22,25],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"database","database design","design","databases","principles","indexing strategy","indexing","decision-making","selection","community","design principles","schema design","schema","strategy","orm","decision","serverless","safe","2026-11-10 10:12:30",false,"---\nname: database-design\ndescription: \"Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.\"\nrisk: safe\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Database Design\n\n> **Learn to THINK, not copy SQL patterns.**\n\n## ? Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `database-selection.md` | PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |\n| `orm-selection.md` | Drizzle vs Prisma vs Kysely | Choosing ORM |\n| `schema-design.md` | Normalization, PKs, relationships | Designing schema |\n| `indexing.md` | Index types, composite indexes | Performance tuning |\n| `optimization.md` | N+1, EXPLAIN ANALYZE | Query optimization |\n| `migrations.md` | Safe migrations, serverless DBs | Schema changes |\n\n---\n\n## ⚠️ Core Principle\n\n- ASK user for database preferences when unclear\n- Choose database\u002FORM based on CONTEXT\n- Don't default to PostgreSQL for everything\n\n---\n\n## Decision Checklist\n\nBefore designing schema:\n\n- [ ] Asked user about database preference?\n- [ ] Chosen database for THIS context?\n- [ ] Considered deployment environment?\n- [ ] Planned index strategy?\n- [ ] Defined relationship types?\n\n---\n\n## Anti-Patterns\n\n❌ Default to PostgreSQL for simple apps (SQLite may suffice)\n❌ Skip indexing\n❌ Use SELECT * in production\n❌ Store JSON when structured data is better\n❌ Ignore N+1 queries\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n","# Database Design\n\n> **Learn to THINK, not copy SQL patterns.**\n\n## ? Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `database-selection.md` | PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |\n| `orm-selection.md` | Drizzle vs Prisma vs Kysely | Choosing ORM |\n| `schema-design.md` | Normalization, PKs, relationships | Designing schema |\n| `indexing.md` | Index types, composite indexes | Performance tuning |\n| `optimization.md` | N+1, EXPLAIN ANALYZE | Query optimization |\n| `migrations.md` | Safe migrations, serverless DBs | Schema changes |\n\n---\n\n## ⚠️ Core Principle\n\n- ASK user for database preferences when unclear\n- Choose database\u002FORM based on CONTEXT\n- Don't default to PostgreSQL for everything\n\n---\n\n## Decision Checklist\n\nBefore designing schema:\n\n- [ ] Asked user about database preference?\n- [ ] Chosen database for THIS context?\n- [ ] Considered deployment environment?\n- [ ] Planned index strategy?\n- [ ] Defined relationship types?\n\n---\n\n## Anti-Patterns\n\n❌ Default to PostgreSQL for simple apps (SQLite may suffice)\n❌ Skip indexing\n❌ Use SELECT * in production\n❌ Store JSON when structured data is better\n❌ Ignore N+1 queries\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n",{"name":5,"risk":48,"source":40,"date_added":54,"description":7},"2026-02-27","main","309495d95536f4a5e4db1a251f246589229e13e8","design\u002Fdatabase-design",0,"https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills","https:\u002F\u002Fgithub.com\u002Fcaobingsheng","2026-04-11 12:21:07",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add caobingsheng\u002Fskills --skill database-design",{"tool":68,"command":69},"bunx","bunx skills add caobingsheng\u002Fskills --skill database-design",{"tool":71,"command":72},"pnpm","pnpm dlx skills add caobingsheng\u002Fskills --skill database-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002FSKILL.md",true,[76,82,86,90,94,98,102,106],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},".openskills.json","REFERENCE","参考文档",267,"https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002F.openskills.json",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"database-selection.md",1137,"https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002Fdatabase-selection.md",{"path":87,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":88,"sourceHtmlUrl":89},"indexing.md",892,"https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002Findexing.md",{"path":91,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":92,"sourceHtmlUrl":93},"migrations.md",1107,"https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002Fmigrations.md",{"path":95,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":96,"sourceHtmlUrl":97},"optimization.md",902,"https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002Foptimization.md",{"path":99,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":100,"sourceHtmlUrl":101},"orm-selection.md",771,"https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002Form-selection.md",{"path":103,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":104,"sourceHtmlUrl":105},"schema-design.md",1470,"https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002Fschema-design.md",{"path":107,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":110,"sourceHtmlUrl":111},"scripts\u002Fschema_validator.py","SCRIPT","脚本",5375,"https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Fdesign\u002Fdatabase-design\u002Fscripts\u002Fschema_validator.py",[113,131,147,160,171,201],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":122,"publishedAt":49},"01M6J72F9FX5W05JHBQQW9EHS5","tdd-workflows-tdd-refactor","Use when working with tdd workflows tdd refactor","https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Ftdd\u002Ftdd-workflows-tdd-refactor\u002FSKILL.md",[119],{"categoryNo":120,"categoryName":121,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000007","代码审查",[123,124,125,126,127,128,40,129,130],"tdd","workflows","refactor","tdd workflows","tdd workflows tdd refactor","use","with","unknown",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":49},"01M6J72BQ4NV5HEX94RQJ8B4J2","tdd-workflows-tdd-red","Generate failing tests for the TDD red phase to define expected behavior and edge cases.","https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Ftdd\u002Ftdd-workflows-tdd-red\u002FSKILL.md",[],[138,123,124,139,126,140,141,142,40,143,144,145,146,130],"red","tdd workflows tdd red","edge","generate","behavior","define","tests","for","expected",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":49},"01M6J727C8Q52EG3RTQWMC2X61","tdd-workflows-tdd-green","Implement the minimal code needed to make failing tests pass in the TDD green phase.","https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Ftdd\u002Ftdd-workflows-tdd-green\u002FSKILL.md",[],[154,126,155,124,123,156,40,157,158,144,159,130],"green","tdd workflows tdd green","implement","minimal","code","make",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":167,"publishedAt":49},"01M6J723JYFES8D9PHGY81QBHZ","tdd-workflows-tdd-cycle","Use when working with tdd workflows tdd cycle","https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Ftdd\u002Ftdd-workflows-tdd-cycle\u002FSKILL.md",[166],{"categoryNo":120,"categoryName":121,"taxonomyType":20,"taxonomyTypeDesc":21},[123,124,168,169,170,126,40,129,128,130],"cycle","tdd cycle","tdd workflows tdd cycle",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":186,"publishedAt":49},"01M6J71ZC3W0FE9CKQGYRCSRCA","tdd-workflow","Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.","https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Ftdd\u002Ftdd-workflow\u002FSKILL.md",[177,180,183],{"categoryNo":178,"categoryName":179,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":181,"categoryName":182,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":184,"categoryName":185,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000030","开发工程师",[187,188,123,189,190,128,191,192,129,193,194,144,195,196,197,198,158,199,200],"tdd workflow","workflow","writing","test","features","bugs","unit","driven","coverage","refactoring","e2e","integration","development","e2e tests",{"skillNo":202,"name":203,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":205,"categories":206,"keywords":209,"publishedAt":49},"01M6J71VTWV5GP7AQ08G4CDWFG","tdd-orchestrator","Master TDD orchestrator specializing in red-green-refactor discipline, multi-agent workflow coordination, and comprehensive test-driven development practices.","https:\u002F\u002Fgithub.com\u002Fcaobingsheng\u002Fskills\u002Fblob\u002Fmain\u002Ftdd\u002Ftdd-orchestrator\u002FSKILL.md",[207,208],{"categoryNo":178,"categoryName":179,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":181,"categoryName":182,"taxonomyType":20,"taxonomyTypeDesc":21},[123,210,211,212,130,213,138,194,154,214,40,215,216,217,218,125,199,190,188],"orchestrator","tdd orchestrator","master","multi","agent workflow","red-green-refactor","discipline","multi-agent","coordination"]