Terminal
Terminal/Skill
Walks you through setting up DatoCMS in a site or repo: previews, caching, SEO, CLI, webhooks and imports, with a plan before any changes.
By DatoCMS
Works with
npx skills add datocms/agent-skills --skill datocms-setupGuided setup. This skill owns the conversation: goal, questions, plan, order, consent, handoff. Implementation lives in the sibling DatoCMS skills; each play links the exact files and sections to follow. Load those, never improvise from memory. Missing sibling skill → ask the user to install the full datocms/agent-skills bundle.
package.json (framework: next, nuxt, @sveltejs/kit, astro; DatoCMS packages; datocms CLI), package manager from lockfile (pnpm-lock.yaml → pnpm, yarn.lock → yarn, bun.lock/bun.lockb → bun, else npm), source layout (src/, Nuxt app/), env files (names only, never print values), datocms.config.json and migrations directory, existing DatoCMS code (query helper, draft/preview routes, webhook handlers, CI jobs). Never ask what the repo answers.package.json and a website goal → New site below first. Clear request → step 3. Unclear ("set up DatoCMS") → ask what they want: 2–4 outcomes fitted to the repo, each with one sentence on the result. An unanswered goal has no default: wait.production-ready only when real values are wired and the result was exercised end to end (websites: serve and load a real page and the preview flow, not just build); otherwise scaffolded. List every open value under Unresolved placeholders (or "none"). Summarize what changed; Test it: 1–3 concrete steps from the play's Verify, using the real routes and env var names; offer next outcomes in plain language.| Outcome | Play | File |
|---|---|---|
| Site reads DatoCMS content, optionally with typed queries | Connect the site | website.md |
| Draft previews, preview inside DatoCMS, click-to-edit, live updates | Previews and visual editing | website.md |
| Published pages refresh when content changes | Fresh published content | website.md |
| Images, Structured Text, video rendered from DatoCMS | Render content | website.md |
| SEO tags, canonical URLs, robots.txt, sitemap | SEO and crawling | website.md |
| Search page powered by DatoCMS Site Search | Site search | website.md |
| CLI installed and repo linked to the project | Connect the repo | project.md |
| Typed CMA code and preview route mapping | Typed CMA code | project.md |
| Versioned schema changes | Schema migrations | project.md |
| Release schema changes to production | Release migrations | project.md |
| One repo driving several DatoCMS projects | Several projects | project.md |
| DatoCMS calls other systems or starts deploys | Webhooks and build triggers | project.md |
| Content moved in from WordPress or Contentful | Imports | project.md |
Schema design (models, fields, blocks) is decided with datocms-content-modeling and implemented through a migration or datocms-cma; setup never invents schema.
No app yet (no package.json) and a website goal, before any play:
Framework unknown → ask: Next.js, Nuxt, SvelteKit or Astro.
Always offer the official starter next to scaffolding; recommend it for a new project. It ships draft mode, Web Previews, Content Link, real-time updates and typed queries. Its Marketplace page creates a new DatoCMS project with the starter's schema and sample content (and can deploy it); the GitHub repo is the code. Existing project with its own schema → say the starter's queries won't match it, so the starter serves as a reference there.
Starter chosen → guide creating it from the Marketplace page (or cloning the repo against a project created from it) and filling its env vars; no plays needed.
Scaffold chosen → after the plan is agreed, create the app with the framework's own generator, then continue with website plays.
Implementation needs a DatoCMS project and none is known → ask (header "Project"): "Do you already have a DatoCMS project, or should we create a new one?" Options: link existing (first), create new. Neither is recommended. Create → the user creates it at https://dashboard.datocms.com/ and confirms; then Connect the repo, then schema design, then website plays.
Use the harness's structured question tool when available and allowed, following its real schema and limits: short header, options with one-sentence outcomes, (Recommended) only when justified, multi-select only for compatible choices. No tool → numbered plain-text list. Can't ask (non-interactive run) → do only work that doesn't depend on the answer and report what's missing.