site-contentlayer-authoring
Manage Contentlayer-based Markdown content, ensuring frontmatter validity and schema consistency.
Install
mkdir -p .claude/skills/site-contentlayer-authoring && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10523" && unzip -o skill.zip -d .claude/skills/site-contentlayer-authoring && rm skill.zipInstalls to .claude/skills/site-contentlayer-authoring
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Authoring and maintenance workflow for this repo's Contentlayer content (content/*). Use when adding/editing blog posts or chapters; when frontmatter is missing/broken; or when Contentlayer build fails.Key capabilities
- →Create new blog posts in Markdown
- →Update existing chapter content
- →Correct missing frontmatter fields
- →Ensure frontmatter types are correct
- →Validate Contentlayer schema locally
- →Adjust content listing filters
How it works
The skill identifies the content type and file location, then creates or edits Markdown ensuring all required frontmatter fields are present and images use absolute paths. It validates the changes locally using development or build commands.
Inputs & outputs
When to use site-contentlayer-authoring
- →Adding new blog posts
- →Fixing schema build errors
- →Updating page frontmatter
About this skill
site-contentlayer-authoring
Este repositório usa contentlayer (via next-contentlayer) para gerar tipos a partir de Markdown em content/.
Objetivo
- Criar/atualizar conteúdo Markdown sem quebrar o schema do Contentlayer.
- Manter consistência de frontmatter e URLs computadas.
Quando usar (gatilhos)
- “Adicione um post no blog”, “crie uma nova página”, “inclua um projeto”.
- Erros de build do tipo “missing required field” / “Contentlayer build failed”.
- Ajustes em
contentlayer.config.jsou nas pastascontent/**.
Exemplos de prompt
- “Crie um novo post em
content/blogcom frontmatter correto.” - “Estou recebendo erro de frontmatter; encontre o arquivo e corrija.”
- “Adicione uma experiência e faça aparecer no currículo.”
Inputs (o que pedir ao usuário)
- Tipo de conteúdo:
Post(blog) ouChapter(capítulos). - Path/slug desejado e imagens (se houver).
- Para mudanças de schema: quais campos novos e se são
required.
Princípios e regras
Crítico (não negociar)
- Respeitar campos
required: truedefinidos emcontentlayer.config.js. - Não alterar o schema sem ajustar todos os documentos impactados.
- Manter URLs consistentes com os
computedFields(não “inventar” rotas).
Padrões recomendados
- Preferir datas ISO no frontmatter quando o tipo for
date. - Manter imagens como paths estáticos (normalmente em
public/).
Cheat sheet: frontmatter por tipo
Fonte: contentlayer.config.js.
Post (content/blog/**/*.md)
title(string)description(string)date(date)author(string)image(string)
URL computada: /${flattenedPath} (ex.: /blog/meu-post).
Chapter (content/capitulos/**/*.md)
title(string)description(string)date(date)sentence(string)order_number(number)sentence_author(string)name(string)status(enum:backlog|progress|review|done)image(string)
Opcionais:
parent(string | null; defaultnull)isParent(boolean; defaultfalse)
Workflow (faça em ordem)
- Identificar tipo e arquivo
- Confirmar em qual pasta o conteúdo vive.
- Criar/editar o Markdown
- Garantir todos os campos
requiredno frontmatter. - Se adicionar imagem, usar path absoluto do site (ex.:
/images/...) quando apropriado.
- Validar localmente
- Rodar
npm run devpara validação rápida (Contentlayer + Next em watch). - Ou rodar
npm run buildpara validação completa.
- Ajustar onde o conteúdo aparece (se necessário)
- Se o conteúdo não renderizar, localizar o
contentService/página correspondente e validar filtros (ex.:show,pin).
Saída esperada
- Patch com o Markdown corrigido/criado e, se necessário, ajustes mínimos no código de listagem.
Checklist
- Frontmatter completo e tipos corretos.
-
npm run devsobe sem erro de Contentlayer. -
npm run buildpassa.
Limitações e recomendações futuras
- Este skill não cobre migração para MDX/RSC/App Router; é focado no setup atual.
Consulte também
site-nextjs-static-export(skill do repo)level(string)
When not to use it
- →When migrating to MDX
- →When migrating to RSC
- →When migrating to App Router
Limitations
- →This skill does not cover migration to MDX
- →This skill does not cover migration to RSC
- →This skill does not cover migration to App Router
How it compares
This workflow ensures Contentlayer schema compliance and consistent URLs, unlike manual Markdown editing that might introduce build errors or inconsistent frontmatter.
Compared to similar skills
site-contentlayer-authoring side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| site-contentlayer-authoring (this skill) | 0 | 5mo | No flags | Intermediate |
| docs | 0 | 2mo | Review | Intermediate |
| fumadocs-mdx-structure | 2 | 6mo | No flags | Beginner |
| update-release-notes | 1 | 28d | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
docs
matteocervelli
Build and publish project documentation — Starlight (Astro) for apps, markdown for libraries/services, with IT+EN i18n and VPS deploy. Use when writing user guides, scaffolding a docs site, or publishing docs. Trigger on "write docs", "documentation site", "user guide", "publish docs".
fumadocs-mdx-structure
TheOrcDev
Create MDX documentation files with proper frontmatter, imports, and component integration. Apply when creating or updating Fumadocs documentation pages in content/docs/.
update-release-notes
tldraw
Update the release notes file at `apps/docs/content/releases/next.mdx` based on PRs merged to main since the previous release, or archive `next.mdx` to a versioned file when a new version is published.
publish-weekly
miantiao-me
使用 Payload REST API 将周刊写入 CMS(发布为草稿),通过 users API Key 认证。
gpt-home-seo
curtiv3
SEO optimization specifically for GPT Home (gpthome.space) — an autonomous AI homepage / living AI experiment project. Use this skill whenever Kevin asks about GPT Home SEO, discoverability, traffic, meta tags, schema, content strategy, or how to make gpthome.space rank better. Also trigger for ques
docs-writing
rust-dd
Conventions for writing and maintaining tako documentation pages under website/content/docs/. Page templates (transport / extractor / middleware / plugin / concept / tutorial / guide / reference), the frontmatter schema, meta.json sidebar wiring, RustExample-backed examples, and the audit-script con