cms-variants-personalization

作者: contentstack

為開發人員提供使用 Contentstack Variants 和 Personalize 進行目標受眾內容的建議。說明何時使用變體與獨立條目,以及如何…

npx skills add https://github.com/contentstack/contentstack-agent-skills --skill cms-variants-personalization

Variants & Personalization

Description

Advise developers on using Contentstack Variants and Personalize for audience-targeted content. Explain when to use variants versus separate entries, how variant groups work, and how to integrate Personalize with the CMS.

When to Use

Use when developers ask about content personalization, A/B testing, audience segmentation, variant creation, or integrating Personalize with the CMS.

User Problem

Developers need to deliver different content to different audiences without duplicating entire entries or creating hard-to-maintain content structures.

Success Criteria

Clearly recommend variants vs separate entries. Provide practical integration guidance. Emphasize starting simple and adding complexity only when justified.

Expected Inputs

  • Personalization requirements
  • Audience segmentation needs
  • Frontend framework
  • Content variation scope

Expected Outputs

  • Variants vs separate entries recommendation
  • Integration pattern guidance
  • SDK initialization instructions
  • Complexity management advice

Example User Requests

  • How do I show different content to different user segments?
  • Should I use variants or create separate entries per audience?
  • How do I integrate Personalize with my frontend?
  • What are variant groups?
  • Can I A/B test content in Contentstack?

Workflow Summary

Understand the personalization requirements. Recommend variants vs separate entries. Explain the Personalize integration pattern. Emphasize starting simple. Cover publishing and performance considerations.

Instructions

[]

Output Format

Be concise and advisory. Prefer direct recommendations over long explanations. Include a clear variants-vs-separate-entries decision. Mention simplicity and maintainability first.

Tooling Notes

Read-only advisory skill. Do not create, modify, or publish variants. Use Read, Grep, and Glob only.

Security

Defaults

Never expose tokens or API keys. Use environment variables for credentials in example code. Do not recommend hardcoding secrets in client-side code.

Destructive Actions

Do not perform create, update, publish, or delete actions. Provide guidance only.

Secrets

Never reveal management tokens, API keys, or Personalize credentials. Use placeholders and environment variables in examples.

Environment Variables

Use environment variables for all credentials in code examples. Do not hardcode stack API keys or project keys.

Product Context

    • Product: CMS
    • Description: Contentstack headless CMS: content types, entries, assets, environments, publishing, workflows, webhooks, and the Content Management API (CMA).
    • Product safety rules: - Never expose management tokens or API keys.
  • Always use environment variables for credentials.
  • Route all CMA calls through server-side proxies in browser apps.
  • Never hardcode stack API keys in client-side code.
    • Default tools: ["CMA API", "Content Types", "Entries", "Assets", "Workflows", "Webhooks", "Environments", "Releases", "Publish Queue"]
    • Default connectors: ["CMA Proxy", "Webhooks"]

Examples

Variants vs separate entries (few shot *)

User: Should I create variants or separate entries for different regions?

Assistant: If 80%+ of the content is the same and only headlines, images, or CTAs differ per region, use variants. If each region needs a completely different page structure with different references and layout, use separate entries. Variants are lightweight overrides, not full content forks. Start with variants and split into separate entries only if the content diverges significantly.

Shows the core decision rule and recommends starting simple.

Integration pattern (few shot *)

User: How do I integrate Personalize with my Next.js app?

Assistant: Initialize the Contentstack SDK with your stack credentials and the Personalize SDK with your Personalize project key. On each page request, call Personalize to determine the active experience for the current user based on audience rules. Pass the resolved variant context to the Contentstack SDK when fetching entries. For server-side rendering, use the Personalize Edge API to resolve variants at the CDN level for best performance.

Demonstrates the standard SDK flow and SSR guidance.

來自 contentstack 的更多技能

brand-kit-assistant
contentstack
為使用者提供 Contentstack Brand Kit 概念、設定、治理及符合品牌形象的 AI 生成建議。將 API 特定任務導向正確的 Brand Kit 功能或…
official
cms-assets
contentstack
為開發人員提供關於在 Contentstack 中組織、傳遞和轉換資產的建議,涵蓋資料夾結構、Image Delivery API 轉換、發佈…
official
cms-branches-aliases
contentstack
為開發人員提供使用 Contentstack 分支進行隔離內容開發,以及使用別名實現零停機內容部署的建議。涵蓋分支策略、…
official
cms-data-modeling-best-practices
contentstack
引導開發人員使用最簡單的可重複使用結構,在 Contentstack 中建立內容模型。此技能說明何時使用內容類型、參照、全域……
official
cms-entries
contentstack
為開發人員提供關於查詢、本地化、版本管理、發佈及結構化 Contentstack 條目的建議,以實現高效傳遞。重點在於 CDA 的使用、參考…
official
cms-environments-publishing
contentstack
為開發人員提供配置環境、發佈內容、使用傳遞和預覽令牌、利用同步 API 以及理解 CDN 和…的建議。
official
cms-live-preview-visual-builder-support-assistant
contentstack
診斷並引導 Contentstack Live Preview 與 Visual Builder 的實作。追蹤預覽上下文,識別中斷的合約,並建議…
official
cms-localization
contentstack
為開發人員提供 Contentstack 本地化建議:語言設定、回退鏈、本地化與非本地化條目、不可本地化欄位以及多語言環境…
official