Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/sitecore/xmcloud-starter-js/app-router-setupgit clone --depth 1 https://github.com/Sitecore/xmcloud-starter-jsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00624 | $0.00624 |
| Opus 5 | $0.00312 | $0.00312 |
| Sonnet 5 | $0.00125 | $0.00125 |
| Haiku 4.5 | $0.00062 | $0.00062 |
Grade A, and why
app-router-setup 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 2d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Sitecore Content SDK Next.js App Router Project
Project Overview
This is a Sitecore Content SDK application built with Next.js App Router. This project uses the latest Next.js features for improved performance and developer experience.
Key Technologies:
- Next.js App Router (React Server Components)
- Sitecore Content SDK
- TypeScript
- Sitecore XM Cloud
- next-intl for internationalization
Getting Started
Development Workflow:
- Install dependencies:
npm install - Configure environment variables (copy
.env.exampleto.env.local) - Start development server:
npm run dev - Build for production:
npm run build
App Router Specifics:
- Server Components by default
- Client Components when interactivity needed
- File-based routing in
src/app/directory - Layout files for shared UI elements
Project Structure
src/
app/ # App Router pages and layouts
components/ # React-specific SDK
lib/ # Configuration and utilities
i18n/ # Internationalization setup
Component Development:
- Server Components for data fetching and static content
- Client Components for interactivity (use 'use client')
- Shared components in
src/components/ - Follow Sitecore field handling patterns
App Router Best Practices
Server vs Client Components:
- Use Server Components for Sitecore content rendering
- Use Client Components for user interactions
- Minimize client-side JavaScript
- Leverage server-side data fetching
Routing and Layouts:
- Use layout.tsx for shared page structure
- Implement loading.tsx for loading states
- Create error.tsx for error boundaries
- Use page.tsx for route content
Sitecore Integration
Content Rendering:
- Fetch Sitecore data in Server Components
- Use layout service for page structure
- Handle content preview scenarios
- Implement proper error handling
Performance:
- Leverage Server Components for better performance
- Use streaming for improved loading experience
- Implement proper caching strategies
- Optimize images with Next.js Image component
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.
- 2d ago First seen · 117 lines · 624 tokens per session scan A e58bd49ecaf4
app-router-setup is a cursor rule published in the GitHub repository Sitecore/xmcloud-starter-js (29 stars, last pushed 8d ago), licensed Apache-2.0. It adds 624 tokens to every session, about $0.0031 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-08-30.
Other cursor rules, from other repositories
internationalization
Useful for internationalization (i18n) when you use and intl.formatMessage.
i18n-mandatory
All user-visible UI text uses t('namespace:section.key') from react-i18next.
i18n
Internationalization with react-i18next.
frontend-patterns
React/TypeScript patterns for src/ code.
internationalization
Cursor rule "internationalization" from dtyq/magic, covering internationalization (i18n) rules, 国际化基本规范, 1. 文件结构, 2. 命名空间规范 and 3. 组件中使用国际化.
new-component
Workflow for creating new React components.