Communitygithub.com

6mb-Systems/sg-website

Implement a blog using Sanity CMS with Next.js App Router, ISR, and optional preview support.

sg-website 是什么?

sg-website is a Claude Code agent skill that implement a blog using Sanity CMS with Next.js App Router, ISR, and optional preview support.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/6mb-Systems/sg-website/tree/HEAD/.cursor/skills/sanity-blog

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Sanity Blog

Guidance for building and maintaining a Sanity-powered blog integrated with Next.js.

When to Use

  • Implementing /blog or /blog/[slug]
  • Setting up or modifying Sanity schemas
  • Fetching content from Sanity using GROQ
  • Adding revalidation or preview functionality

Instructions

  • Use Sanity as the source of truth for blog content.
  • Define a post schema with:
    • title, slug, excerpt
    • publishedAt
    • mainImage (with alt text)
    • body (portable text)
    • optional author, categories/tags
    • SEO fields (meta title, description, OG image)
  • Filter out drafts for public pages unless preview mode is active.
  • Render blog pages as static-first with revalidation.
  • Prefer time-based ISR unless precise webhook revalidation is required.
  • Never expose Sanity write tokens to the client.
  • Use read-only tokens for frontend data fetching.
  • Implement preview/visual editing only if requested.
  • Ask clarifying questions if preview, scheduling, or revalidation behavior is ambiguous.

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

相关技能