Agent skill

Cache Components

by Asymmetric-al in Asymmetric-al/core

Build correct cached/dynamic boundaries in the Next.js App Router when Cache Components or PPR are enabled.

AGPL-3.0Auto-check passedBackend & APIs

Install Cache Components

skills CLI
$ npx skills add Asymmetric-al/core --skill cache-components -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Asymmetric-al/core cache-components --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Asymmetric-al/core.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cache-components .claude/skills/cache-components && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cache-components
GitHub stars
381
Token cost
~1k tokens
SKILL.md length
373 words
Files
1
Skills in repo
41
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Build correct cached/dynamic boundaries in the Next.js App Router when Cache Components or PPR are enabled.

  • Works in 5 steps: Classify each data dependency as shared… → For shared data, add 'use cache' +… → For request/user-specific data, keep it… → …
  • Working with cacheComponents
  • SKILL.md covers Rules, Workflow, Checklists and Minimal examples, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cache Components is an agent skill from Asymmetric-al/core. Build correct cached/dynamic boundaries in the Next.js App Router when Cache Components or PPR are enabled. Use when working with cacheComponents, Partial Prerendering (PPR), 'use cache', cacheLife, cacheTag, updateTag, or revalidateTag, to avoid request-context leaks and enforce proper cache invalidation. Not for the Pages Router or when Cache Components/PPR are off.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Caching. It works with Next.js. The repository describes itself as: A high-performance, enterprise-grade Next.js 16 application for mission-focused non-profit organizations. Built for high impact teams. The licence is AGPL-3.0.

When your agent uses it

  • Working with cacheComponents
  • Partial Prerendering (PPR)
  • Avoid request-context leaks and enforce proper cache invalidation

Example prompts

  • “use cache”
  • “/cache-components”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Classify each data dependency as shared or request-specific.
  2. For shared data, add 'use cache' + cacheTag (and cacheLife if needed).
  3. For request/user-specific data, keep it dynamic and render behind .
  4. Split cached logic from request logic if needed.
  5. Invalidate tags after mutations.

What it can do on your machine

Read from SKILL.md and the folder at commit 21e861c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cache Components loads about 1k tokens when it runs. Until then it costs about 97 tokens; SKILL.md has 373 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Asymmetric-al/core at commit 21e861c, republished under its AGPL-3.0 licence (© Asymmetric-al). 373 words, ~1,024 tokens.

