agentsclimarketplace

Astro content

Skill fusengine/agents/plugins/astro-expert/skills/astro-content

Redefining development through cognitive automation and collaborative agent systems.

Install
npx -y skills add fusengine/agents --skill astro-content

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 22 stars22 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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.

SKILL.md

3.4 KB, as published. Nobody here has run it

Astro Content Layer Expert

Type-safe content management with loaders, Zod schemas, and the unified Content Layer API.

Agent Workflow (MANDATORY)

Before ANY implementation, use TeamCreate to spawn 3 agents:

  1. fuse-ai-pilot:explore-codebase - Check existing collections, loaders, and content structure
  2. fuse-ai-pilot:research-expert - Verify latest Content Layer docs via Context7/Exa
  3. mcp__context7__query-docs - Get loader and schema examples

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

When to Use

  • Managing blog posts, docs, or product descriptions in Markdown/MDX
  • Fetching content from a CMS, API, or database with type safety
  • Needing TypeScript autocomplete for frontmatter fields
  • Migrating from Astro 4 legacy content collections

Why Content Layer API

FeatureBenefit
src/content.config.tsSingle config file at project root
Built-in loadersglob() and file() for local files
Custom loadersFetch from any external source
Zod 4 schemasFull TypeScript type safety
astro syncGenerates types from collections

Core Concepts

Config File Location

The config file moved from src/content/config.ts to src/content.config.ts in Astro 5+.

Collection Types

LoaderUse Case
glob()Multiple files in a directory (MD, MDX, JSON, YAML)
file()Single JSON/YAML file with multiple entries
CustomRemote API, database, or any async data source

Key APIs

APIDescription
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

Reference Guide

NeedReference
Overview & conceptsoverview.md
Config file setupconfig.md
Glob, file, custom loadersloaders.md
getCollection / getEntryquerying.md
render() + headingsrendering.md
MDX + Remark/Rehypemdx.md
Blog collection exampletemplates/blog-collection.md
Custom remote loadertemplates/custom-loader.md

Best Practices

  1. Always define schemas — Never skip Zod validation
  2. Run astro sync — After changing content.config.ts
  3. Use glob() for local files — Supports MD, MDX, JSON, YAML, TOML
  4. Custom loaders for remote data — CMS, REST API, GraphQL
  5. render() for MDX — Returns Content component + headings array

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.