Claude-skill-registry-data managing-content
Integrates Headless CMS (Sanity, Strapi, Contentful) to manage dynamic content. Generates schemas, connects APIs, and builds type-safe frontend fetchers.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry-data
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry-data "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/managing-content" ~/.claude/skills/majiayu000-claude-skill-registry-data-managing-content && rm -rf "$T"
manifest:
data/managing-content/SKILL.mdsource content
Content Manager (CMS)
When to use this skill
- When the user needs a "Blog", "Portfolio", "E-commerce Product List", or "Team Page".
- When the user asks to "connect Sanity/Strapi".
- When content needs to be editable by non-developers.
Workflow
- Selection: Choose the CMS logic.
- Sanity.io: (Cloud) Real-time, multi-user, hosted. Best for teams/rich-text heavy sites.
- Keystatic: (Local) Git-based. Free, simple, no-hosting. Best for solo devs.
- Custom Firebase: (DIY) Build your own Admin Panel on Firestore. Best if you want 100% UI control and already use Firebase Auth.
- Modeling: Define the content structure.
- Keystatic:
.keystatic.config.ts - Sanity:
.sanity/schemaTypes - Firebase: Define TypeScript Interfaces models (e.g.,
).interface Post { ... }
- Keystatic:
- Integration:
- Firebase: Use
.getDocs(collection(db, "posts"))
- Firebase: Use
Instructions
1. The Local Route (Keystatic)
Perfect for "Hardcoded but Editable".
- Setup: Install
and@keystatic/core
.@keystatic/next - Config: Create
.keystatic.config.tsexport default config({ storage: { kind: 'local' }, collections: { posts: collection({ label: 'Posts', slugField: 'title', schema: { title: fields.slug({ name: { label: 'Title' } }), content: fields.document({ label: 'Content' }), }, path: 'content/posts/*', }), }, });
2. The Cloud Route (Sanity)
Always separate schemas into small files in
sanity/schemaTypes/.
3. The DIY Route (Firebase)
Use the
managing-databases skill to build the Admin Dashboard.
- Auth: Restrict
to your/admin
.uid - Storage: Use Firebase Storage for image uploads.
- Rich Text: You must install a library like Tiptap or Quill manually.
// post.ts export default { name: 'post', type: 'document', fields: [ { name: 'title', type: 'string' }, { name: 'image', type: 'image' } ] }
2. The Fetching Layer
Create a
lib/sanity.ts or services/cms.ts.
- Type Safety: Use tools like
to ensure TypeScript knows your schema.sanity-typegen - Caching: Use
for ISR.fetch(url, { next: { revalidate: 60 } })
3. Rich Text Rendering
Never dump raw HTML. Use
PortableText (Sanity) or ReactMarkdown to render safe, styled content.
Self-Correction Checklist
- "Did I add the API keys to
?" -> Never hardcode tokens..env - "Is the dataset public or private?" -> specific read settings.