From astro-layer
Use when adding a complete blog — Content Collection, listing page with pagination, individual post page, and RSS feed.
How this skill is triggered — by the user, by Claude, or both
Slash command
/astro-layer:add-blogsrc/**The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Adds a complete blog to an Astro 6.3 site: content collection, listing page with pagination, individual post page, and RSS feed.
Adds a complete blog to an Astro 6.3 site: content collection, listing page with pagination, individual post page, and RSS feed.
Call the sequentialthinking MCP tool to plan the build sequence:
src/content.config.ts already exists (existing file needs merging, not overwriting)render() function, entry.id not post.slug, getCollectionsrc/content.config.ts — blog collection using Content Layer APIsrc/data/blog/ — directory for markdown post files (with one example post)src/pages/blog/index.astro — listing page with paginationsrc/pages/blog/[...slug].astro — individual post pagesrc/pages/rss.xml.js — RSS feed endpointPost page — use render() function and entry.id:
---
import { getCollection, render } from 'astro:content';
import Base from '../../layouts/Base.astro';
export async function getStaticPaths() {
const posts = await getCollection('blog');
return posts.map((post) => ({
params: { slug: post.id }, // post.id, NOT post.slug
props: post,
}));
}
const post = Astro.props;
const { Content, headings } = await render(post); // render() fn, NOT post.render()
---
<Base title={post.data.title} description={post.data.description}>
<article>
<Content />
</article>
</Base>
paginate() helper on the listing pagetags field in schemaheroImage frontmatter fieldSee references/blog-patterns.md for complete implementation of all 5 files, plus pagination, RSS, and reading-time 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