From astro-layer
Use when setting up or extending Astro Content Collections for structured content like blog posts, services, or team members.
How this skill is triggered — by the user, by Claude, or both
Slash command
/astro-layer:content-collectionsrc/content/**The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Sets up or extends Astro Content Collections using the Astro 6 Content Layer API.
Sets up or extends Astro Content Collections using the Astro 6 Content Layer API.
The old API (src/content/config.ts, type: 'content', getEntryBySlug()) is fully removed in Astro 6. All collections must use the Content Layer API.
Config file location: src/content.config.ts (not inside src/content/)
Import z from astro/zod — never from astro:content (deprecated) or astro:schema (deprecated).
// src/content.config.ts
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';
const blog = defineCollection({
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: './src/data/blog' }),
schema: z.object({
title: z.string(),
description: z.string(),
pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(),
heroImage: z.string().optional(),
tags: z.array(z.string()).default([]),
}),
});
export const collections = { blog };
getCollection('name') — getEntryBySlug() is removedentry.id in params — entry.slug is removedrender(entry) imported from astro:content — entry.render() is removedz.string().email() → z.email()z.string().url() → z.url()See references/collection-schemas.md for blog, services, and team collection schemas, plus querying patterns.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub bizzet/astro-layer --plugin astro-layer