Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/vercel/next.js/flagsnpx skills add vercel/next.js --skill flagsgit clone --depth 1 https://github.com/vercel/next.jsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00077 | $0.00728 |
| Opus 5 | $0.00039 | $0.00364 |
| Sonnet 5 | $0.00015 | $0.00146 |
| Haiku 4.5 | $0.00008 | $0.00073 |
Grade A, and why
flags scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Feature Flags
Use this skill when adding or changing framework feature flags in Next.js internals.
Required Wiring
All flags need: config-shared.ts (type) → config-schema.ts (zod). If the flag is consumed in user-bundled code (client components, edge routes, app-page.ts template), also add it to define-env.ts for build-time injection. Runtime-only flags consumed exclusively in pre-compiled bundles can skip define-env.ts.
Where the Flag Is Consumed
Client/bundled code only (e.g. __NEXT_PPR in client components): define-env.ts is sufficient. Webpack/Turbopack replaces process.env.X at the user's build time.
Pre-compiled runtime bundles (e.g. code in app-render.tsx): The flag must also be set as a real process.env var at runtime, because app-render.tsx runs from pre-compiled bundles where define-env.ts doesn't reach. Two approaches:
- Runtime env var: Set in
next-server.ts+export/worker.ts. Both code paths stay in one bundle. Simple but increases bundle size. - Separate bundle variant: Add DefinePlugin entry in
next-runtime.webpack-config.js(scoped tobundleType === 'app'), new taskfile tasks, updatemodule.compiled.jsselector, and still set env var innext-server.ts+export/worker.tsfor bundle selection. Eliminates dead code but adds build complexity.
For runtime flags, also add the field to the NextConfigRuntime Pick type in config-shared.ts.
Runtime-Bundle Model
- Runtime bundles are built by
next-runtime.webpack-config.js(rspack) viataskfile.jsbundle tasks. - Bundle selection occurs at runtime in
src/server/route-modules/app-page/module.compiled.jsbased onprocess.envvars. - Variants:
{turbo/webpack} × {experimental/stable/nodestreams/experimental-nodestreams} × {dev/prod}= up to 16 bundles per route type. define-env.tsaffects user bundling, not pre-compiled runtime internals.process.env.Xchecks inapp-render.tsxare either replaced by DefinePlugin at runtime-bundle-build time, or read as actual env vars at server startup. They are NOT affected by the user's defines fromdefine-env.ts.- Gotcha: DefinePlugin entries in
next-runtime.webpack-config.jsmust be scoped to the correctbundleType(e.g.apponly, notserver) to avoid replacing assignment targets innext-server.ts.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 46 lines · 77 tokens per session scan A 51c0d540171e
flags is a skill published in the GitHub repository vercel/next.js (142,020 stars, last pushed yesterday), licensed MIT. It adds 77 tokens to every session and 728 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
shadcn
Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json…
migrate-radix-to-base
Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components ("migrate accordion") and whole projects.
theme-component
Add complete theme support for one Recharts component. Invoke with the component name, for example theme-component XAxis.
typescript
Write strongly-typed TypeScript code in Recharts.
example
Create new example charts for Recharts documentation website.
investigate
Find root cause for a bug or an issue in Recharts and propose a solution.