plugins/astro-expert/skills/astro-content/SKILL.md
Expert Astro Content Layer API — content.config.ts, glob/file loaders, custom loaders, getCollection, getEntry, render(), Zod schemas, MDX, Remark/Rehype plugins. Use when managing structured content, blog posts, or any typed data collections.
npx skillsauth add fusengine/agents astro-contentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Type-safe content management with loaders, Zod schemas, and the unified Content Layer API.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
| Feature | Benefit |
|---------|---------|
| src/content.config.ts | Single config file at project root |
| Built-in loaders | glob() and file() for local files |
| Custom loaders | Fetch from any external source |
| Zod 4 schemas | Full TypeScript type safety |
| astro sync | Generates types from collections |
The config file moved from src/content/config.ts to src/content.config.ts in Astro 5+.
| Loader | Use Case |
|--------|----------|
| glob() | Multiple files in a directory (MD, MDX, JSON, YAML) |
| file() | Single JSON/YAML file with multiple entries |
| Custom | Remote API, database, or any async data source |
| API | Description |
|-----|-------------|
| getCollection(name) | Fetch all entries in a collection |
| getEntry(name, id) | Fetch a single entry by ID |
| render(entry) | Render a content entry to HTML + headings |
| defineCollection() | Define a collection with loader and schema |
| Need | Reference | |------|-----------| | Overview & concepts | overview.md | | Config file setup | config.md | | Glob, file, custom loaders | loaders.md | | getCollection / getEntry | querying.md | | render() + headings | rendering.md | | MDX + Remark/Rehype | mdx.md | | Blog collection example | templates/blog-collection.md | | Custom remote loader | templates/custom-loader.md |
astro sync — After changing content.config.tsglob() for local files — Supports MD, MDX, JSON, YAML, TOMLrender() for MDX — Returns Content component + headings arraydevelopment
Use when optimizing entity-based / semantic SEO 2026. Covers entity maps, Google Knowledge Graph resolution, salience scoring, passage-level ranking, about/sameAs/knowsAbout schema, Cloud Natural Language API validation.
development
Use when running SEO, GEO, schema, Core Web Vitals, sitemap, hreflang, E-E-A-T, AI Overviews, technical SEO, or structured data tasks. Covers full-site audits, single-page analysis, schema markup, content quality, AI search optimization, local SEO, sitemap/robots, internal linking, semantic clustering, and search experience.
development
Use when optimizing search experience (SXO). Covers intent matching, user personas, user stories, page-type analysis, dwell time, scroll depth, pogo-sticking prevention.
development
Use when optimizing local SEO. Covers Google Business Profile, NAP consistency, citations, reviews acquisition, Local Pack ranking, location pages, LocalBusiness schema.