astro-content
БесплатноБез исполняемых скриптовНе проверенUse when managing structured content, blog posts, or typed data collections in Astro via the Content Layer API (content.config.ts).
от Fusengine★ 36 звёзд на GitHubОб этом скилле
Also covers MDX authoring with Remark/Rehype plugins and the astro sync workflow for generating collection types. Does not cover form submission via Astro Actions (astro-actions) or SEO metadata generation from content (astro-seo) — those are handled by their own skills.
Astro Content Layer Expert
Type-safe content management with loaders, Zod schemas, and the unified Content Layer API.
Agent Workflow (MANDATORY)
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
- fuse-ai-pilot:explore-codebase - Check existing collections, loaders, and content structure
- fuse-ai-pilot:research-expert - Verify latest Content Layer docs via Context7/Exa
- 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
| 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 |
Core Concepts
Config File Location
The config file moved from src/content/config.ts to src/content.config.ts in Astro 5+.
Collection Types
| 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 |
Key APIs
| 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 |
Reference Guide
| 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 |
Best Practices
- Always define schemas — Never skip Zod validation
- Run
astro sync— After changingcontent.config.ts - Use
glob()for local files — Supports MD, MDX, JSON, YAML, TOML - Custom loaders for remote data — CMS, REST API, GraphQL
render()for MDX — ReturnsContentcomponent + headings array
Установить astro-content в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл astro-content?
Use when managing structured content, blog posts, or typed data collections in Astro via the Content Layer API (content.config.ts).
Как установить скилл astro-content?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл astro-content запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic