9 chapters · 33 min
Skills
Chapter 1 of 9
Synchronize the Contentful Optimization SDK’s public API, behavior, and implementation guidance into concise, runtime-specific references for the contentful-personalization skill.
5 minutes · 1,208 words · 12 sections
Update the modern Optimization SDK knowledge in contentful-personalization from a verified upstream revision. Optimize the result for an agent solving implementation tasks: concise, explicit, runtime-specific, and grounded in public API and maintained examples.
Do not copy upstream guides wholesale. Treat this as a knowledge compilation workflow.
This skill owns modern @contentful/optimization* guidance. Preserve legacy @ninetailed/* guidance unless upstream evidence requires a compatibility correction.
Supported runtime references:
Do not synthesize iOS or Android guidance until upstream provides equivalent knowledge-base facts, public API declarations, and guide blueprints.
Use the public repository by default:
https://github.com/contentful/optimization.gitResolve sources in this order:
.docs/optimization-sdk-sync/repository.The cache is repo-local working state for the sync process. It is not committed or distributed. Reusing it avoids cloning the public repository on every run while still allowing the skill to fetch and inspect an exact upstream commit.
For the default remote flow:
origin is exactly the official HTTPS repository before fetching.main.git pull or merge upstream history.For an explicit local path:
HEAD.Before interpreting upstream files, read every applicable AGENTS.md from the repository root down to each source directory. Follow upstream-generated-file and validation rules.
Use all four evidence layers. Knowledge-base facts and types alone are not sufficient for complete agent guidance.
documentation/internal/sdk-knowledge/.packages/.documentation/authoring/blueprints/.Resolve conflicts using the most authoritative source for the claim:
Never infer an API from prose when an exported type or implementation is available.
Treat repository knowledge and guide validators as structural integrity gates. They verify pointers, templates, links, and planned structure; they do not prove that two valid sources agree semantically. When a knowledge fact conflicts with an exported public type, record the discrepancy and follow the public type for downstream API guidance.
From the resolved checkout, run the repository’s documented dependency setup if required, then:
pnpm knowledge:check
pnpm guides:checkRecord each result as passed, failed, or blocked. A sandbox, dependency, or runtime restriction
is blocked, not failed, but both are non-passing. Stop authoritative downstream writes unless
both checks pass; report the immutable SHA, command, status, and concrete failure or blocking reason.
Read src/skills/contentful-personalization/optimization-sdk-sync.json when it exists. Compare its previous upstream SHA with the newly resolved SHA.
Use the changed-file set to prioritize inspection, but always revalidate:
A file delta narrows review; it never replaces the evidence hierarchy.
When sub-agents are available, use isolated ownership:
Workers must follow the same immutable SHA and evidence hierarchy. A worker’s report is review input, not a substitute for coordinator validation.
Write source references under src/skills/contentful-personalization/references/:
optimization-overview.md
optimization-shared.md
optimization-react-web.md
optimization-nextjs-app-router.md
optimization-nextjs-pages-router.md
optimization-web.md
optimization-node.md
optimization-react-native.mdEach runtime reference should stand alone after optimization-shared.md is loaded. Include only what materially helps an agent implement, review, or debug that runtime:
The overview should route an agent to the right runtime and summarize package selection. Shared concepts belong in optimization-shared.md; do not repeat them in every runtime file.
Writing rules:
After compiling the pack:
optimization-shared.md plus only the detected
runtime reference or references.Update src/skills/contentful-personalization/optimization-sdk-sync.json with:
remote or local)passed / failed / blocked resultsDo not put machine-specific local paths in the manifest.
The source tree is authoritative. Generate distribution output only after source references and workflow code are updated:
pnpm run build
pnpm run lint
pnpm run typecheck
pnpm run test
python3 local-skills/skills/skill-authoring/scripts/quick_validate.py local-skills/skills/optimization-sdk-sync
python3 local-skills/skills/skill-authoring/scripts/quick_validate.py skills/contentful-personalization
npx skills add . --list --full-depthAlso search the distributed skill for removed API names and obsolete import paths discovered during the sync. Review the generated diff for accidental duplication and machine-specific provenance.
Do not commit, push, or open a pull request unless the user asks.
Report:
Install this repository
npx skills add contentful/skills/plugin marketplace add contentful/skillsSkills install per repository, not per chapter — the CLI has no documented per-skill form, so we do not print one.
Synchronize the Contentful Optimization SDK's public API, behavior, and implementation guidance into concise, runtime-specific references for the contentful-personalization skill. Use when the optimization repository or SDK documentation changes, when modern SDK guidance appears stale, or when validating that the skill matches an immutable upstream revision.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 9 August 2026.SKILL.md, not by matching a directory convention. 3 distinct layouts observed: local-skills/skills/*/SKILL.md, skills/*/SKILL.md, skills/contentful-apps/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by Contentful, declaring 1 plugin. It is read for editorial metadata only — never as the skill index, which is always the repository tree./contentful/skills.md, and each chapter at its own .md URL.1 file · 60 B
Everything this skill ships beside its prose. All of it is set here, as a subchapter of chapter 1.
Everything else published alongside the skill.