What this costs scales with pages × components, not with the framework. Two
small Contentful sites — a Next blog with 4 entries in 2 locales (8 pages, 3
components marked) and an Astro bookshelf with 8 pages across 3 templates —
took an agent about 25 and 13 minutes of run time to integrate, plus a
person’s first pass through the editor. As a rough guide: minutes per
distinct component to declare and mark up, plus the one-time wiring; a site
with a few templates is an hour or less, and a design system with dozens of
components and a CMS in several languages is days. The skills make the work
correct and ordered; what makes it long is how many components there are.
Start here: install the skills
.claude/skills/ and .agents/skills/ — avocado
routes, and avocado-integrate is the one for this job — plus an AGENTS.md
and a CLAUDE.md that point at them. Nothing else is touched: no routes, no
config, no dependencies. An AGENTS.md or CLAUDE.md you already have is never
overwritten; if yours does not mention Avocado, the command says so, and you add
the pointer line yourself. --dry-run prints what it would write.
Why not a prompt on this page? Because a web page cannot be versioned
against what npm serves, and ours drifted — the quickstart said
0.11.9 while
the registry served 0.13.1, and the guides for existing sites taught a
registerBlock call that does not compile. The skills ship inside the packages,
so an install carries exactly its own version’s instructions, and re-running the
command after an upgrade replaces them. They are also tested: a suite in the
package reads every skill and fails on an API call that would not compile.avocado routes;
avocado-integrate runs this job; avocado-blocks declares components and
marks up renderers; avocado-cms covers content that lives in Sanity, Storyblok
or another headless CMS; avocado-demo builds a throwaway. Between them they
carry what this page used to hold as a 400-line prompt — moved to where it can
be kept true, and tested.
Before you start
- Node 22+ and your usual package manager.
-
One of the supported frameworks:
- Next.js 15 or 16, App Router. If you are on 16, the agent must use
proxy.tsrather thanmiddleware.ts(at the project root, or insrc/if the app uses one) and giveconfigas a static object literal — Next 16 reads it by static analysis and cannot read one returned from a factory. - Astro 5 or later, through
@avocadostudio-ai/astro— see the Astro integration. No adapter is needed to edit againstastro dev; one is needed to preview a deployed site.avocado-integratehas an Astro branch that follows that page. If the copy lives inline in.astroor JSX markup rather than in a CMS or data files, file-backed sites is the recipe for moving it out.
- Next.js 15 or 16, App Router. If you are on 16, the agent must use
-
Your own dev server —
next dev,astro dev— for registration and the coverage check. In library mode (Next.js only) the orchestrator is not a service you start: it is mounted inside your own app athttp://localhost:3000/api/avocado, so it is up exactly when your dev server is. Everything before registration never talks to it at all. If your project has no orchestrator mounted yet, the quickstart’s route is the whole of it.http://localhost:4200is the standalone server’s address, and it is whatavocado-registerdefaults to — pass--orchestratorunless that is really what you are running. -
The editor UI, also for the last step only, and it is a process you start:
npx @avocadostudio-ai/cli start. See Open it. Nothing in the integration itself needs it, which is why it is easy to reach the end without it. -
One
siteId, spelled the same in three places:createSitePage(on Astro, the integration’ssiteId), the orchestrator — thecreateOrchestratormount, or the standalone server’s registry — andavocado-register --id. They disagree and the page asks for a draft session the orchestrator never seeded — which looks like the editor showing published content for no reason. - An Anthropic, OpenAI or Google API key on the orchestrator. Avocado runs on your keys; it never resells tokens.
- A branch. The agent will touch your route files. Give it somewhere to be wrong.
If your agent cannot load skills
Some agents have no skill support, and some read files only when told to. The skills are plain Markdown on disk after the command above, so point at them directly. Paste this:Reading the docs from a local checkout
If your agent is behind a proxy or you would rather it read from disk, point it at thedocs-site/ directory of your Avocado checkout instead of the URLs:
Give the agent Avocado’s own tools
The MCP server exposes 49 tools over Model Context Protocol — stdio or Streamable HTTP — and works with any MCP host, including Claude Code, Codex, Cursor and Claude Desktop. Connecting it during the integration gives your agent two things the docs cannot:- Real pages and real blocks. It can read the site’s actual content and manifest from the orchestrator instead of guessing from the code.
avocado-check-editing-surface. The panel-coverage QA check as a tool, so the agent can grade its own work between passes rather than at the end.
When the agent gets stuck
After the agent finishes
If the agent ranavocado-register, the site is already registered and appears in the editor’s dashboard on the next open or refresh. Otherwise run it yourself:
- Work out the framework (Astro, Next.js or other), the package manager and the dev port from the project.
- Take the draft secret from
--secret, else fromDRAFT_MODE_SECRETin.envor.env.local, else generate one. - POST the site config and the secret to
<ORCHESTRATOR_URL>/sites/register, which answers whether the secret matches the orchestrator’sDRAFT_MODE_SECRET. - On a mismatch, stop and write nothing. The editor sends its secret to your site with every preview; a site holding a different one shows published content in the frame. The message says where the right value lives — for a standalone orchestrator run from an Avocado checkout,
DRAFT_MODE_SECRETin that checkout’s.env, which the editor reads asVITE_SITE_DRAFT_SECRET— and to re-run with--secret <value>. - Otherwise write the file your framework reads, adding only missing keys:
.env.localwithDRAFT_MODE_SECRET,ORCHESTRATOR_URLand theNEXT_PUBLIC_*names on Next;.envwithDRAFT_MODE_SECRET,ORCHESTRATOR_URLandAVOCADO_SITE_IDon Astro and anything else.--secretreplaces a different value already there. - Print next steps in your package manager’s spelling —
npm run dev,pnpm dev,yarn dev.
--token (it defaults to ORCHESTRATOR_ACCESS_TOKEN). The command also warns when the env file it wrote is not git-ignored, because the next git add -A would commit the secret.
An unreachable orchestrator is not a failure: the env file is still written, the command exits 0, and it says the secret could not be checked. ORCHESTRATOR_URL is written only once something answered there, or you named it — an address nothing replied at is a guess, and writing it would pin it for every later run.
Registration is optional in library mode. A library-mode mount already knows the one site it is mounted in and reports it from
GET /sites whether or not anyone registered it. What registration adds is the name, preview URL and purpose in the orchestrator’s registry — worth having, not a gate. Skipping it does not stop the site loading in the editor.Open it
Two processes, in two terminals. The integration you just reviewed is only half of what has to be running: it makes your app editable, and the editor UI is a separate program that talks to it.- Your site
- The editor UI
http://localhost:3000, with the orchestrator mounted inside it at /api/avocado.http://localhost:4100 and find nothing listening, having
started everything the integration mentioned.
Pass --orchestrator. The CLI defaults to http://localhost:4200, the
standalone server, which is not what this project runs. --preview is the
origin the editor loads in its iframe — your site.
Then open http://localhost:4100, pick the site, and send one edit from the
chat panel to confirm the round trip.
Troubleshooting
If your agent cannot finish, the fallback is not to start over by hand — it is to narrow the scope. Get the install and the editor API route landed and verified, then do the renderer markup block by block, checking coverage after each one.