Download SKILL.mdSave it as .claude/skills/cache-components/SKILL.md (or your agent's skills folder).
name
cache-components
description
Build correct cached/dynamic boundaries in the Next.js App Router when Cache Components or PPR are enabled. Use when working with cacheComponents, Partial Prerendering (PPR), 'use cache', cacheLife, cacheTag, updateTag, or revalidateTag, to avoid request-context leaks and enforce proper cache invalidation. Not for the Pages Router or when Cache Components/PPR are off.

Cache Components (Next.js) — Skill

Name: cache-components Purpose: Build correct cached/dynamic boundaries in Next.js App Router when Cache Components or PPR are in use. Use this skill to avoid request-context leaks and to enforce proper cache invalidation.

Applies when: cacheComponents: true, Partial Prerendering (PPR), 'use cache', cacheLife, cacheTag, updateTag, revalidateTag. Do not use when: Working in the Pages Router or when Cache Components/PPR are not enabled.

Rules

  • Cached vs dynamic: Shared data should be cached; request/user-specific data must be dynamic and streamed behind <Suspense>.
  • No request context inside cache: Never call cookies(), headers(), or auth/session inside a 'use cache' scope.
  • Cached functions must be async: Any 'use cache' function/component must be async.
  • Prefer code-local caching: Favor 'use cache', cacheLife, cacheTag over route-segment config (revalidate, dynamic).
  • Mutations must invalidate tags: Use updateTag for immediate consistency or revalidateTag for background refresh.
  • PPR + generateStaticParams: Do not return empty arrays; keep request-specific logic out of the shell.
  • Instant Navigation (16.3): with partialPrefetching: true, Next.js prefetches one reusable shell per route. Every server await is a Stream (<Suspense>) / Cache ('use cache') / Block (export const instant = false + reason comment) decision; Instant Insights errors link the canonical fix at nextjs.org/docs/messages/... — apply that pattern, don't improvise.
  • Prefetch escalation: <Link prefetch={true}> extends prefetching to build-time-known cached content on that link; export const prefetch = 'allow-runtime' extends it to request-time cached content and requires PR justification.
Show full SKILL.md (149 more words)Show less

Workflow

  1. Classify each data dependency as shared or request-specific.
  2. For shared data, add 'use cache' + cacheTag (and cacheLife if needed).
  3. For request/user-specific data, keep it dynamic and render behind <Suspense>.
  4. Split cached logic from request logic if needed.
  5. Invalidate tags after mutations.

Checklists

Implementation checklist
  • Shared data uses 'use cache'
  • Cached scopes have cacheTag
  • No request data inside cached scopes
  • Dynamic UI is isolated behind <Suspense>
  • Cached functions are async
  • Route stays instant (Stream/Cache), or Blocks explicitly via export const instant = false with a reason
  • Mutations invalidate correct tags
Review checklist
  • Route segment config avoided unless required
  • PPR shells do not include request-specific logic

Minimal examples

Cached function
ts
"use cache";

import { cacheLife, cacheTag } from "next/cache";

export async function getProducts(category: string) {
  cacheLife("minutes");
  cacheTag("products");
  cacheTag(`products:${category}`);
}
Dynamic Suspense boundary
tsx
import { Suspense } from "react";

export default function Page() {
  return (
    <>
      <MainCached />
      <Suspense fallback={null}>
        <UserPanel />
      </Suspense>
    </>
  );
}
Mutation invalidation
ts
"use server";

import { updateTag } from "next/cache";

export async function updateProduct(id: string) {
  updateTag(`product:${id}`);
  updateTag("products");
}

Common mistakes / pitfalls

  • Reading cookies/headers/session inside 'use cache'
  • Missing cache tags on cached functions
  • Rendering request-specific data outside <Suspense>
  • Forgetting to invalidate tags after mutations
  • Returning an empty array from generateStaticParams

© Asymmetric-al, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/cache-components of Asymmetric-al/core.

Open the folder on GitHubat commit 21e861c

Compare with similar skills

Cache Components next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cache Components compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cache Components this skillAsymmetric-al/core381—~1kAutomated safety check: PassAGPL-3.0
V8 Jitvercel/next.js143k—~3.6kAutomated safety check: PassMIT
Apollo Clientapollographql/skills117—~1.9kAutomated safety check: PassMIT
Nextjs Turbopackkurealnum/dotfiles2905 repos~540Automated safety check: PassNone
Wp Headless And Wpgraphqljorgerosal/wordpress-skills101—~1.7kAutomated safety check: PassMIT
Cloudflare Nextjssecondsky/claude-skills227—~5.3kAutomated safety check: NotesMIT

Similar skills

  • V8 Jit

    vercel/next.js

    Official

    V8 JIT optimization patterns for writing high-performance JavaScript in Next.js server internals.

    143k GitHub stars~3.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Apollo Client

    apollographql/skills

    Guide for building React applications with Apollo Client 4.x.

    117 GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Nextjs Turbopack

    kurealnum/dotfiles

    Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

    290 GitHub starsUsed in 5 repos~540 tokens
    Backend & APIsAuto-check passed
  • Wp Headless And Wpgraphql

    jorgerosal/wordpress-skills

    Headless WordPress and WPGraphQL review guidance. An agent skill from jorgerosal/wordpress-skills.

    101 GitHub stars~1.7k tokensUpdated 4 mo ago
    Backend & APIsAuto-check passed
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 10 days ago
    Backend & APIsAuto-check: notes
  • Cache Components

    sangrokjung/claude-forge

    Expert guidance for Next.js Cache Components and Partial Prerendering (PPR).

    850 GitHub stars~3.7k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed

More from Asymmetric-al/core

All 41 skills in this repo
  • Idempotency Handling

    Asymmetric-al/core

    Implement idempotency keys and handling to ensure operations can be safely retried without duplicate effects.

    381 GitHub stars~867 tokensUpdated today
    Auto-check passed
  • Accessibility Review

    Asymmetric-al/core

    Audit and fix accessibility in Core UI. An agent skill from Asymmetric-al/core.

    381 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Email Inbox

    Asymmetric-al/core

    A skill your agent uses when building any system where email content triggers actions — AI agent inboxes, automated support handlers, email-to-task pipelines, or any workflow processing untrusted…

    381 GitHub stars~4.1k tokensUpdated today
    Auto-check: notes
  • Components Build

    Asymmetric-al/core

    Build modern, composable, and accessible React UI components following the components.build specification.

    381 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Create Agent

    Asymmetric-al/core

    Guides a one-question-at-a-time design interview, captures alignment in agent/EVE-BRIEF.md, then scaffolds and implements a runnable eve agent with verbose teaching comments.

    381 GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Emil Design Engineering

    Asymmetric-al/core

    Design engineering principles and patterns for building polished, accessible web interfaces.

    381 GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Cache Components

What does Cache Components do?

Build correct cached/dynamic boundaries in the Next.js App Router when Cache Components or PPR are enabled. Cache Components is an agent skill from Asymmetric-al/core.js App Router when Cache Components or PPR are enabled.

When should I use Cache Components?

Cache Components fits situations like: working with cacheComponents; partial Prerendering (PPR); avoid request-context leaks and enforce proper cache invalidation.

How do I install Cache Components in Claude Code?

Run `npx skills add Asymmetric-al/core --skill cache-components -a claude-code`. Or copy the skill folder (.agents/skills/cache-components in Asymmetric-al/core) into .claude/skills/cache-components in your project. Claude Code loads it when a task matches its description.

How do I install Cache Components in Codex?

Run `npx skills add Asymmetric-al/core --skill cache-components -a codex`. Or copy the skill folder (.agents/skills/cache-components in Asymmetric-al/core) into .agents/skills/cache-components in your project. Codex loads it when a task matches its description.

Can I use Cache Components in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Asymmetric-al/core --skill cache-components -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cache-components, .gemini/skills/cache-components, .github/skills/cache-components and .opencode/skills/cache-components in your project.

What does Cache Components need to run?

SKILL.md names no scripts, command-line tools or credentials: Cache Components is instructions for the agent only.

Does Cache Components access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cache Components safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cache Components use?

Cache Components is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cache Components use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cache Components?

Skills that share tags, products or a category with Cache Components: V8 Jit (vercel/next.js, 143k stars), Apollo Client (apollographql/skills, 117 stars), Nextjs Turbopack (kurealnum/dotfiles, 290 stars) and Wp Headless And Wpgraphql (jorgerosal/wordpress-skills, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cache Components?

Asymmetric-al (a GitHub organization) maintains it in Asymmetric-al/core, which has 381 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on October 8, 2026.

Source: Asymmetric-al/core on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.