[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FGEVH7C4PQC251BNP8R952":3,"skill-same:01M6FGEVH7C4PQC251BNP8R952":125},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":24,"frontMatter":25,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M6FGEVH7C4PQC251BNP8R952","content-collections",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002FSKILL.md",[],[18,19,20],"content","collections","content collections","2026-11-10 10:12:30",false,"---\nname: content-collections\ndescription: Content Collections TypeScript-first build tool for Markdown\u002FMDX content. Use for blogs, docs, content sites with Vite + React, MDX components, type-safe Zod schemas, Contentlayer migration, or encountering TypeScript import errors, path alias issues, collection validation errors.\n\n  Keywords: content-collections, @content-collections\u002Fcore, @content-collections\u002Fvite,\n  @content-collections\u002Fmdx, MDX, markdown, Zod schema validation, type-safe content,\n  frontmatter, compileMDX, defineCollection, defineConfig, Vite plugin, tsconfig paths,\n  .content-collections\u002Fgenerated, MDXContent component, rehype plugins, remark plugins,\n  content schema, document transform, allPosts import, static site generation,\n  blog setup, documentation, Cloudflare Workers static assets, content validation errors,\n  module not found content-collections, path alias not working, MDX type errors,\n  transform function async, collection not updating\nlicense: MIT\n---\n\n# Content Collections\n\n**Status**: Production Ready ✅\n**Last Updated**: 2025-11-07\n**Dependencies**: None\n**Latest Versions**: @content-collections\u002Fcore@0.12.0, @content-collections\u002Fvite@0.2.7, zod@3.23.8\n\n---\n\n## What is Content Collections?\n\nContent Collections transforms local content files (Markdown\u002FMDX) into **type-safe TypeScript data** with automatic validation at build time.\n\n**Problem it solves**: Manual content parsing, lack of type safety, runtime errors from invalid frontmatter.\n\n**How it works**:\n1. Define collections in `content-collections.ts` (name, directory, Zod schema)\n2. CLI\u002Fplugin scans filesystem, parses frontmatter, validates against schema\n3. Generates TypeScript modules in `.content-collections\u002Fgenerated\u002F`\n4. Import collections: `import { allPosts } from \"content-collections\"`\n\n**Perfect for**: Blogs, documentation sites, content-heavy apps with Cloudflare Workers, Vite, Next.js.\n\n---\n\n## Quick Start (5 Minutes)\n\n### 1. Install Dependencies\n\n```bash\n# Bun (recommended)\nbun add -d @content-collections\u002Fcore @content-collections\u002Fvite zod\n\n# npm\nnpm install -D @content-collections\u002Fcore @content-collections\u002Fvite zod\n\n# pnpm\npnpm add -D @content-collections\u002Fcore @content-collections\u002Fvite zod\n```\n\n### 2. Configure TypeScript Path Alias\n\nAdd to `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"content-collections\": [\".\u002F.content-collections\u002Fgenerated\"]\n    }\n  }\n}\n```\n\n###\n\n 3. Configure Vite Plugin\n\nAdd to `vite.config.ts`:\n\n```typescript\nimport { defineConfig } from \"vite\";\nimport react from \"@vitejs\u002Fplugin-react\";\nimport contentCollections from \"@content-collections\u002Fvite\";\n\nexport default defineConfig({\n  plugins: [\n    react(),\n    contentCollections(), \u002F\u002F MUST come after react()\n  ],\n});\n```\n\n### 4. Update .gitignore\n\n```\n.content-collections\u002F\n```\n\n### 5. Create Collection Config\n\nCreate `content-collections.ts` in project root:\n\n```typescript\nimport { defineCollection, defineConfig } from \"@content-collections\u002Fcore\";\nimport { z } from \"zod\";\n\nconst posts = defineCollection({\n  name: \"posts\",\n  directory: \"content\u002Fposts\",\n  include: \"*.md\",\n  schema: z.object({\n    title: z.string(),\n    date: z.string(),\n    description: z.string(),\n    content: z.string(),\n  }),\n});\n\nexport default defineConfig({\n  collections: [posts],\n});\n```\n\n### 6. Create Content Directory\n\n```bash\nmkdir -p content\u002Fposts\n```\n\nCreate `content\u002Fposts\u002Ffirst-post.md`:\n\n```markdown\n---\ntitle: My First Post\ndate: 2025-11-07\ndescription: Introduction to Content Collections\n---\n\n# My First Post\n\nContent goes here...\n```\n\n### 7. Import and Use\n\n```typescript\nimport { allPosts } from \"content-collections\";\n\nconsole.log(allPosts); \u002F\u002F Fully typed!\n```\n\n**Result**: Type-safe content with autocomplete, validation, and HMR.\n\n---\n\n## Critical Rules\n\n### ✅ Always Do:\n\n1. **Add path alias to tsconfig.json** - Required for imports to work\n2. **Add .content-collections to .gitignore** - Generated files shouldn't be committed\n3. **Use Standard Schema validators** - Zod, Valibot, ArkType supported\n4. **Include `content` field in schema** - Required for frontmatter parsing\n5. **Await compileMDX in transforms** - MDX compilation is async\n6. **Put contentCollections() after react() in Vite** - Plugin order matters\n\n### ❌ Never Do:\n\n1. **Commit .content-collections directory** - Always generated, never committed\n2. **Use non-standard validators** - Must support StandardSchema spec\n3. **Forget to restart dev server after config changes** - Required for new collections\n4. **Use sync transforms with async operations** - Transform must be async\n5. **Double-wrap path alias** - Use `content-collections` not `.\u002Fcontent-collections`\n6. **Import from wrong package** - `@content-collections\u002Fcore` for config, `content-collections` for data\n\n---\n\n## Known Issues Prevention\n\n### Issue #1: Module not found: 'content-collections'\n\n**Error**: `Cannot find module 'content-collections' or its corresponding type declarations`\n\n**Why it happens**: Missing TypeScript path alias configuration.\n\n**Prevention**:\n\nAdd to `tsconfig.json`:\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"content-collections\": [\".\u002F.content-collections\u002Fgenerated\"]\n    }\n  }\n}\n```\n\nRestart TypeScript server in VS Code: `Cmd+Shift+P` → \"TypeScript: Restart TS Server\"\n\n**Source**: Common user error\n\n---\n\n### Issue #2: Vite Constant Restart Loop\n\n**Error**: Dev server continuously restarts, infinite loop.\n\n**Why it happens**: Vite watching `.content-collections` directory changes, which triggers regeneration.\n\n**Prevention**:\n\n1. Add to `.gitignore`:\n```\n.content-collections\u002F\n```\n\n2. Add to `vite.config.ts` (if still happening):\n```typescript\nexport default defineConfig({\n  server: {\n    watch: {\n      ignored: [\"**\u002F.content-collections\u002F**\"],\n    },\n  },\n});\n```\n\n**Source**: GitHub Issue #591 (TanStack Start)\n\n---\n\n### Issue #3: Transform Types Not Reflected\n\n**Error**: TypeScript types don't match transformed documents.\n\n**Why it happens**: TypeScript doesn't automatically infer transform function return type.\n\n**Prevention**:\n\nExplicitly type your transform return:\n\n```typescript\nconst posts = defineCollection({\n  name: \"posts\",\n  \u002F\u002F ... schema\n  transform: (post): PostWithSlug => ({ \u002F\u002F Type the return!\n    ...post,\n    slug: post._meta.path.replace(\u002F\\.md$\u002F, \"\"),\n  }),\n});\n\ntype PostWithSlug = {\n  \u002F\u002F ... schema fields\n  slug: string;\n};\n```\n\n**Source**: GitHub Issue #396\n\n---\n\n### Issues #4-8: Advanced Troubleshooting\n\nAdditional issues covered in `references\u002Fadvanced-troubleshooting.md`:\n\n| Issue | Error | Quick Fix |\n|-------|-------|-----------|\n| #4 | Collection not updating | Verify glob pattern, restart dev server |\n| #5 | MDX\u002FShiki errors | Use compatible versions (shiki ^1.0.0) |\n| #6 | MDX path aliases fail | Use relative paths in MDX imports |\n| #7 | Unclear validation errors | Add custom Zod error messages |\n| #8 | Ctrl+C doesn't stop | Use `kill -9` or separate watch command |\n\n---\n\n## Configuration Patterns\n\n| Pattern | Use Case | Template |\n|---------|----------|----------|\n| **Basic Blog** | Single collection, Markdown only | `templates\u002Fcontent-collections.ts` |\n| **Multi-Collection** | Posts + Docs, nested folders | `templates\u002Fcontent-collections-multi.ts` |\n| **Transform Functions** | Computed fields (slug, readingTime) | See `references\u002Ftransform-cookbook.md` |\n| **MDX + React** | Syntax highlighting, React components | `templates\u002Fcontent-collections-mdx.ts` |\n\nFor detailed schema patterns (dates, tags, validation), load `references\u002Fschema-patterns.md`.\n\n---\n\n## React Component Integration\n\n### Using Collections in React\n\n```tsx\nimport { allPosts } from \"content-collections\";\n\nexport function BlogList() {\n  return (\n    \u003Cul>\n      {allPosts.map((post) => (\n        \u003Cli key={post._meta.path}>\n          \u003Ch2>{post.title}\u003C\u002Fh2>\n          \u003Cp>{post.description}\u003C\u002Fp>\n          \u003Ctime>{post.date}\u003C\u002Ftime>\n        \u003C\u002Fli>\n      ))}\n    \u003C\u002Ful>\n  );\n}\n```\n\n---\n\n### Rendering MDX Content\n\n```tsx\nimport { MDXContent } from \"@content-collections\u002Fmdx\u002Freact\";\n\nexport function BlogPost({ post }: { post: { mdx: string } }) {\n  return (\n    \u003Carticle>\n      \u003CMDXContent code={post.mdx} \u002F>\n    \u003C\u002Farticle>\n  );\n}\n```\n\n---\n\n## Cloudflare Workers Deployment\n\nContent Collections is **perfect for Cloudflare Workers** (build-time only, no runtime filesystem). Use template `templates\u002Fwrangler.toml` for config.\n\n**Pattern**: `vite build` → `wrangler deploy` (Vite plugin handles content-collections automatically)\n\nFor detailed deployment guide, load `references\u002Fdeployment-guide.md`.\n\n---\n\n## Bundled Resources\n\n### Templates (9 copy-paste files)\n`content-collections.ts`, `content-collections-multi.ts`, `content-collections-mdx.ts`, `tsconfig.json`, `vite.config.ts`, `BlogList.tsx`, `BlogPost.tsx`, `blog-post.md`, `wrangler.toml`\n\n### Scripts\n`init-content-collections.sh` - One-command automated setup\n\n---\n\n## Dependencies\n\n### Required\n\n```json\n{\n  \"devDependencies\": {\n    \"@content-collections\u002Fcore\": \"^0.12.0\",\n    \"@content-collections\u002Fvite\": \"^0.2.7\",\n    \"zod\": \"^3.23.8\"\n  }\n}\n```\n\n### Optional (MDX)\n\n```json\n{\n  \"devDependencies\": {\n    \"@content-collections\u002Fmarkdown\": \"^0.1.4\",\n    \"@content-collections\u002Fmdx\": \"^0.2.2\",\n    \"shiki\": \"^1.0.0\"\n  }\n}\n```\n\n---\n\n## Official Documentation\n\n- **Official Site**: https:\u002F\u002Fwww.content-collections.dev\n- **Documentation**: https:\u002F\u002Fwww.content-collections.dev\u002Fdocs\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fsdorra\u002Fcontent-collections\n- **Vite Plugin**: https:\u002F\u002Fwww.content-collections.dev\u002Fdocs\u002Fvite\n- **MDX Integration**: https:\u002F\u002Fwww.content-collections.dev\u002Fdocs\u002Fmdx\n\n---\n\n## Package Versions (Verified 2025-11-07)\n\n| Package | Version | Status |\n|---------|---------|--------|\n| @content-collections\u002Fcore | 0.12.0 | ✅ Latest stable |\n| @content-collections\u002Fvite | 0.2.7 | ✅ Latest stable |\n| @content-collections\u002Fmdx | 0.2.2 | ✅ Latest stable |\n| @content-collections\u002Fmarkdown | 0.1.4 | ✅ Latest stable |\n| zod | 3.23.8 | ✅ Latest stable |\n\n---\n\n## Quick Troubleshooting\n\n| Problem | Solution |\n|---------|----------|\n| TypeScript can't find module | Add path alias to `tsconfig.json`, restart TS server |\n| Vite keeps restarting | Add `.content-collections\u002F` to `.gitignore` |\n| Changes not reflecting | Restart dev server, verify glob pattern |\n| MDX compilation errors | Check Shiki version compatibility |\n| Validation errors unclear | Add custom Zod error messages |\n\n---\n\n## When to Load References\n\n| Reference | Load When... |\n|-----------|--------------|\n| `schema-patterns.md` | Setting up complex schemas, date validation, optional fields |\n| `transform-cookbook.md` | Adding computed fields, async transforms, slugs |\n| `mdx-components.md` | Integrating React components in MDX, syntax highlighting |\n| `deployment-guide.md` | Deploying to Cloudflare Workers or other platforms |\n| `advanced-troubleshooting.md` | Issues #4-8 (file watching, path aliases, process hanging) |\n\n---\n\n## Complete Setup Checklist\n\n- [ ] Installed `@content-collections\u002Fcore` and `@content-collections\u002Fvite`\n- [ ] Installed `zod` for schema validation\n- [ ] Added path alias to `tsconfig.json`\n- [ ] Added `contentCollections()` to `vite.config.ts` (after react())\n- [ ] Added `.content-collections\u002F` to `.gitignore`\n- [ ] Created `content-collections.ts` in project root\n- [ ] Created content directory (e.g., `content\u002Fposts\u002F`)\n- [ ] Defined collection with Zod schema\n- [ ] Created first content file with frontmatter\n- [ ] Imported collection in React component\n- [ ] Verified types work (autocomplete)\n- [ ] Tested hot reloading (change content file)\n\n","# Content Collections\n\n**Status**: Production Ready ✅\n**Last Updated**: 2025-11-07\n**Dependencies**: None\n**Latest Versions**: @content-collections\u002Fcore@0.12.0, @content-collections\u002Fvite@0.2.7, zod@3.23.8\n\n---\n\n## What is Content Collections?\n\nContent Collections transforms local content files (Markdown\u002FMDX) into **type-safe TypeScript data** with automatic validation at build time.\n\n**Problem it solves**: Manual content parsing, lack of type safety, runtime errors from invalid frontmatter.\n\n**How it works**:\n1. Define collections in `content-collections.ts` (name, directory, Zod schema)\n2. CLI\u002Fplugin scans filesystem, parses frontmatter, validates against schema\n3. Generates TypeScript modules in `.content-collections\u002Fgenerated\u002F`\n4. Import collections: `import { allPosts } from \"content-collections\"`\n\n**Perfect for**: Blogs, documentation sites, content-heavy apps with Cloudflare Workers, Vite, Next.js.\n\n---\n\n## Quick Start (5 Minutes)\n\n### 1. Install Dependencies\n\n```bash\n# Bun (recommended)\nbun add -d @content-collections\u002Fcore @content-collections\u002Fvite zod\n\n# npm\nnpm install -D @content-collections\u002Fcore @content-collections\u002Fvite zod\n\n# pnpm\npnpm add -D @content-collections\u002Fcore @content-collections\u002Fvite zod\n```\n\n### 2. Configure TypeScript Path Alias\n\nAdd to `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"content-collections\": [\".\u002F.content-collections\u002Fgenerated\"]\n    }\n  }\n}\n```\n\n###\n\n 3. Configure Vite Plugin\n\nAdd to `vite.config.ts`:\n\n```typescript\nimport { defineConfig } from \"vite\";\nimport react from \"@vitejs\u002Fplugin-react\";\nimport contentCollections from \"@content-collections\u002Fvite\";\n\nexport default defineConfig({\n  plugins: [\n    react(),\n    contentCollections(), \u002F\u002F MUST come after react()\n  ],\n});\n```\n\n### 4. Update .gitignore\n\n```\n.content-collections\u002F\n```\n\n### 5. Create Collection Config\n\nCreate `content-collections.ts` in project root:\n\n```typescript\nimport { defineCollection, defineConfig } from \"@content-collections\u002Fcore\";\nimport { z } from \"zod\";\n\nconst posts = defineCollection({\n  name: \"posts\",\n  directory: \"content\u002Fposts\",\n  include: \"*.md\",\n  schema: z.object({\n    title: z.string(),\n    date: z.string(),\n    description: z.string(),\n    content: z.string(),\n  }),\n});\n\nexport default defineConfig({\n  collections: [posts],\n});\n```\n\n### 6. Create Content Directory\n\n```bash\nmkdir -p content\u002Fposts\n```\n\nCreate `content\u002Fposts\u002Ffirst-post.md`:\n\n```markdown\n---\ntitle: My First Post\ndate: 2025-11-07\ndescription: Introduction to Content Collections\n---\n\n# My First Post\n\nContent goes here...\n```\n\n### 7. Import and Use\n\n```typescript\nimport { allPosts } from \"content-collections\";\n\nconsole.log(allPosts); \u002F\u002F Fully typed!\n```\n\n**Result**: Type-safe content with autocomplete, validation, and HMR.\n\n---\n\n## Critical Rules\n\n### ✅ Always Do:\n\n1. **Add path alias to tsconfig.json** - Required for imports to work\n2. **Add .content-collections to .gitignore** - Generated files shouldn't be committed\n3. **Use Standard Schema validators** - Zod, Valibot, ArkType supported\n4. **Include `content` field in schema** - Required for frontmatter parsing\n5. **Await compileMDX in transforms** - MDX compilation is async\n6. **Put contentCollections() after react() in Vite** - Plugin order matters\n\n### ❌ Never Do:\n\n1. **Commit .content-collections directory** - Always generated, never committed\n2. **Use non-standard validators** - Must support StandardSchema spec\n3. **Forget to restart dev server after config changes** - Required for new collections\n4. **Use sync transforms with async operations** - Transform must be async\n5. **Double-wrap path alias** - Use `content-collections` not `.\u002Fcontent-collections`\n6. **Import from wrong package** - `@content-collections\u002Fcore` for config, `content-collections` for data\n\n---\n\n## Known Issues Prevention\n\n### Issue #1: Module not found: 'content-collections'\n\n**Error**: `Cannot find module 'content-collections' or its corresponding type declarations`\n\n**Why it happens**: Missing TypeScript path alias configuration.\n\n**Prevention**:\n\nAdd to `tsconfig.json`:\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"content-collections\": [\".\u002F.content-collections\u002Fgenerated\"]\n    }\n  }\n}\n```\n\nRestart TypeScript server in VS Code: `Cmd+Shift+P` → \"TypeScript: Restart TS Server\"\n\n**Source**: Common user error\n\n---\n\n### Issue #2: Vite Constant Restart Loop\n\n**Error**: Dev server continuously restarts, infinite loop.\n\n**Why it happens**: Vite watching `.content-collections` directory changes, which triggers regeneration.\n\n**Prevention**:\n\n1. Add to `.gitignore`:\n```\n.content-collections\u002F\n```\n\n2. Add to `vite.config.ts` (if still happening):\n```typescript\nexport default defineConfig({\n  server: {\n    watch: {\n      ignored: [\"**\u002F.content-collections\u002F**\"],\n    },\n  },\n});\n```\n\n**Source**: GitHub Issue #591 (TanStack Start)\n\n---\n\n### Issue #3: Transform Types Not Reflected\n\n**Error**: TypeScript types don't match transformed documents.\n\n**Why it happens**: TypeScript doesn't automatically infer transform function return type.\n\n**Prevention**:\n\nExplicitly type your transform return:\n\n```typescript\nconst posts = defineCollection({\n  name: \"posts\",\n  \u002F\u002F ... schema\n  transform: (post): PostWithSlug => ({ \u002F\u002F Type the return!\n    ...post,\n    slug: post._meta.path.replace(\u002F\\.md$\u002F, \"\"),\n  }),\n});\n\ntype PostWithSlug = {\n  \u002F\u002F ... schema fields\n  slug: string;\n};\n```\n\n**Source**: GitHub Issue #396\n\n---\n\n### Issues #4-8: Advanced Troubleshooting\n\nAdditional issues covered in `references\u002Fadvanced-troubleshooting.md`:\n\n| Issue | Error | Quick Fix |\n|-------|-------|-----------|\n| #4 | Collection not updating | Verify glob pattern, restart dev server |\n| #5 | MDX\u002FShiki errors | Use compatible versions (shiki ^1.0.0) |\n| #6 | MDX path aliases fail | Use relative paths in MDX imports |\n| #7 | Unclear validation errors | Add custom Zod error messages |\n| #8 | Ctrl+C doesn't stop | Use `kill -9` or separate watch command |\n\n---\n\n## Configuration Patterns\n\n| Pattern | Use Case | Template |\n|---------|----------|----------|\n| **Basic Blog** | Single collection, Markdown only | `templates\u002Fcontent-collections.ts` |\n| **Multi-Collection** | Posts + Docs, nested folders | `templates\u002Fcontent-collections-multi.ts` |\n| **Transform Functions** | Computed fields (slug, readingTime) | See `references\u002Ftransform-cookbook.md` |\n| **MDX + React** | Syntax highlighting, React components | `templates\u002Fcontent-collections-mdx.ts` |\n\nFor detailed schema patterns (dates, tags, validation), load `references\u002Fschema-patterns.md`.\n\n---\n\n## React Component Integration\n\n### Using Collections in React\n\n```tsx\nimport { allPosts } from \"content-collections\";\n\nexport function BlogList() {\n  return (\n    \u003Cul>\n      {allPosts.map((post) => (\n        \u003Cli key={post._meta.path}>\n          \u003Ch2>{post.title}\u003C\u002Fh2>\n          \u003Cp>{post.description}\u003C\u002Fp>\n          \u003Ctime>{post.date}\u003C\u002Ftime>\n        \u003C\u002Fli>\n      ))}\n    \u003C\u002Ful>\n  );\n}\n```\n\n---\n\n### Rendering MDX Content\n\n```tsx\nimport { MDXContent } from \"@content-collections\u002Fmdx\u002Freact\";\n\nexport function BlogPost({ post }: { post: { mdx: string } }) {\n  return (\n    \u003Carticle>\n      \u003CMDXContent code={post.mdx} \u002F>\n    \u003C\u002Farticle>\n  );\n}\n```\n\n---\n\n## Cloudflare Workers Deployment\n\nContent Collections is **perfect for Cloudflare Workers** (build-time only, no runtime filesystem). Use template `templates\u002Fwrangler.toml` for config.\n\n**Pattern**: `vite build` → `wrangler deploy` (Vite plugin handles content-collections automatically)\n\nFor detailed deployment guide, load `references\u002Fdeployment-guide.md`.\n\n---\n\n## Bundled Resources\n\n### Templates (9 copy-paste files)\n`content-collections.ts`, `content-collections-multi.ts`, `content-collections-mdx.ts`, `tsconfig.json`, `vite.config.ts`, `BlogList.tsx`, `BlogPost.tsx`, `blog-post.md`, `wrangler.toml`\n\n### Scripts\n`init-content-collections.sh` - One-command automated setup\n\n---\n\n## Dependencies\n\n### Required\n\n```json\n{\n  \"devDependencies\": {\n    \"@content-collections\u002Fcore\": \"^0.12.0\",\n    \"@content-collections\u002Fvite\": \"^0.2.7\",\n    \"zod\": \"^3.23.8\"\n  }\n}\n```\n\n### Optional (MDX)\n\n```json\n{\n  \"devDependencies\": {\n    \"@content-collections\u002Fmarkdown\": \"^0.1.4\",\n    \"@content-collections\u002Fmdx\": \"^0.2.2\",\n    \"shiki\": \"^1.0.0\"\n  }\n}\n```\n\n---\n\n## Official Documentation\n\n- **Official Site**: https:\u002F\u002Fwww.content-collections.dev\n- **Documentation**: https:\u002F\u002Fwww.content-collections.dev\u002Fdocs\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fsdorra\u002Fcontent-collections\n- **Vite Plugin**: https:\u002F\u002Fwww.content-collections.dev\u002Fdocs\u002Fvite\n- **MDX Integration**: https:\u002F\u002Fwww.content-collections.dev\u002Fdocs\u002Fmdx\n\n---\n\n## Package Versions (Verified 2025-11-07)\n\n| Package | Version | Status |\n|---------|---------|--------|\n| @content-collections\u002Fcore | 0.12.0 | ✅ Latest stable |\n| @content-collections\u002Fvite | 0.2.7 | ✅ Latest stable |\n| @content-collections\u002Fmdx | 0.2.2 | ✅ Latest stable |\n| @content-collections\u002Fmarkdown | 0.1.4 | ✅ Latest stable |\n| zod | 3.23.8 | ✅ Latest stable |\n\n---\n\n## Quick Troubleshooting\n\n| Problem | Solution |\n|---------|----------|\n| TypeScript can't find module | Add path alias to `tsconfig.json`, restart TS server |\n| Vite keeps restarting | Add `.content-collections\u002F` to `.gitignore` |\n| Changes not reflecting | Restart dev server, verify glob pattern |\n| MDX compilation errors | Check Shiki version compatibility |\n| Validation errors unclear | Add custom Zod error messages |\n\n---\n\n## When to Load References\n\n| Reference | Load When... |\n|-----------|--------------|\n| `schema-patterns.md` | Setting up complex schemas, date validation, optional fields |\n| `transform-cookbook.md` | Adding computed fields, async transforms, slugs |\n| `mdx-components.md` | Integrating React components in MDX, syntax highlighting |\n| `deployment-guide.md` | Deploying to Cloudflare Workers or other platforms |\n| `advanced-troubleshooting.md` | Issues #4-8 (file watching, path aliases, process hanging) |\n\n---\n\n## Complete Setup Checklist\n\n- [ ] Installed `@content-collections\u002Fcore` and `@content-collections\u002Fvite`\n- [ ] Installed `zod` for schema validation\n- [ ] Added path alias to `tsconfig.json`\n- [ ] Added `contentCollections()` to `vite.config.ts` (after react())\n- [ ] Added `.content-collections\u002F` to `.gitignore`\n- [ ] Created `content-collections.ts` in project root\n- [ ] Created content directory (e.g., `content\u002Fposts\u002F`)\n- [ ] Defined collection with Zod schema\n- [ ] Created first content file with frontmatter\n- [ ] Imported collection in React component\n- [ ] Verified types work (autocomplete)\n- [ ] Tested hot reloading (change content file)\n\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill content-collections",{"tool":41,"command":42},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill content-collections",{"tool":44,"command":45},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill content-collections","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002FSKILL.md",true,[49,55,61,65,69,73,77,83,87,91,97,101,105,109,113,117,121],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002Fexample-template.txt","ASSET","资产文件",416,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Fassets\u002Fexample-template.txt",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fadvanced-troubleshooting.md","REFERENCE","参考文档",3137,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Freferences\u002Fadvanced-troubleshooting.md",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fdeployment-guide.md",8539,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Freferences\u002Fdeployment-guide.md",{"path":66,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fmdx-components.md",11655,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Freferences\u002Fmdx-components.md",{"path":70,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fschema-patterns.md",6279,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Freferences\u002Fschema-patterns.md",{"path":74,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Ftransform-cookbook.md",9506,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Freferences\u002Ftransform-cookbook.md",{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Fexample-script.sh","SCRIPT","脚本",302,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Fscripts\u002Fexample-script.sh",{"path":84,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Finit-content-collections.sh",4032,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Fscripts\u002Finit-content-collections.sh",{"path":88,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":89,"sourceHtmlUrl":90},"templates\u002Fblog-post.md",885,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Ftemplates\u002Fblog-post.md",{"path":92,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":96},"templates\u002FBlogList.tsx","OTHER","其他",1038,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Ftemplates\u002FBlogList.tsx",{"path":98,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":99,"sourceHtmlUrl":100},"templates\u002FBlogPost.tsx",1105,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Ftemplates\u002FBlogPost.tsx",{"path":102,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":103,"sourceHtmlUrl":104},"templates\u002Fcontent-collections-mdx.ts",1226,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Ftemplates\u002Fcontent-collections-mdx.ts",{"path":106,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":107,"sourceHtmlUrl":108},"templates\u002Fcontent-collections-multi.ts",1175,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Ftemplates\u002Fcontent-collections-multi.ts",{"path":110,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":111,"sourceHtmlUrl":112},"templates\u002Fcontent-collections.ts",520,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Ftemplates\u002Fcontent-collections.ts",{"path":114,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":115,"sourceHtmlUrl":116},"templates\u002Ftsconfig.json",745,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Ftemplates\u002Ftsconfig.json",{"path":118,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":119,"sourceHtmlUrl":120},"templates\u002Fvite.config.ts",288,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Ftemplates\u002Fvite.config.ts",{"path":122,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":123,"sourceHtmlUrl":124},"templates\u002Fwrangler.toml",395,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fcontent-collections\u002Ftemplates\u002Fwrangler.toml",[126,135,144,153,159,165],{"skillNo":127,"name":128,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":21},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[132,133,134],"model","model hierarchy","model hierarchy skill",{"skillNo":136,"name":137,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":21},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[141,142,143],"MCP","zoom","zoom mcp",{"skillNo":145,"name":146,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":21},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[150,151,152,142],"sdk","zoom apps sdk","apps",{"skillNo":154,"name":155,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":21},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[155],{"skillNo":160,"name":161,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":21},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[161],{"skillNo":166,"name":167,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":21},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[167]]