[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74NGFD2Q6GKDA7C233756X8":3,"skill-same:01M74NGFD2Q6GKDA7C233756X8":53},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M74NGFD2Q6GKDA7C233756X8","stack-sqlserver",null,"Microsoft SQL Server database — indexing, RCSI, set-based operations, SARGable queries, transaction scopes","Snakeblack\u002Fospec-workflow","Snakeblack","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F49766621?v=4","01M74NA5A4XHJYFRMG9JHM2R4K","Michael Snake","01M74NA5ASKTH7DG1P6DKC8WTX",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSnakeblack\u002Fospec-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstack-sqlserver\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: stack-sqlserver\ndescription: \"Microsoft SQL Server database — indexing, RCSI, set-based operations, SARGable queries, transaction scopes\"\nlicense: Apache-2.0\nmetadata:\n  author: manuel-retamozo-garcia\n  version: \"1.0\"\ncapabilities: [sqlserver]\n---\n\n## Critical Rules\n\n- **Index Design**: Clustered index keys should be sequential\u002Fmonotonically increasing (e.g., identity columns, `NEWSEQUENTIALID()`) to minimize page splits. For non-clustered indexes, use the `INCLUDE` clause to cover queries instead of adding columns to the index key.\n- **Concurrency (RCSI)**: Enable Read Committed Snapshot Isolation (RCSI) on the database level to prevent readers from blocking writers and writers from blocking readers.\n- **Avoid Cursors**: Perform set-based operations rather than row-by-row operations (cursors, `WHILE` loops with index iteration) to optimize execution engine performance.\n- **SARGable Queries**: Write Search Argumentable (SARGable) queries. Do not apply functions or calculations to indexed columns in the `WHERE` or `ON` clauses.\n- **Transaction Scope**: Keep transactions as short and narrow as possible to minimize locking, page contention, and deadlocks.\n\n## Indexing & Storage Best Practices\n\n1. **Clustered Indexes**: Every table must have a clustered index. Prefer a narrow, static, sequential key. Avoid random GUIDs (`NEWID()`) as clustered keys as they cause heavy index fragmentation.\n2. **Covering Indexes**: If a query selects specific columns, create a non-clustered index where the filter criteria columns form the index keys, and other selected columns are added using the `INCLUDE` clause:\n   ```sql\n   CREATE NONCLUSTERED INDEX IX_Orders_CustomerId_Status\n   ON Orders (CustomerId, Status)\n   INCLUDE (OrderDate, TotalAmount);\n   ```\n\n## Query Design & SARGability\n\n1. **SARGable WHERE Clauses**:\n   - **Bad**: `WHERE DATEADD(day, 7, OrderDate) >= GETDATE()` (Non-SARGable, index scan)\n   - **Good**: `WHERE OrderDate >= DATEADD(day, -7, GETDATE())` (SARGable, index seek)\n2. **Set-Based Operations**: Use joins, subqueries, and window functions (`ROW_NUMBER()`, `RANK()`) to manipulate datasets at once. Avoid iterating through table rows manually.\n\n## Concurrency & RCSI\n\n1. **RCSI Enablement**: Ensure RCSI is enabled:\n   ```sql\n   ALTER DATABASE YourDatabase SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;\n   ```\n2. **Isolation Levels**: Rely on the default Read Committed isolation level (which uses row versioning under RCSI) instead of abusing dirty reads (`NOLOCK` table hints) or overly restrictive isolation levels (`SERIALIZABLE`).\n3. **Short Transactions**: Execute non-database operations (HTTP requests, file I\u002FO, slow calculations) outside of database transaction blocks.\n","## Critical Rules\n\n- **Index Design**: Clustered index keys should be sequential\u002Fmonotonically increasing (e.g., identity columns, `NEWSEQUENTIALID()`) to minimize page splits. For non-clustered indexes, use the `INCLUDE` clause to cover queries instead of adding columns to the index key.\n- **Concurrency (RCSI)**: Enable Read Committed Snapshot Isolation (RCSI) on the database level to prevent readers from blocking writers and writers from blocking readers.\n- **Avoid Cursors**: Perform set-based operations rather than row-by-row operations (cursors, `WHILE` loops with index iteration) to optimize execution engine performance.\n- **SARGable Queries**: Write Search Argumentable (SARGable) queries. Do not apply functions or calculations to indexed columns in the `WHERE` or `ON` clauses.\n- **Transaction Scope**: Keep transactions as short and narrow as possible to minimize locking, page contention, and deadlocks.\n\n## Indexing & Storage Best Practices\n\n1. **Clustered Indexes**: Every table must have a clustered index. Prefer a narrow, static, sequential key. Avoid random GUIDs (`NEWID()`) as clustered keys as they cause heavy index fragmentation.\n2. **Covering Indexes**: If a query selects specific columns, create a non-clustered index where the filter criteria columns form the index keys, and other selected columns are added using the `INCLUDE` clause:\n   ```sql\n   CREATE NONCLUSTERED INDEX IX_Orders_CustomerId_Status\n   ON Orders (CustomerId, Status)\n   INCLUDE (OrderDate, TotalAmount);\n   ```\n\n## Query Design & SARGability\n\n1. **SARGable WHERE Clauses**:\n   - **Bad**: `WHERE DATEADD(day, 7, OrderDate) >= GETDATE()` (Non-SARGable, index scan)\n   - **Good**: `WHERE OrderDate >= DATEADD(day, -7, GETDATE())` (SARGable, index seek)\n2. **Set-Based Operations**: Use joins, subqueries, and window functions (`ROW_NUMBER()`, `RANK()`) to manipulate datasets at once. Avoid iterating through table rows manually.\n\n## Concurrency & RCSI\n\n1. **RCSI Enablement**: Ensure RCSI is enabled:\n   ```sql\n   ALTER DATABASE YourDatabase SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;\n   ```\n2. **Isolation Levels**: Rely on the default Read Committed isolation level (which uses row versioning under RCSI) instead of abusing dirty reads (`NOLOCK` table hints) or overly restrictive isolation levels (`SERIALIZABLE`).\n3. **Short Transactions**: Execute non-database operations (HTTP requests, file I\u002FO, slow calculations) outside of database transaction blocks.\n",{"name":5,"license":15,"metadata":24,"description":7,"capabilities":27},{"author":25,"version":26},"manuel-retamozo-garcia","1.0",[28],"sqlserver","main","e5fa11517ba3d433260f3077a2b8fadfad290896","skills\u002Fstack-sqlserver",0,"https:\u002F\u002Fgithub.com\u002FSnakeblack\u002Fospec-workflow","https:\u002F\u002Fospec-workflow.mretamozo.com","https:\u002F\u002Fgithub.com\u002FSnakeblack","mretamozo.com","Full Stack Developer | Lifelong learner","2026-11-15 04:24:36",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add Snakeblack\u002Fospec-workflow --skill stack-sqlserver",{"tool":45,"command":46},"bunx","bunx skills add Snakeblack\u002Fospec-workflow --skill stack-sqlserver",{"tool":48,"command":49},"pnpm","pnpm dlx skills add Snakeblack\u002Fospec-workflow --skill stack-sqlserver","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSnakeblack\u002Fospec-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstack-sqlserver\u002FSKILL.md",true,[],[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M74NGTKSC65ZZZMZH9SVP86D","work-unit-commits","Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.","https:\u002F\u002Fgithub.com\u002FSnakeblack\u002Fospec-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fwork-unit-commits\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M74NGQBZ2BPFSNGREJJ2RKHG","stack-webmcp","Trigger: WebMCP, document.modelContext, web tools, AI browser agent. Web Model Context Protocol client-side tool standard.","https:\u002F\u002Fgithub.com\u002FSnakeblack\u002Fospec-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstack-webmcp\u002FSKILL.md",[],[],{"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":19},"01M74NGM8GVVSMC8T2CHGR8DFZ","stack-vite","Vite frontend build tool — configuration, plugins, asset loading","https:\u002F\u002Fgithub.com\u002FSnakeblack\u002Fospec-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstack-vite\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M74NGHF902XYK25R6AZ1XK2T","stack-starlight","Astro Starlight documentation framework — setup, sidebar navigation, frontmatter, built-in components, asides, theming, i18n, search","https:\u002F\u002Fgithub.com\u002FSnakeblack\u002Fospec-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstack-starlight\u002FSKILL.md",[],[],{"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":19},"01M74NGACCR2QG9EE5HPN51QBD","stack-springboot","Spring Boot architecture patterns — REST API design, layered services, JPA, caching, Spring Security, TDD with MockMvc and Testcontainers, and pre-release verification","https:\u002F\u002Fgithub.com\u002FSnakeblack\u002Fospec-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstack-springboot\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M74NG6180M9PZRSRSTFCMV1P","stack-react","React UI library — components, hooks, state management, patterns, performance, and component testing with React Testing Library","https:\u002F\u002Fgithub.com\u002FSnakeblack\u002Fospec-workflow\u002Fblob\u002Fmain\u002Fskills\u002Fstack-react\u002FSKILL.md",[],[]]