xmcloud-starter-js: Cursor rule for Windsurf

.windsurfrules

windsurfrules is a cursor rule for Windsurf from Sitecore/xmcloud-starter-js. It costs 8,734 tokens per session, scanned A, original, Apache-2.0.

A set of coding rules describes a Sitecore XM Cloud front-end repository with Next.js starter applications, a single-page application example, authoring files, and local Docker setup. It gives an agent context about the project layout and technologies.

In plain words
What is it for?
It is for working on Next.js and SPA examples, Sitecore XM Cloud content and deployment files, and local development containers.
Why use it?
It reduces the risk of making changes in the wrong directory or using an unsuitable project pattern.

Cursor rule for Windsurf

Written for Windsurf: a Windsurf rule.

This is Sitecore/xmcloud-starter-js's own configuration. It tells Windsurf how to work on xmcloud-starter-js itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything xmcloud-starter-js configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import handler from '../pages/api/robots';.

Reuse

Borrowing it

Nothing to install: this file belongs to Sitecore/xmcloud-starter-js. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Sitecore/xmcloud-starter-js/main/.windsurfrules
Clone the repo
git clone --depth 1 https://github.com/Sitecore/xmcloud-starter-js

Made for: Windsurf.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for windsurfrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/sitecore/xmcloud-starter-js/windsurfrules/github.svg)](https://agentmods.dev/rules/sitecore/xmcloud-starter-js/windsurfrules)
Your own site
<a href="https://agentmods.dev/rules/sitecore/xmcloud-starter-js/windsurfrules"><img src="https://agentmods.dev/badge/rules/sitecore/xmcloud-starter-js/windsurfrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for windsurfrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/sitecore/xmcloud-starter-js/windsurfrules"><img src="https://agentmods.dev/badge/rules/sitecore/xmcloud-starter-js/windsurfrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,734 This file is loaded in full into every session.
When invoked 8,734 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.08734 $0.08734
Opus 5 $0.04367 $0.04367
Sonnet 5 $0.01747 $0.01747
Haiku 4.5 $0.00873 $0.00873

Measured today against content hash 47b104af2c0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

windsurfrules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.windsurfrules · 1,174 lines

How it starts

The opening of the file, as written. The whole thing — 1,174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Windsurf IDE Rules - XM Cloud Front End Starter Kits

Project Overview

Repository Structure

This is the XM Cloud Front End Application Starter Kits repository containing multiple Next.js starter applications and SPA examples for Sitecore XM Cloud development.

Key Directories:

  • /examples/ - Starter front-end applications (Next.js and SPA)
    • basic-nextjs - Simple Next.js starter with basic XM Cloud integration
    • kit-nextjs-article-starter - Solterra & Co. - Editorial-style template for lifestyle brands
    • kit-nextjs-location-finder - Alaris - Car brand template with location finder functionality
    • kit-nextjs-product-listing - SYNC - Product-focused template for audio gear companies
    • kit-nextjs-skate-park - Demo site showcasing component examples
    • basic-spa - SPA starter kit with Angular and Node proxy
  • /authoring/ - Sitecore content items, templates, and deployment configurations
  • /local-containers/ - Docker setup for local development environments
  • xmcloud.build.json - Primary configuration for XM Cloud deployment

Technology Stack

Core Technologies:

  • Next.js 14+ - React framework with App Router and Pages Router support
  • TypeScript - Strict type safety throughout all components
  • Sitecore XM Cloud - Headless content management and delivery
  • Sitecore Content SDK (@sitecore-content-sdk/nextjs) - Modern SDK for XM Cloud integration
  • Tailwind CSS - Utility-first CSS with container queries (@container)
  • Shadcn/ui - Modern component library with accessibility features

Additional Libraries:

  • Framer Motion - Animation library for interactive components
  • Lucide React - Icon library for consistent iconography
  • next-localization - Internationalization with dictionary support
  • change-case - String case transformation utilities

Development Tools:

  • Docker - Containerized local development with Sitecore CM
  • Node.js LTS - JavaScript runtime environment
  • npm - Package management across all starter applications

Read the full file on GitHub · 1,174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 1,174 lines · 8,734 tokens per session scan A 47b104af2c0a

Subscribe to this mod's changes

windsurfrules is a cursor rule published in the GitHub repository Sitecore/xmcloud-starter-js (29 stars, last pushed today), licensed Apache-2.0. It adds 8,734 tokens to every session, about $0.0437 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-09.