Toolverse
All skills

cache-components

by vercel

Expert guidance for Next.js Cache Components and Partial Prerendering (PPR).\n\n**PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected,

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
vercel
Category
Frontend
Views
39

About this skill

Expert guidance for Next.js Cache Components and Partial Prerendering (PPR).\n\nPROACTIVE ACTIVATION: Use this skill automatically when working in Next.js projects that have cacheComponents: true in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations.\n\nDETECTION: At the start of a session in a Next.js project, check for cacheComponents: true in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions.\n\nUSE CASES: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.

How to use

  1. Sprawdź, czy Twój projekt Next.js ma włączone Cache Components — otwórz plik next.config.ts lub next.config.js i szukaj wpisu cacheComponents: true. Jeśli go nie ma, dodaj go do konfiguracji, aby aktywować skill.

  2. Skill automatycznie się aktywuje na początku sesji w projekcie z włączonym Cache Components. Będzie proaktywnie stosować wzorce i best practices do wszystkich React Server Components, które piszesz.

  3. Podczas implementacji Server Components używaj dyrektywy 'use cache' na komponentach, które chcesz cachować. Skill będzie podpowiadać, gdzie ta dyrektywa ma sens.

  4. Konfiguruj czas życia cache'u za pomocą funkcji cacheLife() — skill pomoże Ci wybrać odpowiednie okresy dla różnych typów danych (np. krótsze dla danych użytkownika, dłuższe dla zawartości statycznej).

  5. Taguj cached dane za pomocą cacheTag(), aby móc je później inwalidować. Skill będzie sugerować logiczne tagi na podstawie struktury Twoich komponentów i źródeł danych.

  6. Kiedy musisz odświeżyć cache, używaj updateTag() lub revalidateTag() z odpowiednimi tagami. Skill pomoże Ci debugować problemy z cache'em i przeglądzać istniejące implementacje Cache Components pod kątem optymalizacji.

Related skills

zustand

by lobehub

Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.

Frontend
36126

shadcn-ui-setup

by maneeshanif

Install and configure Shadcn/ui component library with Radix UI primitives, Aceternity UI effects, set up components, and manage the component registry. Use when adding Shadcn/ui to a Next.js project or installing specific UI components for Phase 2.

Frontend
23167

livewire-development

by spatie

Develops reactive Livewire 4 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading, or any wire: directives; adding real-time updates, loading states, or reactivity; debugging component behavior;

Frontend
2335

markitdown

by K-Dense-AI

Convert various file formats (PDF, Office documents, images, audio, web content, structured data) to Markdown optimized for LLM processing. Use when converting documents to markdown, extracting text from PDFs/Office files, transcribing audio, performing OCR on images, extracting

Frontend
75173

game-development

by davila7

Game development orchestrator. Routes to platform-specific skills based on project needs.

Frontend
36112

svg-precision

by dkyazzentwatwa

Deterministic SVG generation, validation, and rendering. Use for icons, diagrams, charts, UI mockups, or technical drawings requiring structural correctness and cross-viewer compatibility.

Frontend
233466