What you need.
- A campaign set up in Campaigns in your NEXT dashboard, with its public API key.
- Your page designs as HTML files with their images. No designs yet? Your agent can use a starter template as-is.
- A short brief: the pages in order, what each offer is, your store's name and support contact, and links to your policy pages.
- A coding agent that works in a folder on your computer, plus Node.js 20.19 or newer, npm 10 or 11, and Git.
For agents (and people who want the commands)
The toolkit is @nextcommerce/campaigns-os on npm, and the commands below name the release this page is built against. Install it in the campaign folder as an exact development dependency and run it with npx --no-install campaigns-os, so the pinned copy is the one that runs. The same steps are in llms.txt.
Read the orientation contract first.
Before installing or running anything, read AGENTS.md at the release. It sets the reading order.
Set up the folder: Claude Code.
Run this in the campaign folder.
npm init -ygives the folder its ownpackage.json, so npm installs into it and not into a project above it. The line then installs page-kit and the toolkit at exact versions, followed by the QA browser, the skills, and the project context, and it keeps any pages and instructions already there. Commitpackage.jsonandpackage-lock.json. When it reportsrestart_required, ask the person to restart Claude Code in the folder.setupnpm init -y && npm install --save-exact next-campaign-page-kit@0.3.0 && npm install --save-dev --save-exact @nextcommerce/campaigns-os@1.62.0 && npx --no-install campaigns-os tooling setup --target . --platform claude
An existing campaign keeps its reviewed versions: run
npm ci, then only the last part of the line above. Changing versions is a separate update. Details: local setup.Set up the folder: Codex, Cursor, and other agents.
The one-step setup is for Claude Code only. Install the same versions, then the skills (
--platform codex, or--platform agentsfor Cursor and other agents that read shared skills), the context files, and the QA browser. The context files land in.campaign-runtime/agent-context/; point the project'sAGENTS.mdor Cursor rules at the matching file.install-skillslists eachSKILL.mdit wrote underRead now: read those files in the same session, because a running agent does not load skills installed after it started. Restart only if the agent cannot read them.setup (other agents)npm init -y && npm install --save-exact next-campaign-page-kit@0.3.0 && npm install --save-dev --save-exact @nextcommerce/campaigns-os@1.62.0 npx --no-install campaigns-os install-skills --platform codex npx --no-install campaigns-os install-agent-context --target . npx --no-install campaigns-os qa install-browser
Write the campaign spec.
Without a saved Workspace plan, write
campaign-spec.jsonfrom the brief, the HTML, and the campaign's real products and offers, following the local-spec entry. Give it a newspec_identity.local_spec_idonce and keep it through every revision. Never guess a price, an offer, or policy text; ask. Put the HTML and images insource-html/.Run
start, then follownext.Replace
<family>with a starter template family (compare them).startwrites the build files into the folder and opens a run session. By default it sends its run record to NEXT's telemetry endpoint; runnpx --no-install campaigns-os telemetry offfirst to keep it local.startnpx --no-install campaigns-os start --spec campaign-spec.json --source source-html --target . --template-family <family> --deploy-target local-serve
Then run
nextafter every stage and do what it names, through a localhost build to a test order with a test card. Until a stage is recorded, re-run the full start line above to redo intake. After that,startrefuses to overwrite the recorded work: save a changed brief withrecord briefand a changed CampaignSpec withrecord spec, andnextnames the stage that is owed again.nextnpx --no-install campaigns-os next --packet ./campaign-runtime.build.json --json
From a saved Workspace plan instead.
The Handoff prompt names the Map ID. Create
./sourcefor the HTML, even when every page uses the template as-is. QA for a saved plan posts its verdict to the Map unless you pass--no-post-verdict, except a run against a local address such as localhost, which keeps it local unless you pass--post-verdictor runqa publishafterwards.start from a Mapnpx --no-install campaigns-os start --map-id <map-id> --target . --source ./source --template-family <family>
Contributors on a toolkit checkout replace npx --no-install campaigns-os with npm run campaigns-os --.