[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EX9VHT38DBGJZGCC17QJ7S":3,"skill-same:01M7EX9VHT38DBGJZGCC17QJ7S":47},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7EX9VHT38DBGJZGCC17QJ7S","zod-v4",null,"Zod 4 schema patterns and API differences from Zod 3. Activate when writing or reviewing Zod schemas, validation logic, or inferred types. Zod 4 has breaking changes from Zod 3.","Phenomenon-Studio\u002Fphenomenon-configs","Phenomenon-Studio","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85674486?v=4","01M7EX2X2JF76C91JB202QMQHW","Phenomenon studio","01M7EX2X37T2C5FBHAH4B60YMX",1,"MIT","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'next' else '' }}\u002F.claude\u002Fskills\u002Fzod-v4\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: zod-v4\ndescription: Zod 4 schema patterns and API differences from Zod 3. Activate when writing or reviewing Zod schemas, validation logic, or inferred types. Zod 4 has breaking changes from Zod 3.\n---\n\n# Zod v4 Patterns\n\nThis project uses **Zod 4** (`zod@^4.x`). The API has meaningful breaking changes from Zod 3. Do not guess — use the patterns below.\n\n## Breaking Changes vs Zod 3\n\n| Feature | Zod 3 | Zod 4 |\n|---|---|---|\n| Error map | `z.ZodError` `.format()` | Use `.issues` directly or `z.prettifyError(err)` |\n| `.merge()` | Available on object | Use `.extend()` instead |\n| `z.string().email()` | Built-in | Built-in (unchanged) |\n| `z.object().partial()` | `.partial()` | `.partial()` (unchanged) |\n| `z.infer\u003C>` | `z.infer\u003Ctypeof schema>` | Same (unchanged) |\n| `z.input\u003C>` | `z.input\u003Ctypeof schema>` | Same (unchanged) |\n| Coercion | `z.coerce.string()` | Same (unchanged) |\n| JSON type | Not built-in | `z.json()` — native JSON type |\n| Template literals | Not available | `z.templateLiteral()` |\n| `z.string().check()` | Not available | Use `.check()` for custom refinements |\n\n## Core Patterns\n\n### Always export schema + inferred type together\n\n```ts\n\u002F\u002F src\u002Fservices\u002Fproducts\u002Fschemas\u002FproductSchema.ts\nimport { z } from 'zod';\n\nexport const productSchema = z.object({\n  id: z.string().uuid(),\n  name: z.string().min(1).max(200),\n  price: z.number().positive(),\n  category: z.enum(['electronics', 'clothing', 'food']),\n});\n\nexport type Product = z.infer\u003Ctypeof productSchema>;\n```\n\n### Prefer `.extend()` over `.merge()`\n\n```ts\n\u002F\u002F BAD (Zod 3 style, .merge() may behave differently)\nconst extendedSchema = baseSchema.merge(z.object({ extra: z.string() }));\n\n\u002F\u002F GOOD\nconst extendedSchema = baseSchema.extend({ extra: z.string() });\n```\n\n### Use `z.prettifyError()` for human-readable errors\n\n```ts\n\u002F\u002F BAD\nconst message = error.format(); \u002F\u002F Zod 3 API — may not exist\n\n\u002F\u002F GOOD\nimport { z } from 'zod';\nconst result = schema.safeParse(input);\nif (!result.success) {\n  console.error(z.prettifyError(result.error));\n}\n```\n\n### Use `.safeParse()` at system boundaries, `.parse()` internally\n\n```ts\n\u002F\u002F At API\u002Fform boundary — recoverable\nconst result = schema.safeParse(rawInput);\nif (!result.success) return { error: z.prettifyError(result.error) };\nconst data = result.data;\n\n\u002F\u002F Internally when data is already validated upstream — throw on invalid\nconst data = schema.parse(knownValidInput);\n```\n\n### Use `z.json()` for arbitrary JSON values\n\n```ts\n\u002F\u002F BAD (Zod 3 workaround)\nconst jsonSchema: z.ZodType = z.union([z.string(), z.number(), z.boolean(), z.null(), z.array(z.lazy(() => jsonSchema)), z.record(z.lazy(() => jsonSchema))]);\n\n\u002F\u002F GOOD (Zod 4 native)\nconst metadataSchema = z.object({\n  id: z.string(),\n  extra: z.json(), \u002F\u002F accepts any JSON-serializable value\n});\n```\n\n### Use `z.templateLiteral()` for string patterns\n\n```ts\n\u002F\u002F GOOD (Zod 4 feature)\nconst routeSchema = z.templateLiteral(['\u002Fproducts\u002F', z.string().uuid()]);\n\u002F\u002F matches: '\u002Fproducts\u002F123e4567-e89b-12d3-a456-426614174000'\n```\n\n### API response validation in service layer\n\nValidate API responses at the service boundary, not in components.\n\n```ts\n\u002F\u002F src\u002Fservices\u002Fproducts\u002Fapi.ts\nimport { z } from 'zod';\nimport { productSchema } from '.\u002Fschemas\u002FproductSchema';\nimport { http } from '@\u002Flib\u002F@http';\n\nconst productsResponseSchema = z.array(productSchema);\n\nexport const getProducts = async (): Promise\u003CProduct[]> => {\n  const raw = await http.get('products').json();\n  return productsResponseSchema.parse(raw); \u002F\u002F throws if API shape changed\n};\n```\n\n### Form schemas with `.omit()` \u002F `.pick()`\n\n```ts\nconst createProductSchema = productSchema.omit({ id: true });\nexport type CreateProductInput = z.infer\u003Ctypeof createProductSchema>;\n\nconst updateProductSchema = productSchema.pick({ name: true, price: true }).partial();\nexport type UpdateProductInput = z.infer\u003Ctypeof updateProductSchema>;\n```\n\n### Refinements with `.check()` (Zod 4)\n\n```ts\n\u002F\u002F Zod 4 — use .check() for custom validations\nconst passwordSchema = z.string()\n  .min(8)\n  .check((val, ctx) => {\n    if (!\u002F[A-Z]\u002F.test(val)) {\n      ctx.addIssue({ message: 'Must contain an uppercase letter' });\n    }\n  });\n```\n\n## Naming Conventions (project-specific)\n\n- File: `\u003Cname>Schema.ts` (e.g., `productSchema.ts`)\n- Export: `export const \u003Cname>Schema = z.object({...})`\n- Type: `export type \u003CName> = z.infer\u003Ctypeof \u003Cname>Schema>`\n- Keep schema and type in the same file — co-location is required\n","# Zod v4 Patterns\n\nThis project uses **Zod 4** (`zod@^4.x`). The API has meaningful breaking changes from Zod 3. Do not guess — use the patterns below.\n\n## Breaking Changes vs Zod 3\n\n| Feature | Zod 3 | Zod 4 |\n|---|---|---|\n| Error map | `z.ZodError` `.format()` | Use `.issues` directly or `z.prettifyError(err)` |\n| `.merge()` | Available on object | Use `.extend()` instead |\n| `z.string().email()` | Built-in | Built-in (unchanged) |\n| `z.object().partial()` | `.partial()` | `.partial()` (unchanged) |\n| `z.infer\u003C>` | `z.infer\u003Ctypeof schema>` | Same (unchanged) |\n| `z.input\u003C>` | `z.input\u003Ctypeof schema>` | Same (unchanged) |\n| Coercion | `z.coerce.string()` | Same (unchanged) |\n| JSON type | Not built-in | `z.json()` — native JSON type |\n| Template literals | Not available | `z.templateLiteral()` |\n| `z.string().check()` | Not available | Use `.check()` for custom refinements |\n\n## Core Patterns\n\n### Always export schema + inferred type together\n\n```ts\n\u002F\u002F src\u002Fservices\u002Fproducts\u002Fschemas\u002FproductSchema.ts\nimport { z } from 'zod';\n\nexport const productSchema = z.object({\n  id: z.string().uuid(),\n  name: z.string().min(1).max(200),\n  price: z.number().positive(),\n  category: z.enum(['electronics', 'clothing', 'food']),\n});\n\nexport type Product = z.infer\u003Ctypeof productSchema>;\n```\n\n### Prefer `.extend()` over `.merge()`\n\n```ts\n\u002F\u002F BAD (Zod 3 style, .merge() may behave differently)\nconst extendedSchema = baseSchema.merge(z.object({ extra: z.string() }));\n\n\u002F\u002F GOOD\nconst extendedSchema = baseSchema.extend({ extra: z.string() });\n```\n\n### Use `z.prettifyError()` for human-readable errors\n\n```ts\n\u002F\u002F BAD\nconst message = error.format(); \u002F\u002F Zod 3 API — may not exist\n\n\u002F\u002F GOOD\nimport { z } from 'zod';\nconst result = schema.safeParse(input);\nif (!result.success) {\n  console.error(z.prettifyError(result.error));\n}\n```\n\n### Use `.safeParse()` at system boundaries, `.parse()` internally\n\n```ts\n\u002F\u002F At API\u002Fform boundary — recoverable\nconst result = schema.safeParse(rawInput);\nif (!result.success) return { error: z.prettifyError(result.error) };\nconst data = result.data;\n\n\u002F\u002F Internally when data is already validated upstream — throw on invalid\nconst data = schema.parse(knownValidInput);\n```\n\n### Use `z.json()` for arbitrary JSON values\n\n```ts\n\u002F\u002F BAD (Zod 3 workaround)\nconst jsonSchema: z.ZodType = z.union([z.string(), z.number(), z.boolean(), z.null(), z.array(z.lazy(() => jsonSchema)), z.record(z.lazy(() => jsonSchema))]);\n\n\u002F\u002F GOOD (Zod 4 native)\nconst metadataSchema = z.object({\n  id: z.string(),\n  extra: z.json(), \u002F\u002F accepts any JSON-serializable value\n});\n```\n\n### Use `z.templateLiteral()` for string patterns\n\n```ts\n\u002F\u002F GOOD (Zod 4 feature)\nconst routeSchema = z.templateLiteral(['\u002Fproducts\u002F', z.string().uuid()]);\n\u002F\u002F matches: '\u002Fproducts\u002F123e4567-e89b-12d3-a456-426614174000'\n```\n\n### API response validation in service layer\n\nValidate API responses at the service boundary, not in components.\n\n```ts\n\u002F\u002F src\u002Fservices\u002Fproducts\u002Fapi.ts\nimport { z } from 'zod';\nimport { productSchema } from '.\u002Fschemas\u002FproductSchema';\nimport { http } from '@\u002Flib\u002F@http';\n\nconst productsResponseSchema = z.array(productSchema);\n\nexport const getProducts = async (): Promise\u003CProduct[]> => {\n  const raw = await http.get('products').json();\n  return productsResponseSchema.parse(raw); \u002F\u002F throws if API shape changed\n};\n```\n\n### Form schemas with `.omit()` \u002F `.pick()`\n\n```ts\nconst createProductSchema = productSchema.omit({ id: true });\nexport type CreateProductInput = z.infer\u003Ctypeof createProductSchema>;\n\nconst updateProductSchema = productSchema.pick({ name: true, price: true }).partial();\nexport type UpdateProductInput = z.infer\u003Ctypeof updateProductSchema>;\n```\n\n### Refinements with `.check()` (Zod 4)\n\n```ts\n\u002F\u002F Zod 4 — use .check() for custom validations\nconst passwordSchema = z.string()\n  .min(8)\n  .check((val, ctx) => {\n    if (!\u002F[A-Z]\u002F.test(val)) {\n      ctx.addIssue({ message: 'Must contain an uppercase letter' });\n    }\n  });\n```\n\n## Naming Conventions (project-specific)\n\n- File: `\u003Cname>Schema.ts` (e.g., `productSchema.ts`)\n- Export: `export const \u003Cname>Schema = z.object({...})`\n- Type: `export type \u003CName> = z.infer\u003Ctypeof \u003Cname>Schema>`\n- Keep schema and type in the same file — co-location is required\n",{"name":5,"description":7},"main","a5c9ac2f39c1611831e417faea2e6d635699d9b5","template\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'next' else '' }}\u002F.claude\u002Fskills\u002Fzod-v4",0,"https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio","https:\u002F\u002Fphenomenonstudio.com\u002F","Phenomenon is a digital product studio bolstering a core team of world-class developers, designers, and a flexible network of multi-specialized talent. ","2026-10-23 17:20:31",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Phenomenon-Studio\u002Fphenomenon-configs --skill zod-v4",{"tool":39,"command":40},"bunx","bunx skills add Phenomenon-Studio\u002Fphenomenon-configs --skill zod-v4",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Phenomenon-Studio\u002Fphenomenon-configs --skill zod-v4","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'next' else '' }}\u002F.claude\u002Fskills\u002Fzod-v4\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EXBNNR8YZB8PD7J8ZAB5FP","web-security","Enforce web security and avoid security vulnerabilities.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Fweb-security\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7EXBJGWKB32NY4R2V141G0S","typescript","Write clean, efficient TypeScript code that follows project conventions and advanced type patterns. Use when writing or reviewing TypeScript code, defining types, creating generics, handling errors, or working with React components, Zod schemas, and TanStack libraries.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftypescript\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7EXBESDHFPHAZKN292SDB6E","tanstack-router","TanStack Router patterns for this repo — file-based routing, auth guards, search params, data loading, TanStack Query integration, navigation, and code splitting. Use when creating routes, adding pages, implementing auth flows, working with search\u002Fpath params, or integrating loaders with TanStack Query.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftanstack-router\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7EXBAZW0KSMGVDB9DW157SD","tanstack-query","TanStack Query patterns for this repo — queryOptions\u002FmutationOptions factories, query key hierarchies, service layer integration, optimistic updates, Suspense usage, error handling, and TanStack Router data loading. Use when creating queries, mutations, API services, query keys, cache invalidation, optimistic updates, or integrating data fetching with routes.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftanstack-query\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7EXB6X2TG4HYWCYB293581T","tanstack-form","Build forms using TanStack Form with the project's useAppForm composition, composable field components, Zod validation schemas, FormFieldWrapper error tracking, and form.AppField vs form.Field patterns. Use when creating new forms, adding form fields, writing form validation, or working with TanStack Form in this project.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftanstack-form\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7EXB4EXHFSSVY64QQAE77SA","react","Build clean, modern React components that apply common best practices and avoid common pitfalls like unnecessary state management or useEffect usage.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Freact\u002FSKILL.md",[],[]]