cache-components

Implement Next.js Cache Components and Partial Prerendering with best-practice patterns.

Updated Dec 16, 2025
One-click install
npx skills add https://github.com/Takeaki0817/hibioru --skill cache-components-takeaki0817
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cache-components
Source: https://github.com/Takeaki0817/hibioru/tree/main/.claude/skills/cache-components
Command: npx skills add https://github.com/Takeaki0817/hibioru --skill cache-components-takeaki0817

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers adopt Next.js Cache Components and Partial Prerendering (PPR) by providing practical patterns, best practices, and a troubleshooting guide to build high-performance, hybrid static/dynamic pages.

Core Features & Use Cases

  • Proactive activation: Automatically adapt patterns when next.config.ts/js enables cacheComponents.
  • Pattern guidance: Show how to use 'use cache', cacheLife, cacheTag, updateTag, revalidateTag, and revalidatePath to optimize static shells with streaming content.
  • Debugging and migration: Provide migration guidance from deprecated exports to Cache Components patterns and common troubleshooting steps.

Quick Start

Enable Cache Components in next.config.ts, annotate data fetchers with 'use cache' and configure cache lifetimes, wrap dynamic content in Suspense, and use updateTag/revalidateTag for invalidation.

Frequently Asked Questions about cache-components

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

FAQPage Schema
How do I use 'use cache' with Next.js Cache Components and Partial Prerendering?

To use 'use cache' with Next.js Cache Components, annotate data fetchers and configure cache lifetimes using APIs like cacheLife and cacheTag. This enables Partial Prerendering by building static shells with streaming dynamic content wrapped in Suspense.

How do I invalidate cached data when using Next.js Cache Components?

Invalidate cached data in Next.js Cache Components by using updateTag, revalidateTag, or revalidatePath. These APIs allow you to selectively refresh cached content when underlying data changes, maintaining hybrid static and dynamic page performance.

What is the best way to migrate deprecated Next.js exports to Cache Components patterns?

The best way to migrate deprecated Next.js exports to Cache Components patterns is to replace them with 'use cache' directives and lifecycle APIs like cacheLife and cacheTag. This Skill provides migration guidance and troubleshooting steps for a smooth transition.

Does enabling cacheComponents in next.config automatically apply caching patterns?

Enabling cacheComponents in next.config does not automatically cache everything, but it does proactively adapt patterns to guide developers. You must explicitly annotate data fetchers with 'use cache' and configure invalidation to build high-performance hybrid pages.

Why is my Next.js Partial Prerendering not streaming dynamic content correctly?

Partial Prerendering may not stream correctly if dynamic content is not properly wrapped in Suspense or if cache lifetimes are misconfigured. This Skill provides troubleshooting steps to ensure static shells compose properly with streaming dynamic content.

Related Skills