{
  "id": "skl_0934e31db844",
  "slug": "skill-next-js-app-router",
  "asset_type": "skill",
  "name": "Next.js (App Router) — Production Architecture & Agent Playbook",
  "tagline": "Deterministic architecture, strict typing, testing, and security guardrails for Next.js (App Router) projects.",
  "description_md": "### Overview & Capability Scope\n**Next.js (App Router) — Production Architecture & Agent Playbook** (`skill-next-js-app-router`) is a verified, portable `SKILL.md` playbook curated with **@threepointone** for Grok Bot (`x.ai/bot/`), Claude Code (`~/.claude/skills/`), and Cursor (`.cursor/skills/`).\n\nDeterministic architecture, strict typing, testing, and security guardrails for Next.js (App Router) projects.\n\n### Required Stack & Tooling\n- **Primary Stack:** Next.js, App Router\n- **Category:** `security-ops`\n- **Source & Reference:** [https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc)\n\n### Quickstart Installation\nInstall this `SKILL.md` playbook directly into your agent workspace:\n```bash\nnpx lightstate install skill-next-js-app-router\n```\nOr copy the complete `SKILL.md` specification below into `.cursor/skills/skill-next-js-app-router/SKILL.md` or `~/.claude/skills/skill-next-js-app-router/SKILL.md`.\n\n### Verification Commands\n```bash\nnpx lightstate install skill-next-js-app-router\ngit status --short\nnpm test || pytest || cargo test\n```\n",
  "primary_category": "security-ops",
  "categories_json": "[\"security-ops\", \"skills\"]",
  "tags_json": "[\"next.js\", \"app-router\", \"skill-md\", \"security-ops\"]",
  "compatible_agents_json": "[\"grok-bot\", \"claude-code\", \"cursor\"]",
  "integrations_json": "[\"Next.js\", \"App Router\"]",
  "includes_json": "[]",
  "safety_level": "Read-Only / Ask-First",
  "safety_summary": "Verified capability blueprint by @threepointone.",
  "share_url": "",
  "deep_link_uri": "",
  "mcp_endpoint": "",
  "mcp_transport": "http",
  "install_command": "npx lightstate install skill-next-js-app-router",
  "skill_markdown": "---\nname: next-js-app-router\ndescription: Deterministic architecture, strict typing, testing, and security guardrails for Next.js (App Router) projects. Use when working with Next.js, App Router.\ntriggers:\n  - next js app router\n  - next.js\n  - app router\n---\n\n# Next.js (App Router) — Production Architecture & Agent Playbook\n\n## 1. When to Use This Skill\nLoad `skill-next-js-app-router` whenever an engineering, architecture, or operations task involves **Next.js, App Router**. Specifically:\n- Deterministic architecture, strict typing, testing, and security guardrails for Next.js (App Router) projects.\n- Designing, reviewing, refactoring, or debugging production configurations without guesswork or deprecated flags.\n- Running deterministic pre-flight validation and post-execution verification checks before reporting completion.\n\n## 2. Prerequisites & Required Environment\n- **Target Stack:** Next.js, App Router\n- **Permissions Boundary:** Read-only inspection by default; ask for explicit human confirmation before executing destructive mutations or production deployments.\n- **Reference Specification:** `https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc`\n\n## 3. Step-by-Step Execution Playbook\n1. **Context & Configuration Discovery:**\n   Inspect existing project manifests (`package.json`, `tsconfig.json`, `pyproject.toml`, `Cargo.toml`, `wrangler.jsonc`, or schema declarations) before proposing changes. Never overwrite existing bindings or credentials blindly.\n2. **Deterministic Implementation:**\n   Apply the canonical production patterns for **Next.js**:\n   - Enforce strict schema and type validation at every external boundary.\n   - Include explicit error handling, structured telemetry, and idempotency keys on all mutating calls.\n   - Keep secrets in environment variables or managed secret stores—never hardcode tokens in source files.\n3. **Verification & Regression Gate:**\n   Run the verification commands below and inspect both exit codes and output payloads before marking the task complete.\n\n## 4. Reference Commands & CLI Workflow\n```bash\nnpx lightstate install skill-next-js-app-router\ngit status --short\nnpm test || pytest || cargo test\n```\n\n## 5. Edge Cases & Anti-Hallucination Guardrails\n- **Zero Unverified Claims:** Never claim a build, migration, test run, or API call succeeded without inspecting the command output or HTTP status code.\n- **Rollback Readiness:** Always record the previous state or migration version so changes can be reverted cleanly if downstream health checks fail.\n",
  "starter_prompt": "Load the Next.js (App Router) — Production Architecture & Agent Playbook (skill-next-js-app-router) playbook. First inspect our current configuration and codebase for Next.js, App Router. Then propose a concrete, step-by-step implementation plan following the skill-next-js-app-router guardrails, run the non-destructive verification commands (npx lightstate install skill-next-js-app-router), and summarize any findings, risks, or required environment variables before making production changes.",
  "project_url": "https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc",
  "repo_url": "https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc",
  "creator_handle": "threepointone",
  "creator_name": "Sunil Pai (@threepointone)",
  "creator_avatar_url": null,
  "creator_url": "https://x.com/threepointone",
  "creator_platform": "x",
  "creator_cal_url": null,
  "claimed_by_user_id": null,
  "scouted_by_handle": null,
  "source_url": "https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc",
  "source_tweet_id": null,
  "source_origin": "certified_builder",
  "source_posted_at": null,
  "x_likes": 208,
  "x_bookmarks": 454,
  "x_retweets": 113,
  "x_views": 2912,
  "human_upvotes": 208,
  "human_installs": 208,
  "bot_pulls": 454,
  "pulse_score": 80,
  "gravity_rank_score": 1713,
  "is_featured": 0,
  "is_verified": 1,
  "is_sponsored": 0,
  "sponsor_tier": "free",
  "sponsor_label": "",
  "sponsor_cta_url": "",
  "sponsor_expires_at": null,
  "commercial_intent_score": 0,
  "status": "active",
  "created_at": "2026-10-24T22:25:00Z",
  "updated_at": "2026-10-24T22:25:00Z",
  "verified_at": null,
  "primitive": "skill",
  "title": "Next.js (App Router) — Production Architecture & Agent Playbook",
  "description": "Deterministic architecture, strict typing, testing, and security guardrails for Next.js (App Router) projects.",
  "category": "security-ops",
  "tags": "[\"next.js\", \"app-router\", \"skill-md\", \"security-ops\"]",
  "agent_compatibility": "[\"grok-bot\", \"claude-code\", \"cursor\"]",
  "author_handle": "threepointone",
  "author_name": "Sunil Pai (@threepointone)",
  "author_avatar": null,
  "source_tweet_url": "https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc",
  "github_url": "https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc",
  "external_url": "https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc",
  "upvotes_count": 208,
  "installs_count": 208
}