/website-builder:content-collectionsfrom website-builder
Complete content collections setup and management for Astro projects, including type-safe schemas, query patterns, frontmatter validation, and content organization.
Claude never picks this skill on its own
Claude Code cannot parse its frontmatter, so it ignores every field there: the description on this page is for you to read, but Claude never sees it. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /website-builder:content-collections still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Complete content collections setup and management for Astro projects, including type-safe schemas, query patterns, frontmatter validation, and content organization.
This skill provides comprehensive support for Astro content collections:
Run the setup script to initialize content collections in an Astro project:
bash scripts/setup-content-collections.sh [project-path]
This script:
src/content/config.ts if not existsUse schema templates to define type-safe collection schemas:
TypeScript Schema (Recommended):
# Read template for reference
Read: templates/schemas/blog-collection-schema.ts
Read: templates/schemas/docs-collection-schema.ts
Python Schema (for build scripts):
# For Python-based content generation
Read: templates/python/collection-schema.py
Generate TypeScript types from your collection schemas:
bash scripts/generate-types.sh [project-path]
This creates:
src/content/config.ts exports.astro/types.d.tsUse query builder patterns for type-safe content retrieval:
TypeScript Queries:
Read: templates/queries/basic-queries.ts
Read: templates/queries/advanced-queries.ts
Read: templates/queries/filtered-queries.ts
Python Queries (for build scripts):
Read: templates/python/query-patterns.py
Validate content frontmatter against schemas:
bash scripts/validate-frontmatter.sh [collection-name] [content-path]
This script:
Generate optimized query patterns:
bash scripts/query-builder.sh [collection-name] [query-type]
Query types:
all - Get all entriesfiltered - Filter by frontmatter fieldssorted - Sort by date/title/custom fieldpaginated - Paginate resultsrelated - Find related contentRun comprehensive collection tests:
bash scripts/test-collections.sh [project-path]
Tests include:
All scripts located in scripts/:
templates/typescript/)templates/python/)templates/schemas/)templates/queries/)templates/validation/)See comprehensive examples in examples/:
import { defineCollection, z } from 'astro:content';
const blogCollection = defineCollection({
schema: z.object({
title: z.string()
description: z.string()
pubDate: z.date()
updatedDate: z.date().optional()
heroImage: z.string().optional()
tags: z.array(z.string()).default([])
author: z.string()
draft: z.boolean().default(false)
})
});
export const collections = { blog: blogCollection };
import { getCollection, getEntry } from 'astro:content';
// Get all published blog posts
const posts = await getCollection('blog', ({ data }) => {
return data.draft !== true;
});
// Get single post by slug
const post = await getEntry('blog', 'my-post-slug');
// Sort by date descending
const sortedPosts = posts.sort((a, b) =>
b.data.pubDate.valueOf() - a.data.pubDate.valueOf()
);
import { z } from 'zod';
const blogSchema = z.object({
title: z.string().min(1, "Title required")
description: z.string().max(160, "Description too long")
pubDate: z.date()
});
// Validate frontmatter
const result = blogSchema.safeParse(frontmatter);
if (!result.success) {
console.error(result.error.format());
}
Schema Design:
Query Optimization:
Frontmatter Validation:
Content Organization:
Common issues and solutions documented in examples/error-handling.md:
mdx-integration - MDX component usage in contentimage-optimization - Image handling in contentseo-optimization - SEO for content collectionsstatic-generation - Static site generation patternsSkill Version: 1.0.0 Last Updated: 2025-10-28 Plugin: website-builder
examples/blog-with-tags-example.md (opens in a new tab)examples/documentation-site-example.md (opens in a new tab)examples/portfolio-projects-example.md (opens in a new tab)scripts/generate-types.sh (opens in a new tab)scripts/query-builder.sh (opens in a new tab)scripts/setup-content-collections.sh (opens in a new tab)scripts/test-collections.sh (opens in a new tab)scripts/validate-frontmatter.sh (opens in a new tab)templates/python/collection-schema.py (opens in a new tab)templates/python/query-patterns.py (opens in a new tab)templates/queries/advanced-queries.ts (opens in a new tab)templates/queries/basic-queries.ts (opens in a new tab)templates/queries/filtered-queries.ts (opens in a new tab)templates/schemas/author-collection-schema.ts (opens in a new tab)templates/schemas/blog-collection-schema.ts (opens in a new tab)templates/schemas/docs-collection-schema.ts (opens in a new tab)templates/schemas/product-collection-schema.ts (opens in a new tab)templates/typescript/collection-helpers.ts (opens in a new tab)templates/typescript/content-types.ts (opens in a new tab)templates/validation/frontmatter-validator.js (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Read when SKILL.md points to them; scripts run unread.
npx claudepluginhub vanman2024/ai-dev-marketplace --plugin website-builder6 skills in this plugin
/ai-content-generationAI-powered content and image generation using content-image-generation MCP with Google Imagen 3/4, Veo 2/3, Claude Sonnet, and Gemini 2.0. Use when generating marketing content, creating hero images, building blog posts, generating product descriptions, creating videos, optimizing AI prompts, estimating generation costs, or when user mentions Imagen, Veo, AI content, AI images, content generation, image generation, video generation, marketing copy, or Google AI./astro-patternsAstro PatternsComprehensive best practices, routing patterns, component architecture, and static site generation techniques for building high-performance Astro websites./astro-setupAstro Setup SkillProvides installation, prerequisite checking, and project initialization for Astro websites with AI Tech Stack 1 integration/component-integrationComponent IntegrationComprehensive patterns for integrating React components, MDX content, and Tailwind CSS into Astro websites with type safety, performance optimization, and best practices./supabase-cmsSupabase CMS Integration for AstroComplete Supabase CMS integration for Astro websites, including database schema design, RLS policies, content management workflows, and client setup.Other plugins' skills for the same job