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 arraytesting
Copy self-audit and ban-lists — filler verbs/hype adjectives, slop placeholder names, fake-precise numbers, Title Case headlines, humor in error copy ('Oops!'), em-dash crutch, one copy register per page.
development
Logged-in web apps — dashboards, auth flows, settings, onboarding, data tables, command palettes, modals, toasts. Register `product`: density and glance-speed over marketing polish, no hero/CTA-tricks, every data surface covers empty/loading/error explicitly, tables and dataviz follow preattentive-processing rules.
development
Marketing sites, landing pages, campaign pages — register `brand` (design IS the product). Structure comes from the register's POV + a macrostructure pick, never from copying an inspiration site's section flow. Hero discipline, deviated section order, asymmetric grids, and a silhouette lookalike-test gate before ship.
development
Token-strategy core — OKLCH color rules, neutral tinting, accent-commitment levels, type scale, 8pt spacing grid, touch targets, and the canonical output format of design-system.md (the file the harness gates on). This is routing step 1 of design-method/SKILL.md — read it before design-web/design-webapp/design-ios/design-android, before picking or auditing a single color/type/spacing value.