SI

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.zip

Installs 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.
202 chars✓ has a “when” trigger
Intermediate

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

You give it
Content type (Post or Chapter), desired path/slug, image paths, new schema fields and their 'required' status
You get back
A patch with corrected or newly created Markdown and minimal adjustments to listing code

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.js ou nas pastas content/**.

Exemplos de prompt

  • “Crie um novo post em content/blog com 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) ou Chapter (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: true definidos em contentlayer.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; default null)
  • isParent (boolean; default false)

Workflow (faça em ordem)

  1. Identificar tipo e arquivo
  • Confirmar em qual pasta o conteúdo vive.
  1. Criar/editar o Markdown
  • Garantir todos os campos required no frontmatter.
  • Se adicionar imagem, usar path absoluto do site (ex.: /images/...) quando apropriado.
  1. Validar localmente
  • Rodar npm run dev para validação rápida (Contentlayer + Next em watch).
  • Ou rodar npm run build para validação completa.
  1. 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 dev sobe sem erro de Contentlayer.
  • npm run build passa.

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.

SkillInstallsUpdatedSafetyDifficulty
site-contentlayer-authoring (this skill)05moNo flagsIntermediate
docs02moReviewIntermediate
fumadocs-mdx-structure26moNo flagsBeginner
update-release-notes128dReviewAdvanced

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".

00

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/.

216

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.

16

publish-weekly

miantiao-me

使用 Payload REST API 将周刊写入 CMS(发布为草稿),通过 users API Key 认证。

12

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

00

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

00

Search skills

Search the agent skills registry