Agent prompts
Copy-paste prompts for the most common Cimplify workflows. Drop any block into Claude Code, Cursor, or any MCP-aware agent. Fill the angle-bracket placeholders and run.
These prompts are deliberately terse. Each one names the canonical doc the agent should read first, the exact commands or MCP tools to call, and the exit condition. Replace <angle-bracket> placeholders before running.
Every prompt assumes the agent has either:
- the Cimplify CLI installed and
cimplify logincomplete, or - an MCP connection to
https://api.cimplify.io/mcp(setup)
Ship a new storefront end-to-end
Set up a Cimplify <retail> storefront called <my-store> and deploy it to <shop.example.com>.
Source of truth: https://cimplify.dev/docs/tldr
- Use the MCP tools at api.cimplify.io/mcp when available; otherwise shell `cimplify <cmd> --json`.
- After every command, echo the JSON envelope.
- Stop on the first non-zero exit code and name it from https://cimplify.dev/docs/cli#exit-codes.
- Poll deployment status with cimplify_get_deployment_status (or `cimplify status --json`); never `sleep`.
- Idempotent: re-running any step is safe.Rebrand an existing storefront
Rebrand the storefront in <./my-store> to match these tokens:
name: <Acme Coffee>
primary: <#0F172A>
accent: <#F59E0B>
fontDisplay: <"Playfair Display">
fontBody: <"Inter">
Rules (https://cimplify.dev/docs/templates/brand):
- Single source of truth is `lib/brand.ts`. Update it first.
- Mirror color tokens into `app/globals.css` `@theme` block. Do not hard-code colors elsewhere.
- Do not edit ejected SDK components; they pick up tokens automatically.
- Run `bun run check:brand` after edits; fix any schema errors it reports.
- Verify by opening `http://localhost:3000` (start `bun dev` if not running).
- Commit with message `brand: <name>`. Do not deploy.Add a homepage section
Add a `<Stories>` section to the homepage of the storefront in <./my-store>.
Pattern (mirrors the Server Component sections under `app/_sections/` in the scaffolded template):
- Create `app/_sections/stories.tsx` as an async Server Component. Pass `cacheOptions: { revalidate: 3600, tags: [tags.collections()] }` to the SDK read (from `@cimplify/sdk/server`). Do NOT use `'use cache'` / `cacheTag` / `cacheLife`. Cimplify storefronts run on CF Workers where Cache Components is broken; use the ISR Previous Model.
- Source data from `client.catalogue.getCollection({ slug: "stories" })`.
- Render with the existing `<SectionHeader>` and `<ProductCard>` SDK components (do not eject).
- Insert into `app/page.tsx` between the hero and the featured collection.
- Run `bun run check`. It must pass typecheck, lint, brand, cart-flow, contract.
- Do not modify `lib/brand.ts` or any file under `components/ui/`.Migrate to a new SDK version
Upgrade the storefront in <./my-store> from `@cimplify/sdk@<0.44.x>` to `@cimplify/sdk@<latest>`.
Process:
- Read the release notes for the target range (`npm view @cimplify/sdk versions --json` to list, then `npm view @cimplify/sdk@<version>` per release).
- Bump the pin in `package.json`, run `bun install`.
- For each breaking change called out in the changelog, grep the project for the old symbol and apply the documented replacement.
- Run `bun run check`. If `check:contract` fails, the SDK ↔ mock contract drifted; stop and report.
- Do not run `cimplify deploy`. End by printing a summary of every file you changed and every breaking change you applied.Add a custom checkout payment method
Add <mobile_money> as a checkout payment option in the storefront at <./my-store>.
Reference: https://cimplify.dev/docs/api-reference/checkout (flat ProcessArgs body: top-level fields, not nested).
- The body shape is the contract; never wrap fields.
- Eject the existing `<PaymentMethodPicker>` component with `cimplify add payment-method-picker`.
- Add the option in the ejected picker, wiring the provider-specific body (e.g. `mobile_money_details: { phone_number, provider }`).
- Validate the body against the typed `ProcessArgs` from `@cimplify/sdk`.
- Run `bun run check:cart`; the add→checkout flow must still pass.Provision a CI deploy key
Create a CI-scoped API key for the Cimplify project linked at <./my-store>, and write the GitHub Actions snippet that uses it.
Steps:
- Confirm `.cimplify/project.json` exists; if not, fail with NOT_LINKED (exit 4).
- Print the dashboard URL the human needs to visit to create the key (https://app.cimplify.io/settings/developer).
- Once the user provides `dk_live_…`, store it as a repo secret named `CIMPLIFY_API_KEY` (instruct, do not perform).
- Write `.github/workflows/deploy.yml` that runs on push to main: install CLI via the curl one-liner, `cimplify deploy --prod --api-key "$CIMPLIFY_API_KEY" --yes --json`.
- Print the exit-code legend from https://cimplify.dev/docs/cli#exit-codes so the workflow can map failures.Diagnose a deploy that didn't go live
The latest deploy of the project at <./my-store> isn't live. Find out why.
Triage path:
- `cimplify status --json`: what's the latest deployment_id and status?
- If status is `failed`, `cimplify logs --deployment <id> --json | tail -200`. Quote the first error line you see.
- If status is `queued` or `building` for >5 minutes, the build is stuck; try `cimplify rollback <previous-deploy-id>`.
- If status is `superseded` (exit 2), a newer push raced it; usually fine, so confirm with `cimplify status` again.
- If domains misroute, `cimplify domains ls --json`: confirm the verified+attached domain.
- Report: deployment_id, status, the failing log line (if any), and the recommended next action. Do not auto-rollback without confirming.Add a hero image and reference it in the homepage
Add the image at <./Downloads/hero.jpg> as the homepage hero for the storefront in <./my-store>.
Reference: https://cimplify.dev/docs/cli/assets
- `cp <./Downloads/hero.jpg> public/hero/main.jpg`
- `cimplify assets upload public/hero/ --folder hero --json`: captures the manifest entry for `hero/main.jpg`.
- Edit `app/page.tsx`: replace the hero `<Image>` `src` with `assetUrl("hero/main.jpg")` from `@cimplify/sdk`.
- Do NOT touch existing `<Image>` calls that point at Cloudinary or other external hosts; the loader passes them through unchanged.
- Run `bun run check`. Open `http://localhost:3000`; verify the hero image renders.
- Commit `cimplify-assets.json` along with the source change so the manifest is reviewable.Audit caching and asset delivery
Audit the live storefront at <https://my-store.mycimplify.com> for caching and asset-delivery regressions.
Sources of truth:
- https://cimplify.dev/docs/sdk/optimization (page + asset caching)
- https://cimplify.dev/docs/templates/seo-and-resource-hints (responsive images)
- Page cache: curl /, /shop, and a PDP 2–3× each; `X-Cimplify-Edge-Cache` must warm to HIT and `Cache-Control` must carry `s-maxage`. A BYPASS or missing `s-maxage` means the page lost its `revalidate` or carries a Cookie.
- Asset cache: pull a `/_next/static/*` chunk; it must be `public, max-age=31536000, immutable`.
- Images: flag raw `<img>` from a third-party CDN, and Cloudinary URLs with no `/upload/<transform>/` segment (full-resolution originals).
- Report a table (route/asset, observed header, expected, severity). Do not change source unless asked.Reset a sandbox storefront to a clean state
Reset the local mock state for the storefront in <./my-store>.
- Stop any running `bun dev` process.
- `cimplify mock reset` (clears the in-process mock backing store).
- `cimplify mock seed <retail>` (re-seeds with the chosen industry fixture).
- `bun dev` to restart both servers.
- Verify: `curl localhost:8787/v1/catalogue/products | jq '.data | length'` returns the expected seed count (~24 for retail).
- Do not touch the linked cloud project; this is local-only.How these are built
Every prompt above is structured the same way so you can adapt them:
- Goal: one sentence, with
<angle-bracket>placeholders for the moving parts. - Source of truth: the canonical doc URL the agent reads first.
- Rules: operational guardrails for which tools to call, what to echo, and when to stop.
- Exit condition: what counts as success, what counts as a halt.
If you build a prompt that should live here, open a PR against content/docs/agent-prompts.mdx. Keep them under ~12 lines; if a workflow needs more, it belongs in a dedicated doc page and the prompt should link to it.
Quickstart
From zero to a working storefront in 60 seconds. `cimplify init` scaffolds a Next.js app wired to the local mock; the same code points at your live business when you bring keys.
Brand schema
Every storefront template ships a `lib/brand.ts` that owns every visible string. Pages, components, JSON-LD, sitemap, `llms.txt`, and metadata all read from `brand`, so a rebrand is one file. The shape is enforced at boot by `BrandSchema`, and at test time by `assertBrand(brand)`.