app-router-setup

app-router-setup is a cursor rule for Cursor from Sitecore/content-sdk. It costs 226 tokens per session, scanned A, original, Apache-2.0.

Setup rules for a Sitecore Content SDK application using Next.js App Router, a Next.js way to organize pages and server routes, plus cached content and tag-based revalidation.

In plain words
What is it for?
Use them to install, run, build, lint, and type-check the app, configure local environment values, and work on routing, caching, or content revalidation.
Why use it?
They provide the expected commands, files, environment setup, and cache structure needed to develop and validate the application.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions AGENTS.md.

Good fit Use them to install, run, build, lint, and type-check the app, configure local environment values, and work on routing, caching, or content revalidation.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/sitecore/content-sdk/app-router-setup
Install

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.

Clone the repo
git clone --depth 1 https://github.com/Sitecore/content-sdk

Made for: Cursor.

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 app-router-setup

README.md
[![agentmods](https://agentmods.dev/badge/rules/sitecore/content-sdk/app-router-setup/github.svg)](https://agentmods.dev/rules/sitecore/content-sdk/app-router-setup)
Your own site
<a href="https://agentmods.dev/rules/sitecore/content-sdk/app-router-setup"><img src="https://agentmods.dev/badge/rules/sitecore/content-sdk/app-router-setup/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 app-router-setup

Your own site · 80×15
<a href="https://agentmods.dev/rules/sitecore/content-sdk/app-router-setup"><img src="https://agentmods.dev/badge/rules/sitecore/content-sdk/app-router-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 226 This file is loaded in full into every session.
When invoked 226 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.00226 $0.00226
Opus 5.5 $0.00090 $0.00090
Sonnet 5.5 $0.00045 $0.00045
Haiku 4.5 $0.00023 $0.00023

Measured 15d ago against content hash 18c3a3cdc549, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 15d 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.

packages/create-content-sdk-app/src/templates/nextjs-app-router-cache-components/.cursor/rules/app-router-setup.mdc · 14 lines

What it actually says

Sitecore Content SDK — App Router + Cache Components

Next.js App Router + Cache Components (cacheComponents: true) + tag-based revalidation. Commands: npm install, npm run dev, npm run build, npm run lint, npm run type-check. Copy .env.example → .env.local (set SITECORE_REVALIDATE_SECRET when using OSR).

Structure: src/app/[site]/[locale]/[[...path]]/, src/lib/cache/, src/app/api/revalidate/route.ts, src/proxy.ts, .sitecore/, sitecore.config.ts, next.config.ts.

Detail: Guardrails in AGENTS.md. Depth: .agents/docs/ (cache helpers, POST /api/revalidate, BUILD_VALIDATION_SITE). Skills: Skills.md.

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. 15d ago First seen · 14 lines · 226 tokens per session scan A 18c3a3cdc549

Subscribe to this mod's changes

app-router-setup is a cursor rule published in the GitHub repository Sitecore/content-sdk (37 stars, last pushed yesterday), licensed Apache-2.0. It adds 226 tokens to every session, about $0.0009 per session on Opus 5.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-10-02.