Logo Contentful Personalization

Contentful Personalization

Tổ chức
contentful
contentful-personalization

Implement, extend, and debug Contentful personalization. Use onboarding for new, project-wide, or unknown setups; use extend-existing only for scoped work on an explicitly working integration. Trigger keywords: personalization, optimization, ninetailed, A/B test, experiment, multivariate test, targeting, audience targeting, segments, variants, content variants, set up personalization, implement personalization, enable personalization, personalization not working, personalization broken, personalize this component, am I ready for personalization, experience API, Contentful Experiences, Experiences SDK, Studio Experiences, personalization in Next.js, @contentful/optimization, @ninetailed/experience.js, run an experiment, check this URL, debug this live page, inspect network requests, check console errors, experience.ninetailed.co

Tổng quan

Nhà phát hànhcontentful
Kho mãskills
Tên kỹ năngcontentful-personalization
Sao
41
Bản fork
3
Tệp đi kèm
29
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 29 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được contentful công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Contentful Personalization trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/contentful/skills/tree/main/skills/contentful-personalization
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/contentful/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/contentful-personalization .claude/skills/contentful-personalization
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Contentful Personalization trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Contentful Personalization ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Contentful Personalization không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

contentful-personalization

This skill is a structured workflow driven by a compiled CLI binary. You interact with it by calling the binary, reading its JSON output, following the instructions in the prompt field, and passing your response back. Do not show the raw JSON or Bash commands to the user.

How this skill works

This skill was built with skill-kit, a structured workflow engine. Each step provides a prompt containing XML-tagged sections:

  • <system> — Behavioral directives: persona, tone, or constraints. Follow as guidelines for how to behave, not as tasks to relay to the user.
  • <prompt> — Task instructions: what to do, what context to consider, what to produce.
  • <ask-user> — Ask the user a question. Contains <option> children for structured choices, or type="open" for free-form conversation.
  • <confirm> — Binary yes/no confirmation. Attributes: default, destructive.
  • <plan> — Present a plan for approval. Contains <step> children.
  • <checklist> — Create tracked work items. Contains <item> children with status.
  • <subagent> — Delegate work to an isolated sub-agent. If no-recurse is set, the subagent must not invoke the skill named in the attribute.
  • <rendered> — Pre-rendered output. Emit verbatim — no edits, no added commentary.

A step may contain one or more of these sections in sequence. Follow them in order.

The skill author composed these sections to guide your behavior. The tags and tool mappings are generated by the SDK based on the author's intent and your host's capabilities. A skill-level system directive may appear in the preamble — it applies to all steps unless a step includes its own <system> override.

The preamble (sent on the first step) contains a table mapping each tag to the specific tool available in your environment. Refer to it throughout the workflow.

How to run this skill

MCP mode (preferred)

If you have MCP tools for this skill (e.g., mcp__contentful-personalization__start and mcp__contentful-personalization__advance), use them instead of the CLI:

  1. Call the start tool (with params if the skill requires them).
  2. Read the preamble field (first call only). It maps XML tags to your available tools.
  3. Follow the prompt instructions. Produce a JSON object matching the schema.
  4. Call the advance tool with the session, step, and output.
  5. Repeat steps 3-4 until status is "done".

If you get status: "error" with retry: true, fix your output and resubmit. Do not show raw JSON, session IDs, or MCP tool calls to the user.

Skip the rest of this section — the CLI instructions below are only needed when MCP tools are not available.

CLI mode (fallback)

This SKILL.md file is inside the skill directory. Resolve the absolute path to scripts/run from this file's location (e.g., /path/to/skill/scripts/run). Use the absolute path in all Bash commands — do not cd into the skill directory.

In the examples below, <skill>/scripts/run is a placeholder for this absolute path.

Detect your host

Determine which agent host you are running in, and pass it as --host:

  • Claude Code: --host claude-code
  • Codex: --host codex
  • OpenCode: --host opencode
  • Gemini CLI: --host gemini-cli
  • Cline: --host cline
  • Roo Code: --host roo-code
  • Kilo Code: --host kilo-code
  • Cursor: --host cursor
  • Amp: --host amp
  • Unknown/other: omit the flag (defaults to generic)

Report your tools

Pass the tools you have available as a comma-separated --tools flag on the start command. The session remembers them — you don't need to pass --tools on advance.

When --host is provided, --tools is merged with the host's known tool registry. This means partial reporting is handled gracefully — the registry fills in any tools you omit. If --tools is omitted entirely, the skill infers tools from --host. If both are omitted, all interactions use generic fallbacks.

Subagent invocations

If you are a subagent (spawned by another agent, not the top-level agent the user is talking to), add --subagent to the start command. This tells the skill that your reported tools are a genuine subset — the skill will not merge them with the host registry.

Without --subagent, the skill assumes you are a top-level agent and merges your tools with the registry (since top-level agents often under-report their tools).

Parameters

This skill takes no parameters. Pass --params '{}'.

Step 1: Start with a session

bash
<skill>/scripts/run --params '{}' --host claude-code --tools <your-tools> --session new 2>/dev/null

This returns a JSON pointer with sessionId, file, and line. The line field tells you which line to read — it will be 2, not 1 (line 1 is an internal header, never read it).

Read only line line from file. It contains the step prompt, schema, and preamble.

Read the preamble first. It contains a table mapping XML tags to the tools available in your environment. Refer to it throughout the workflow.

Step 2: Follow the prompt

