[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71B2FFVWNPA2YWRTYGN1JX8":3,"skill-same:01M71B2FFVWNPA2YWRTYGN1JX8":126},{"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":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":14,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M71B2FFVWNPA2YWRTYGN1JX8","tanstack-start-best-practices",null,"TanStack Start best practices for full-stack React applications. Server functions, middleware, SSR, authentication, and deployment patterns. Activate when building full-stack apps with TanStack Start.","escwxyz\u002Fskills-re","escwxyz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F124119483?v=4","01M71B1P3M16B4SZRCEAA6JD69","Jie Wang","01M71B1P47632T1KJ3RQJF6ME2",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"tanstack start","best practices","start","tanstack","tanstack start best practices","ssr","stack","server","with","functions","react","activate","deployment patterns","when","apps","applications","middleware","authentication","deployment","for","2026-11-10 10:12:30",false,"---\nname: tanstack-start-best-practices\ndescription: TanStack Start best practices for full-stack React applications. Server functions, middleware, SSR, authentication, and deployment patterns. Activate when building full-stack apps with TanStack Start.\n---\n\n# TanStack Start Best Practices\n\nComprehensive guidelines for implementing TanStack Start patterns in full-stack React applications. These rules cover server functions, middleware, SSR, authentication, and deployment.\n\n## When to Apply\n\n- Creating server functions for data mutations\n- Setting up middleware for auth\u002Flogging\n- Configuring SSR and hydration\n- Implementing authentication flows\n- Handling errors across client\u002Fserver boundary\n- Organizing full-stack code\n- Deploying to various platforms\n\n## Rule Categories by Priority\n\n| Priority | Category | Rules | Impact |\n|----------|----------|-------|--------|\n| CRITICAL | Server Functions | 5 rules | Core data mutation patterns |\n| CRITICAL | Security | 4 rules | Prevents vulnerabilities |\n| HIGH | Middleware | 4 rules | Request\u002Fresponse handling |\n| HIGH | Authentication | 4 rules | Secure user sessions |\n| MEDIUM | API Routes | 1 rule | External endpoint patterns |\n| MEDIUM | SSR | 6 rules | Server rendering patterns |\n| MEDIUM | Error Handling | 3 rules | Graceful failure handling |\n| MEDIUM | Environment | 1 rule | Configuration management |\n| LOW | File Organization | 3 rules | Maintainable code structure |\n| LOW | Deployment | 2 rules | Production readiness |\n\n## Quick Reference\n\n### Server Functions (Prefix: `sf-`)\n\n- `sf-create-server-fn` — Use createServerFn for server-side logic\n- `sf-input-validation` — Always validate server function inputs\n- `sf-method-selection` — Choose appropriate HTTP method\n- `sf-error-handling` — Handle errors in server functions\n- `sf-response-headers` — Customize response headers when needed\n\n### Security (Prefix: `sec-`)\n\n- `sec-validate-inputs` — Validate all user inputs with schemas\n- `sec-auth-middleware` — Protect routes with auth middleware\n- `sec-sensitive-data` — Keep secrets server-side only\n- `sec-csrf-protection` — Implement CSRF protection for mutations\n\n### Middleware (Prefix: `mw-`)\n\n- `mw-request-middleware` — Use request middleware for cross-cutting concerns\n- `mw-function-middleware` — Use function middleware for server functions\n- `mw-context-flow` — Properly pass context through middleware\n- `mw-composability` — Compose middleware effectively\n\n### Authentication (Prefix: `auth-`)\n\n- `auth-session-management` — Implement secure session handling\n- `auth-route-protection` — Protect routes with beforeLoad\n- `auth-server-functions` — Verify auth in server functions\n- `auth-cookie-security` — Configure secure cookie settings\n\n### API Routes (Prefix: `api-`)\n\n- `api-routes` — Create API routes for external consumers\n\n### SSR (Prefix: `ssr-`)\n\n- `ssr-data-loading` — Load data appropriately for SSR\n- `ssr-hydration-safety` — Prevent hydration mismatches\n- `ssr-streaming` — Implement streaming SSR for faster TTFB\n- `ssr-selective` — Apply selective SSR when beneficial\n- `ssr-prerender` — Configure static prerendering and ISR\n\n### Environment (Prefix: `env-`)\n\n- `env-functions` — Use environment functions for configuration\n\n### Error Handling (Prefix: `err-`)\n\n- `err-server-errors` — Handle server function errors\n- `err-redirects` — Use redirects appropriately\n- `err-not-found` — Handle not-found scenarios\n\n### File Organization (Prefix: `file-`)\n\n- `file-separation` — Separate server and client code\n- `file-functions-file` — Use .functions.ts pattern\n- `file-shared-validation` — Share validation schemas\n\n### Deployment (Prefix: `deploy-`)\n\n- `deploy-env-config` — Configure environment variables\n- `deploy-adapters` — Choose appropriate deployment adapter\n\n## How to Use\n\nEach rule file in the `rules\u002F` directory contains:\n1. **Explanation** — Why this pattern matters\n2. **Bad Example** — Anti-pattern to avoid\n3. **Good Example** — Recommended implementation\n4. **Context** — When to apply or skip this rule\n\n## Full Reference\n\nSee individual rule files in `rules\u002F` directory for detailed guidance and code examples.\n","# TanStack Start Best Practices\n\nComprehensive guidelines for implementing TanStack Start patterns in full-stack React applications. These rules cover server functions, middleware, SSR, authentication, and deployment.\n\n## When to Apply\n\n- Creating server functions for data mutations\n- Setting up middleware for auth\u002Flogging\n- Configuring SSR and hydration\n- Implementing authentication flows\n- Handling errors across client\u002Fserver boundary\n- Organizing full-stack code\n- Deploying to various platforms\n\n## Rule Categories by Priority\n\n| Priority | Category | Rules | Impact |\n|----------|----------|-------|--------|\n| CRITICAL | Server Functions | 5 rules | Core data mutation patterns |\n| CRITICAL | Security | 4 rules | Prevents vulnerabilities |\n| HIGH | Middleware | 4 rules | Request\u002Fresponse handling |\n| HIGH | Authentication | 4 rules | Secure user sessions |\n| MEDIUM | API Routes | 1 rule | External endpoint patterns |\n| MEDIUM | SSR | 6 rules | Server rendering patterns |\n| MEDIUM | Error Handling | 3 rules | Graceful failure handling |\n| MEDIUM | Environment | 1 rule | Configuration management |\n| LOW | File Organization | 3 rules | Maintainable code structure |\n| LOW | Deployment | 2 rules | Production readiness |\n\n## Quick Reference\n\n### Server Functions (Prefix: `sf-`)\n\n- `sf-create-server-fn` — Use createServerFn for server-side logic\n- `sf-input-validation` — Always validate server function inputs\n- `sf-method-selection` — Choose appropriate HTTP method\n- `sf-error-handling` — Handle errors in server functions\n- `sf-response-headers` — Customize response headers when needed\n\n### Security (Prefix: `sec-`)\n\n- `sec-validate-inputs` — Validate all user inputs with schemas\n- `sec-auth-middleware` — Protect routes with auth middleware\n- `sec-sensitive-data` — Keep secrets server-side only\n- `sec-csrf-protection` — Implement CSRF protection for mutations\n\n### Middleware (Prefix: `mw-`)\n\n- `mw-request-middleware` — Use request middleware for cross-cutting concerns\n- `mw-function-middleware` — Use function middleware for server functions\n- `mw-context-flow` — Properly pass context through middleware\n- `mw-composability` — Compose middleware effectively\n\n### Authentication (Prefix: `auth-`)\n\n- `auth-session-management` — Implement secure session handling\n- `auth-route-protection` — Protect routes with beforeLoad\n- `auth-server-functions` — Verify auth in server functions\n- `auth-cookie-security` — Configure secure cookie settings\n\n### API Routes (Prefix: `api-`)\n\n- `api-routes` — Create API routes for external consumers\n\n### SSR (Prefix: `ssr-`)\n\n- `ssr-data-loading` — Load data appropriately for SSR\n- `ssr-hydration-safety` — Prevent hydration mismatches\n- `ssr-streaming` — Implement streaming SSR for faster TTFB\n- `ssr-selective` — Apply selective SSR when beneficial\n- `ssr-prerender` — Configure static prerendering and ISR\n\n### Environment (Prefix: `env-`)\n\n- `env-functions` — Use environment functions for configuration\n\n### Error Handling (Prefix: `err-`)\n\n- `err-server-errors` — Handle server function errors\n- `err-redirects` — Use redirects appropriately\n- `err-not-found` — Handle not-found scenarios\n\n### File Organization (Prefix: `file-`)\n\n- `file-separation` — Separate server and client code\n- `file-functions-file` — Use .functions.ts pattern\n- `file-shared-validation` — Share validation schemas\n\n### Deployment (Prefix: `deploy-`)\n\n- `deploy-env-config` — Configure environment variables\n- `deploy-adapters` — Choose appropriate deployment adapter\n\n## How to Use\n\nEach rule file in the `rules\u002F` directory contains:\n1. **Explanation** — Why this pattern matters\n2. **Bad Example** — Anti-pattern to avoid\n3. **Good Example** — Recommended implementation\n4. **Context** — When to apply or skip this rule\n\n## Full Reference\n\nSee individual rule files in `rules\u002F` directory for detailed guidance and code examples.\n",{"name":5,"description":7},"main","a9b682706866a1a8a44c4621910184c29456acff",".agents\u002Fskills\u002Ftanstack-start-best-practices","https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re","https:\u002F\u002Fskills.re","https:\u002F\u002Fgithub.com\u002Fescwxyz","https:\u002F\u002Fjiewa.ng","No Ads please","2026-09-25 02:54:36",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add escwxyz\u002Fskills-re --skill tanstack-start-best-practices",{"tool":64,"command":65},"bunx","bunx skills add escwxyz\u002Fskills-re --skill tanstack-start-best-practices",{"tool":67,"command":68},"pnpm","pnpm dlx skills add escwxyz\u002Fskills-re --skill tanstack-start-best-practices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002FSKILL.md",true,[72,78,82,86,90,94,98,102,106,110,114,118,122],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"rules\u002Fapi-routes.md","REFERENCE","参考文档",6866,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fapi-routes.md",{"path":79,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":80,"sourceHtmlUrl":81},"rules\u002Fauth-route-protection.md",4610,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fauth-route-protection.md",{"path":83,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":84,"sourceHtmlUrl":85},"rules\u002Fauth-session-management.md",5005,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fauth-session-management.md",{"path":87,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":88,"sourceHtmlUrl":89},"rules\u002Fdeploy-adapters.md",4215,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fdeploy-adapters.md",{"path":91,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":92,"sourceHtmlUrl":93},"rules\u002Fenv-functions.md",5406,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fenv-functions.md",{"path":95,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":96,"sourceHtmlUrl":97},"rules\u002Ferr-server-errors.md",4974,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Ferr-server-errors.md",{"path":99,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":100,"sourceHtmlUrl":101},"rules\u002Ffile-separation.md",4269,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Ffile-separation.md",{"path":103,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":104,"sourceHtmlUrl":105},"rules\u002Fmw-request-middleware.md",4371,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fmw-request-middleware.md",{"path":107,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":108,"sourceHtmlUrl":109},"rules\u002Fsf-create-server-fn.md",3981,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fsf-create-server-fn.md",{"path":111,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":112,"sourceHtmlUrl":113},"rules\u002Fsf-input-validation.md",4649,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fsf-input-validation.md",{"path":115,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":116,"sourceHtmlUrl":117},"rules\u002Fssr-hydration-safety.md",4927,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fssr-hydration-safety.md",{"path":119,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":120,"sourceHtmlUrl":121},"rules\u002Fssr-prerender.md",5009,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fssr-prerender.md",{"path":123,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":124,"sourceHtmlUrl":125},"rules\u002Fssr-streaming.md",5540,"https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftanstack-start-best-practices\u002Frules\u002Fssr-streaming.md",[127,144,169,186,197,211],{"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":136,"publishedAt":44},"01M71B3BPYHEEQJYA6QV653HC0","demo-skill","Demonstrates a minimal Skills.re sandbox eval fixture.","https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002Fapps\u002Fserver\u002Fsrc\u002Fskill-eval-sandbox\u002Ffixtures\u002Fdemo-skill\u002FSKILL.md",[133],{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[137,138,139,140,141,142,143],"demo skill","demo","re","sandbox","eval","minimal","fixture",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":148,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":44},"01M71B3A4941E8D6VHFE4FTDMQ","openspec-propose","Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.","MIT","https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fopenspec-propose\u002FSKILL.md",[],[152,153,154,155,156,157,158,159,32,160,161,162,37,163,164,165,166,167,43,168],"openspec","openspec propose","ready","tasks","implementation","build","cli","change","one","proposal","artifacts","use","generated","new","design","complete","get",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":148,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":44},"01M71B38FC73TG0F7BM5582Y8V","openspec-explore","Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.","https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fopenspec-explore\u002FSKILL.md",[],[152,176,177,178,179,180,181,158,159,182,37,163,183,43,184,185],"explore","openspec explore","user","think","thinking partner","partner","requirements","mode","thinking","ideas",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":148,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":44},"01M71B36MP2EPJ15XAZNAWBN3P","openspec-archive-change","Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.","https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fopenspec-archive-change\u002FSKILL.md",[],[193,152,194,159,178,195,37,163,156,196,167,158],"openspec archive change","archive","workflow","finalize",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":148,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":203,"publishedAt":44},"01M71B34X135R0FZXKKYB8K8TP","openspec-apply-change","Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.","https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fopenspec-apply-change\u002FSKILL.md",[],[204,159,152,205,206,207,158,208,178,155,37,163,156,26,209,210],"openspec apply change","openspec apply","apply","work","implement","implementing","continue",{"skillNo":212,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":148,"licenseFileUrl":6,"sourceHtmlUrl":213,"categories":214,"keywords":215,"publishedAt":44},"01M71B33BXWGK230VKH621N147","https:\u002F\u002Fgithub.com\u002Fescwxyz\u002Fskills-re\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenspec-propose\u002FSKILL.md",[],[153,152,37,156,157,158,159,32,160,155,162,163,164,165,166,167,43,168,161,154]]