◆ Category · 60 assets

Frameworks

Browse 60 Frameworks modes for AI coding agents — production-grounded, cited, installable. Part of the VIBE library.

mode

_sections

This file defines all sections, their ordering, impact levels, and descriptions.

View →
mode

_template

**Impact: MEDIUM (optional impact description)**

View →
mode

advanced-event-handler-refs

Store callbacks in refs when used in effects that shouldn't re-subscribe on callback changes.

View →
mode

advanced-use-latest

Access latest values in callbacks without adding them to dependency arrays. Prevents effect re-runs while avoiding stale closures.

View →
mode

AGENTS

> This document is mainly for agents and LLMs to follow when maintaining,

View →
mode

Astro Expert Mode

Expert in Astro - The web framework for content-driven websites

View →
mode

async-api-routes

In API routes and Server Actions, start independent operations immediately, even if you don't await them yet.

View →
mode

async-defer-await

Move `await` operations into the branches where they're actually used to avoid blocking code paths that don't need them.

View →
mode

async-dependencies

For operations with partial dependencies, use `better-all` to maximize parallelism. It automatically starts each task at the earliest possible moment.

View →
mode

async-parallel

When async operations have no interdependencies, execute them concurrently using `Promise.all()`.

View →
mode

async-suspense-boundaries

Instead of awaiting data in async components before returning JSX, use Suspense boundaries to show the wrapper UI faster while data loads.

View →
mode

bundle-barrel-imports

Import directly from source files instead of barrel files to avoid loading thousands of unused modules. **Barrel files** are entry points that re-export multiple modules (e.g., `index.js` that does `export * from './module'`).

View →
mode

bundle-conditional

Load large data or modules only when a feature is activated.

View →
mode

bundle-defer-third-party

Analytics, logging, and error tracking don't block user interaction. Load them after hydration.

View →
mode

bundle-dynamic-imports

Use `next/dynamic` to lazy-load large components not needed on initial render.

View →
mode

bundle-preload

Preload heavy bundles before they're needed to reduce perceived latency.

View →
mode

client-event-listeners

Use `useSWRSubscription()` to share global event listeners across component instances.

View →
mode

client-swr-dedup

SWR enables request deduplication, caching, and revalidation across component instances.

View →
mode

FastAPI Expert Mode

Expert in FastAPI for building high-performance Python APIs

View →
mode

Go Web Frameworks Expert Mode

Expert in Gin, Echo, and Fiber - High-performance Go web frameworks

View →
mode

js-batch-dom-css

Avoid changing styles one property at a time. Group multiple CSS changes together via classes or `cssText` to minimize browser reflows.

View →
mode

js-cache-function-results

Use a module-level Map to cache function results when the same function is called repeatedly with the same inputs during render.

View →
mode

js-cache-property-access

Cache object property lookups in hot paths.

View →
mode

js-cache-storage

`localStorage`, `sessionStorage`, and `document.cookie` are synchronous and expensive. Cache reads in memory.

View →
mode

js-combine-iterations

Multiple `.filter()` or `.map()` calls iterate the array multiple times. Combine into one loop.

View →
mode

js-early-exit

Return early when result is determined to skip unnecessary processing.

View →
mode

js-hoist-regexp

Don't create RegExp inside render. Hoist to module scope or memoize with `useMemo()`.

View →
mode

js-index-maps

Multiple `.find()` calls by the same key should use a Map.

View →
mode

js-length-check-first

When comparing arrays with expensive operations (sorting, deep equality, serialization), check lengths first. If lengths differ, the arrays cannot be equal.

View →
mode

js-min-max-loop

Finding the smallest or largest element only requires a single pass through the array. Sorting is wasteful and slower.

View →
mode

js-set-map-lookups

Convert arrays to Set/Map for repeated membership checks.

View →
mode

js-tosorted-immutable

`.sort()` mutates the array in place, which can cause bugs with React state and props. Use `.toSorted()` to create a new sorted array without mutation.

View →
mode

NestJS Expert Mode

Expert in NestJS framework for building scalable Node.js server-side applications

View →
mode

Nuxt Expert Mode

Expert in Nuxt 3 for building Vue.js applications with SSR/SSG

View →
mode

Phoenix Framework Expert Mode

Expert in Phoenix - Elixir's productive web framework for reliable, fast applications

View →
mode

redux-expert-mode

Expert in Redux state management for React applications with modern patterns, best practices, and performance optimization

View →
mode

Remix Expert Mode

Expert in Remix framework for full-stack React applications

View →
mode

rendering-activity

Use React's `<Activity>` to preserve state/DOM for expensive components that frequently toggle visibility.

View →
mode

rendering-animate-svg-wrapper

Many browsers don't have hardware acceleration for CSS3 animations on SVG elements. Wrap SVG in a `<div>` and animate the wrapper instead.

View →
mode

rendering-conditional-render

Use explicit ternary operators (`? :`) instead of `&&` for conditional rendering when the condition can be `0`, `NaN`, or other falsy values that render.

View →
mode

rendering-content-visibility

Apply `content-visibility: auto` to defer off-screen rendering.

View →
mode

rendering-hoist-jsx

Extract static JSX outside components to avoid re-creation.

View →
mode

rendering-hydration-no-flicker

When rendering content that depends on client-side storage (localStorage, cookies), avoid both SSR breakage and post-hydration flickering by injecting a synchronous script that updates the DOM before React hydrates.

View →
mode

rendering-svg-precision

Reduce SVG coordinate precision to decrease file size. The optimal precision depends on the viewBox size, but in general reducing precision should be considered.

View →
mode

rerender-defer-reads

Don't subscribe to dynamic state (searchParams, localStorage) if you only read it inside callbacks.

View →
mode

rerender-dependencies

Specify primitive dependencies instead of objects to minimize effect re-runs.

View →
mode

rerender-derived-state

Subscribe to derived boolean state instead of continuous values to reduce re-render frequency.

View →
mode

rerender-functional-setstate

**Incorrect (requires state as dependency):**

View →
mode

rerender-lazy-state-init

Pass a function to `useState` for expensive initial values. Without the function form, the initializer runs on every render even though the value is only used once.

View →
mode

rerender-memo

Extract expensive work into memoized components to enable early returns before computation.

View →
mode

rerender-transitions

Mark frequent, non-urgent state updates as transitions to maintain UI responsiveness.

View →
mode

server-after-nonblocking

Use Next.js's `after()` to schedule work that should execute after a response is sent. This prevents logging, analytics, and other side effects from blocking the response.

View →
mode

server-cache-lru

`React.cache()` only works within one request. For data shared across sequential requests (user clicks button A then button B), use an LRU cache.

View →
mode

server-cache-react

Use `React.cache()` for server-side request deduplication. Authentication and database queries benefit most.

View →
mode

server-parallel-fetching

React Server Components execute sequentially within a tree. Restructure with composition to parallelize data fetching.

View →
mode

server-serialization

**Incorrect (serializes all 50 fields):**

View →
mode

SolidJS Expert Mode

Expert in SolidJS reactive framework with fine-grained reactivity and performance optimization

View →
mode

Svelte Expert Mode

Expert in Svelte and SvelteKit for building reactive web applications

View →
mode

tailwind-css-expert-mode

Expert in Tailwind CSS utility-first framework with custom configurations, component patterns, responsive design, and performance optimization

View →
mode

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

View →