sanity-isr-webhook

Configure Sanity webhooks to trigger Next.js ISR cache revalidation on AWS Amplify.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/AWS-Educate/template-nextjs-sanity-tailwind-amplify --skill sanity-isr-webhook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sanity-isr-webhook
Source: https://github.com/AWS-Educate/template-nextjs-sanity-tailwind-amplify/tree/main/.claude/skills/sanity-isr-webhook
Command: npx skills add https://github.com/AWS-Educate/template-nextjs-sanity-tailwind-amplify --skill sanity-isr-webhook

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill ensures that content changes made in Sanity CMS are instantly reflected on your Next.js website without requiring a full redeploy or manual cache clearing.

Core Features & Use Cases

  • On-Demand ISR: Implements Incremental Static Regeneration triggered by Sanity webhooks.
  • Real-time Content Updates: Content changes in Sanity appear on the live site within seconds.
  • Use Case: When a blog post is published or updated in Sanity, this Skill automatically invalidates the relevant Next.js cache, making the new content immediately visible to users.

Quick Start

Configure the Sanity webhook to trigger Next.js cache revalidation when content changes.

Frequently Asked Questions about sanity-isr-webhook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trigger Next.js ISR revalidation when content changes in Sanity?

Next.js ISR revalidation from Sanity is triggered by configuring Sanity webhooks to hit a Next.js API route, which invalidates specific cache tags for near real-time content updates.

Does on-demand Incremental Static Regeneration work with Next.js hosted on AWS Amplify?

On-demand Incremental Static Regeneration works with Next.js on AWS Amplify by setting required environment variables and API routes to receive Sanity webhook payloads for cache invalidation.

What is on-demand ISR and when do I need it for my Next.js CMS?

On-demand ISR is a caching mechanism that updates static pages instantly via webhook triggers. You need it when content changes in your CMS must appear on the live site without a full redeploy.

How do I configure Sanity webhooks for Next.js cache invalidation?

Configuring Sanity webhooks for cache invalidation requires setting specific webhook settings in Sanity to target your Next.js revalidation API route and passing the correct environment variables.

Why are my Next.js content updates not showing immediately after publishing in Sanity?

Immediate Next.js content updates require proper cache tag invalidation. Without on-demand ISR triggered by Sanity webhooks, the Next.js cache serves stale content until the next scheduled rebuild.