Apollo Client
apollographql/skills
Guide for building React applications with Apollo Client 4.x.
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR).
$ npx skills add sangrokjung/claude-forge --skill cache-components -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sangrokjung/claude-forge cache-components --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cache-components .claude/skills/cache-components && rm -rf skills-srcUse ~/.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/
Install the "cache-components" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/cache-components into .claude/skills/cache-components/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-components", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sangrokjung/claude-forge/tree/main/skills/cache-componentsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sangrokjung/claude-forge --skill cache-components -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sangrokjung/claude-forge cache-components --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/cache-components .agents/skills/cache-components && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cache-components" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/cache-components into .agents/skills/cache-components/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-components", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sangrokjung/claude-forge --skill cache-components -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sangrokjung/claude-forge cache-components --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/cache-components .cursor/skills/cache-components && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cache-components" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/cache-components into .cursor/skills/cache-components/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-components", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sangrokjung/claude-forge.git --path skills/cache-components--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sangrokjung/claude-forge --skill cache-components -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sangrokjung/claude-forge cache-components --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/cache-components .gemini/skills/cache-components && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cache-components" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/cache-components into .gemini/skills/cache-components/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-components", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sangrokjung/claude-forge cache-componentsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sangrokjung/claude-forge --skill cache-components -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/cache-components .github/skills/cache-components && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cache-components" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/cache-components into .github/skills/cache-components/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-components", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sangrokjung/claude-forge --skill cache-components -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sangrokjung/claude-forge cache-components --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/cache-components .opencode/skills/cache-components && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cache-components" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/cache-components into .opencode/skills/cache-components/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-components", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cache-componentsExpert guidance for Next.js Cache Components and Partial Prerendering (PPR).
Cache Components is an agent skill from sangrokjung/claude-forge. Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). 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, proactively apply Cache Components patterns and best practices to all React Server Component implementations. DETECTION: At the start of a session in a Next.js project, check for cacheComponents: true in next.config. If enabled, this skill's patterns…
Its SKILL.md is about 3.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `PATTERNS.md`, `REFERENCE.md` and `TROUBLESHOOTING.md`).
It sits in Backend & APIs, covering Caching. It works with Next.js and React. The repository describes itself as: oh-my-zsh for Claude Code — 16 agents, 35 commands, 32 skills, 21 safety hooks in one install. v4.0 adds an adversarial review loop: a second agent that never sees the first… The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 34d881d. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cache Components loads about 3.7k tokens when it runs. Until then it costs about 232 tokens; SKILL.md has 679 words of instructions outside code blocks.
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.
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.
The full file from sangrokjung/claude-forge at commit 34d881d, republished under its MIT licence (© sangrokjung). 679 words, ~3,681 tokens.
.claude/skills/cache-components/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Auto-activation: This skill activates automatically in projects with
cacheComponents: truein next.config.
When starting work in a Next.js project, check if Cache Components are enabled:
# Check next.config.ts or next.config.js for cacheComponents
grep -r "cacheComponents" next.config.* 2>/dev/nullIf cacheComponents: true is found, apply this skill's patterns proactively when:
Cache Components enable Partial Prerendering (PPR) - mixing static HTML shells with dynamic streaming content for optimal performance.
Cache Components represents a shift from segment configuration to compositional code:
| Before (Deprecated) | After (Cache Components) |
|---|---|
export const revalidate = 3600 | cacheLife('hours') inside 'use cache' |
export const dynamic = 'force-static' | Use 'use cache' and Suspense boundaries |
| All-or-nothing static/dynamic | Granular: static shell + cached + dynamic |
Key Principle: Components co-locate their caching, not just their data. Next.js provides build-time feedback to guide you toward optimal patterns.
┌─────────────────────────────────────────────────────┐
│ Static Shell │
│ (Sent immediately to browser) │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Header │ │ Cached │ │ Suspense │ │
│ │ (static) │ │ Content │ │ Fallback │ │
│ └─────────────┘ └─────────────┘ └──────┬──────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ Dynamic │ │
│ │ (streams) │ │
│ └─────────────┘ │
└─────────────────────────────────────────────────────┘When writing a React Server Component, ask these questions in order:
┌─────────────────────────────────────────────────────────┐
│ Does this component fetch data or perform I/O? │
└─────────────────────┬───────────────────────────────────┘
│
┌──────────▼──────────┐
│ YES │ NO → Pure component, no action needed
└──────────┬──────────┘
│
┌─────────────────▼─────────────────┐
│ Does it depend on request context? │
│ (cookies, headers, searchParams) │
└─────────────────┬─────────────────┘
│
┌────────────┴────────────┐
│ │
┌────▼────┐ ┌─────▼─────┐
│ YES │ │ NO │
└────┬────┘ └─────┬─────┘
│ │
│ ┌─────▼─────────────────┐
│ │ Can this be cached? │
│ │ (same for all users?) │
│ └─────┬─────────────────┘
│ │
│ ┌──────────┴──────────┐
│ │ │
│ ┌────▼────┐ ┌─────▼─────┐
│ │ YES │ │ NO │
│ └────┬────┘ └─────┬─────┘
│ │ │
│ ▼ │
│ 'use cache' │
│ + cacheTag() │
│ + cacheLife() │
│ │
└──────────────┬─────────────────────┘
│
▼
Wrap in <Suspense>
(dynamic streaming)Key insight: The 'use cache' directive is for data that's the same across users. User-specific data stays dynamic with Suspense.
// next.config.ts
import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
cacheComponents: true,
}
export default nextConfig// Cached component - output included in static shell
async function CachedPosts() {
'use cache'
const posts = await db.posts.findMany()
return <PostList posts={posts} />
}
// Page with static + cached + dynamic content
export default async function BlogPage() {
return (
<>
<Header /> {/* Static */}
<CachedPosts /> {/* Cached */}
<Suspense fallback={<Skeleton />}>
<DynamicComments /> {/* Dynamic - streams */}
</Suspense>
</>
)
}'use cache' DirectiveMarks code as cacheable. Can be applied at three levels:
// File-level: All exports are cached
'use cache'
export async function getData() {
/* ... */
}
export async function Component() {
/* ... */
}
// Component-level
async function UserCard({ id }: { id: string }) {
'use cache'
const user = await fetchUser(id)
return <Card>{user.name}</Card>
}
// Function-level
async function fetchWithCache(url: string) {
'use cache'
return fetch(url).then((r) => r.json())
}Important: All cached functions must be async.
cacheLife() - Control Cache Durationimport { cacheLife } from 'next/cache'
async function Posts() {
'use cache'
cacheLife('hours') // Use a predefined profile
// Or custom configuration:
cacheLife({
stale: 60, // 1 min - client cache validity
revalidate: 3600, // 1 hr - start background refresh
expire: 86400, // 1 day - absolute expiration
})
return await db.posts.findMany()
}Predefined profiles: 'default', 'seconds', 'minutes', 'hours', 'days', 'weeks', 'max'
cacheTag() - Tag for Invalidationimport { cacheTag } from 'next/cache'
async function BlogPosts() {
'use cache'
cacheTag('posts')
cacheLife('days')
return await db.posts.findMany()
}
async function UserProfile({ userId }: { userId: string }) {
'use cache'
cacheTag('users', `user-${userId}`) // Multiple tags
return await db.users.findUnique({ where: { id: userId } })
}updateTag() - Immediate InvalidationFor read-your-own-writes semantics:
'use server'
import { updateTag } from 'next/cache'
export async function createPost(formData: FormData) {
await db.posts.create({ data: formData })
updateTag('posts') // Client immediately sees fresh data
}revalidateTag() - Background RevalidationFor stale-while-revalidate pattern:
'use server'
import { revalidateTag } from 'next/cache'
export async function updatePost(id: string, data: FormData) {
await db.posts.update({ where: { id }, data })
revalidateTag('posts', 'max') // Serve stale, refresh in background
}| Content Type | API | Behavior |
|---|---|---|
| Static | No directive | Rendered at build time |
| Cached | 'use cache' | Included in static shell, revalidates |
| Dynamic | Inside <Suspense> | Streams at request time |
Critical Concept: With Cache Components, Next.js renders ALL permutations of provided parameters to create reusable subshells.
// app/products/[category]/[slug]/page.tsx
export async function generateStaticParams() {
return [
{ category: 'jackets', slug: 'classic-bomber' },
{ category: 'jackets', slug: 'essential-windbreaker' },
{ category: 'accessories', slug: 'thermal-fleece-gloves' },
]
}Next.js renders these routes:
/products/jackets/classic-bomber ← Full params (complete page)
/products/jackets/essential-windbreaker ← Full params (complete page)
/products/accessories/thermal-fleece-gloves ← Full params (complete page)
/products/jackets/[slug] ← Partial params (category subshell)
/products/accessories/[slug] ← Partial params (category subshell)
/products/[category]/[slug] ← No params (fallback shell)Why this matters: The category subshell (/products/jackets/[slug]) can be reused for ANY jacket product, even ones not in generateStaticParams. Users navigating to an unlisted jacket get the cached category shell immediately, with product details streaming in.
generateStaticParams RequirementsWith Cache Components enabled:
// ❌ ERROR with Cache Components
export function generateStaticParams() {
return [] // Build error: must provide at least one param
}
// ✅ CORRECT: Provide real params
export async function generateStaticParams() {
const products = await getPopularProducts()
return products.map(({ category, slug }) => ({ category, slug }))
}Arguments become part of the cache key:
// Different userId = different cache entry
async function UserData({ userId }: { userId: string }) {
'use cache'
cacheTag(`user-${userId}`)
return await fetchUser(userId)
}Cache Components provides early feedback during development. These build errors guide you toward optimal patterns:
Error: Accessing cookies/headers/searchParams outside a Suspense boundarySolution: Wrap dynamic components in <Suspense>:
<Suspense fallback={<Skeleton />}>
<ComponentThatUsesCookies />
</Suspense>Error: Accessing uncached data outside SuspenseSolution: Either cache the data or wrap in Suspense:
// Option 1: Cache it
async function ProductData({ id }: { id: string }) {
'use cache'
return await db.products.findUnique({ where: { id } })
}
// Option 2: Make it dynamic with Suspense
;<Suspense fallback={<Loading />}>
<DynamicProductData id={id} />
</Suspense>Error: Cannot access cookies/headers inside 'use cache'Solution: Extract runtime data outside cache boundary (see "Handling Runtime Data" above).
When generating Cache Component code:
async - All cached functions must be async'use cache' first - Must be first statement in function bodycacheLife() early - Should follow 'use cache' directivecookies()/headers() outside cached scope<Suspense> for non-cached async componentsWhen cacheComponents: true is detected in the project, automatically apply these patterns:
Ask yourself: "Can this data be cached?" If yes, add 'use cache':
// Before: Uncached fetch
async function ProductList() {
const products = await db.products.findMany()
return <Grid products={products} />
}
// After: With caching
async function ProductList() {
'use cache'
cacheTag('products')
cacheLife('hours')
const products = await db.products.findMany()
return <Grid products={products} />
}Always invalidate relevant caches after mutations:
'use server'
import { updateTag } from 'next/cache'
export async function createProduct(data: FormData) {
await db.products.create({ data })
updateTag('products') // Don't forget!
}Structure with static shell + cached content + dynamic streaming:
export default async function Page() {
return (
<>
<StaticHeader /> {/* No cache needed */}
<CachedContent /> {/* 'use cache' */}
<Suspense fallback={<Skeleton />}>
<DynamicUserContent /> {/* Streams at runtime */}
</Suspense>
</>
)
}Flag these issues in Cache Components projects:
'use cache' where caching would benefitcacheTag() calls (makes invalidation impossible)cacheLife() (relies on defaults which may not be appropriate)updateTag()/revalidateTag() after mutationscookies()/headers() called inside 'use cache' scope<Suspense> boundariesexport const revalidate - replace with cacheLife() in 'use cache'export const dynamic - replace with Suspense + cache boundariesgenerateStaticParams() return - must provide at least one param© sangrokjung, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files in skills/cache-components of sangrokjung/claude-forge.
Open the folder on GitHubat commit 34d881d
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cache Components this skillsangrokjung/claude-forge | 850 | — | ~3.7k | Automated safety check: Pass | MIT | |
| Apollo Clientapollographql/skills | 117 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Nextjsericrisco/rsc-harness | 167 | — | ~5.1k | Automated safety check: Pass | MIT | |
| Clerk Setupgrowupanand/ConvoForm | 101 | — | ~3k | Automated safety check: Pass | MIT | |
| Nextjs Data Fetchinggiuseppe-trisciuoglio/developer-kit | 355 | — | ~2.2k | Automated safety check: Notes | MIT | |
| Nextjseinverne/dotfiles | 121 | — | ~5.6k | Automated safety check: Notes | MIT |
apollographql/skills
Guide for building React applications with Apollo Client 4.x.
ericrisco/rsc-harness
A skill your agent uses when building, reviewing, testing, securing, or optimizing a Next.js App Router app: Server vs Client boundaries, use server actions, route handlers, the v15 vs v16 use cache…
growupanand/ConvoForm
Set up Clerk authentication in any project with the Clerk CLI and official framework quickstarts.
giuseppe-trisciuoglio/developer-kit
Provides Next.js App Router data fetching patterns including SWR and React Query integration, parallel data fetching, Incremental Static Regeneration (ISR), revalidation strategies, and error…
einverne/dotfiles
Guide for implementing Next.js - a React framework for production with server-side rendering, static generation, and modern web features.
LeoYeAI/openclaw-master-skills
A skill your agent uses when building Next.js 14/15 applications with the App Router.
sangrokjung/claude-forge
Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack.
sangrokjung/claude-forge
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing.
sangrokjung/claude-forge
Analyze session work and automatically convert reusable patterns into Claude Code skills.
sangrokjung/claude-forge
A skill your agent uses when starting Claude Code projects, writing CLAUDE.md/spec.md, dispatching subagents, or requesting Agent Teams parallel development.
sangrokjung/claude-forge
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.
sangrokjung/claude-forge
Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to…
Categories
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). Cache Components is an agent skill from sangrokjung/claude-forge.js Cache Components and Partial Prerendering (PPR).
Cache Components fits situations like: tasks that involve Caching.
Run `npx skills add sangrokjung/claude-forge --skill cache-components -a claude-code`. Or copy the skill folder (skills/cache-components in sangrokjung/claude-forge) into .claude/skills/cache-components in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sangrokjung/claude-forge --skill cache-components -a codex`. Or copy the skill folder (skills/cache-components in sangrokjung/claude-forge) into .agents/skills/cache-components in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sangrokjung/claude-forge --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.
SKILL.md names no scripts, command-line tools or credentials: Cache Components is instructions for the agent only.
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.
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.
Cache Components is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cache Components: Apollo Client (apollographql/skills, 117 stars), Nextjs (ericrisco/rsc-harness, 167 stars), Clerk Setup (growupanand/ConvoForm, 101 stars) and Nextjs Data Fetching (giuseppe-trisciuoglio/developer-kit, 355 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sangrokjung (a GitHub user) maintains it in sangrokjung/claude-forge, which has 850 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on September 3, 2026.
Source: sangrokjung/claude-forge on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.