Read the prompt field. It contains XML-tagged sections (described in "How this skill works" above): <system> directives to follow, <prompt> instructions to act on, and interaction tags (<ask-user>, <confirm>, <plan>, <checklist>, <subagent>) to execute using the tools mapped in the preamble. If a <rendered> block appears, emit its content verbatim.

Produce a JSON object matching the schema.

Step 3: Advance

Pass your output back with the step name:

bash
<skill>/scripts/run advance --step <step-name> --output '<your-json>' --session abc123 2>/dev/null

This returns a single line number (e.g., 4). Read exactly and only that line from the session file — it contains the next prompt. Do not read any other lines.

Step 4: Repeat until done

Keep advancing until the line you read contains "type":"done". The finalOutput field contains the skill's result. Present it to the user.

Important

  • Never show raw JSON output or Bash commands to the user. The user sees your natural language responses, not the protocol.
  • If you get a validation error (the response has "error": "validation" or "type":"error"), read the message field, fix your output, and retry the same step.

Steps in this skill

  • classify: Classify the user's request into one of the categories below. Read only the user's message — do N...
  • gather-context: You were not confident enough to classify the user's request. Silently explore the project to gat...
  • pick-topic: (dynamic)

Sub-skills

This skill contains sub-skills that the workflow routes to automatically. Start the skill normally — the dispatcher will determine which sub-skill to use. Only use direct sub-skill access if the user explicitly requests a specific sub-skill by name.

Sub-skill step names are prefixed: <subskill>/<step> (e.g., doctor/diagnose).

Direct sub-skill access

bash
<skill>/scripts/run <subskill> --params '<json>' --session new
<skill>/scripts/run <subskill> advance --session <id>

Available sub-skills

  • onboard: Default workflow for implementing, setting up, or enabling Contentful personalization project-wide, including when the existing setup state is unknown. Explores the codebase, checks readiness, chooses SDK and architecture, installs packages, implements, and validates. Use extend-existing only for a scoped change to an explicitly working integration. — params: readinessOnly (boolean), userQuery (string)
  • live-debug: Inspect a live URL with Chrome DevTools MCP for runtime personalization issues. Checks console problems, observes ninetailed.co requests, and reports whether the next step should be static doctor diagnosis. — params: requestedUrl (string)
  • doctor: Diagnose and fix Contentful personalization issues. Runs programmatic checks first (credentials, API connectivity, content state), fixes infrastructure problems, and only then explores the codebase. — params: userQuery (string)
  • extend-existing: Extend an explicitly existing, working Contentful personalization integration. Use only for scoped changes such as personalizing another component, adding an experiment, or wiring analytics into the installed SDK. Not for first-time, project-wide, or unknown-state implementation requests; use onboard for those. — params: userQuery (string)

Reference topics

Quick-reference topics accessible without running the full workflow:

bash
<skill>/scripts/run topics              # list all topics
<skill>/scripts/run topic <name>         # load a specific topic
  • how-personalization-works: Core concepts: content model, rendering flow, and how personalization works
  • sdk-selection: SDK decision framework: Optimization default vs legacy deployment maintenance
  • provider-patterns: Provider placement patterns for Pages Router, App Router, and both SDKs
  • middleware-patterns: Middleware and SSR/edge patterns: preflight, cookies, matcher config
  • component-patterns: Component architecture patterns: ContentTypeMap, BlockRenderer, isolation
  • rendering-pipeline: Rendering pipeline: Contentful client setup, include depth, component mapper
  • environment-variables: Environment variables: names, runtime matrix, framework prefixes
  • analytics-and-preview: Analytics plugins (Insights, GTM, Segment) and preview configuration
  • common-errors: Common failure modes with root causes and fixes
  • ssr-guide: SSR and edge-side personalization: patterns, anti-patterns, troubleshooting
  • sdk-legacy-guide: @ninetailed/experience.js reference for debugging or extending existing deployments
  • sdk-next-guide: @contentful/optimization SDK runtime chooser
  • optimization-overview: @contentful/optimization runtime and package chooser
  • optimization-react-web: @contentful/optimization React Web provider, hooks, entries, and routing
  • optimization-nextjs-app-router: @contentful/optimization Next.js App Router integration
  • optimization-nextjs-pages-router: @contentful/optimization Next.js Pages Router integration
  • optimization-web: @contentful/optimization imperative browser and Web Components integration
  • optimization-node: @contentful/optimization stateless Node request integration
  • optimization-react-native: @contentful/optimization React Native integration
  • contentful-integration-guide: Contentful CMS integration: content types, ExperienceMapper, publishing workflow
  • implementation-examples: Real code examples: providers, BlockRenderer, Experience component patterns

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Contentful Personalization làm được gì?

Implement, extend, and debug Contentful personalization. Use onboarding for new, project-wide, or unknown setups; use extend-existing only for scoped work on an explicitly working integration. Trigger keywords: personalization, optimization, ninetailed, A/B test, experiment, multivariate test, targeting, audience targeting, segments, variants, content variants, set up personalization, implement personalization, enable personalization, personalization not working, personalization broken, personalize this component, am I ready for personalization, experience API, Contentful Experiences, Exper...

Vì sao nên dùng Contentful Personalization trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Contentful Personalization là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Contentful Personalization trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/contentful/skills/tree/main/skills/contentful-personalization. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Contentful Personalization?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Contentful Personalization với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Contentful Personalization với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Contentful Personalization có miễn phí không?

Có. Kỹ năng này được contentful phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