content-collections

Transform markdown, JSON, and YAML files into type-safe data collections.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/jherr/jdh-swar-test-saas-1 --skill content-collections-jherr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: content-collections
Source: https://github.com/jherr/jdh-swar-test-saas-1/tree/main/.claude/skills/content-collections
Command: npx skills add https://github.com/jherr/jdh-swar-test-saas-1 --skill content-collections-jherr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines content management by transforming markdown and other content files into type-safe data collections, simplifying the development of content-driven websites and applications.

Core Features & Use Cases

  • Type-Safe Content: Ensures data integrity and provides autocompletion for content fields using TypeScript and Zod.
  • Flexible Data Sources: Supports markdown, JSON, and YAML files.
  • Integration: Seamlessly integrates with build tools like Vite and frameworks like TanStack Start.
  • Use Case: Building a blog where each post is a markdown file with frontmatter. This Skill ensures you can reliably access post titles, dates, and authors with full TypeScript support.

Quick Start

Use the content-collections skill to define a new collection for blog posts from the 'content/posts' directory.

Frequently Asked Questions about content-collections

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get type-safe content management for markdown files in TypeScript?

Type-safe content management for markdown is achieved by defining Zod schemas that validate frontmatter and transform files into structured data collections with full TypeScript support. This provides autocompletion and ensures data integrity for content-driven applications.

How do I build a Vite blog with type-safe markdown content collections?

Building a Vite blog with type-safe markdown collections involves defining a collection for your post directory and integrating the processor at build time. This transforms your markdown, JSON, or YAML files into structured data with TypeScript autocompletion.

Can I use JSON and YAML files as data sources alongside markdown?

Yes, JSON and YAML files can be used alongside markdown as flexible data sources. They are transformed into structured data collections using Zod for schema validation, ensuring consistent type safety across all your content formats.

What is the best way to validate frontmatter in markdown files?

The best way to validate markdown frontmatter is by leveraging Zod schemas to enforce data integrity. This approach validates your content fields during the build-time processing step, ensuring you can reliably access titles and dates with TypeScript support.

Does this type-safe content management approach work with TanStack Start?

Yes, this type-safe content management approach works with TanStack Start. It seamlessly integrates with build tools like Vite and frameworks like TanStack Start to process markdown and other content files into structured data collections at build time.