#601

Global Rank · of 601 Skills

tanstack-virtual AI Agent Skill

View Source: oakoss/agent-skills

Safe

Installation

npx skills add oakoss/agent-skills --skill tanstack-virtual

50

Installs

TanStack Virtual

Overview

TanStack Virtual is a headless UI utility for virtualizing large lists, grids, and tables. It renders only the visible items in the viewport, dramatically reducing DOM nodes and improving performance for datasets with thousands of rows. Framework adapters are available for React, Vue, Solid, Svelte, Lit, and Angular.

When to use: Rendering thousands of rows or columns, building virtualized tables, implementing infinite scroll, displaying large datasets where DOM node count impacts performance.

When NOT to use: Small lists under ~100 items (no performance benefit), server-rendered static content, layouts where all items must be in the DOM for SEO or accessibility, simple pagination (render one page at a time instead).

Quick Reference

Pattern API Key Points
Vertical list useVirtualizer({ count, getScrollElement, estimateSize }) Wrap items in absolute-positioned container
Horizontal list useVirtualizer({ horizontal: true, ... }) Use getTotalSize() for width instead of height
Grid layout Row virtualizer + column virtualizer Two virtualizer instances sharing one scroll element
Dynamic sizing ref={virtualizer.measureElement} Set data-index on each element
Window scroller useWindowVirtualizer({ count, estimateSize }) No getScrollElement needed
Scroll to item virtualizer.scrollToIndex(index) Supports align: 'start' | 'center' | 'end' | 'auto'
Scroll to offset virtualizer.scrollToOffset(px) Supports align and behavior: 'smooth'
Custom keys getItemKey: (index) => items[index].id Stable keys improve measurement cache
Overscan overscan: 5 Renders extra items outside viewport (default: 1)
Gap between items gap: 8 Space between virtualized items in pixels
Multi-lane layout lanes: 3 Masonry-style column layouts
Padding paddingStart: 100, paddingEnd: 100 Space before first and after last item
RTL support isRtl: true Right-to-left horizontal scrolling
Range extractor rangeExtractor: (range) => [...] Customize rendered indices (sticky headers, footers)
Disable virtualizer enabled: false Renders nothing, resets internal state
Force remeasure virtualizer.measure() Call after external layout changes

Common Mistakes

Mistake Correct Pattern
Missing overflow: auto on scroll container Parent element must have overflow: auto and a fixed height/width
Using virtualItem.index as React key Use virtualItem.key which accounts for dynamic reordering
Forgetting position: relative on inner container The total-size container must be position: relative
Not setting data-index with measureElement Dynamic measurement requires data-index={virtualItem.index} on each element
Setting estimateSize too small for dynamic items Overestimate to prevent scroll jumping; use largest expected size
Recreating getScrollElement on every render Use a ref callback: () => parentRef.current
Not using getTotalSize() for container dimensions Inner container height/width must equal virtualizer.getTotalSize()
Absolute positioning without transform Use transform: translateY(item.start) for GPU-accelerated positioning
Using contain: strict without fixed dimensions contain: strict requires explicit width and height on the scroll container
Using with React Compiler without opting out Add 'use no memo' directive to components using useVirtualizer — interior mutability breaks memoization

Delegation

If the tanstack-table skill is available, delegate data table virtualization to it. TanStack Table has built-in virtualization integration.
Otherwise, recommend: npx skills add oakoss/agent-skills --skill tanstack-table

If the tanstack-query skill is available, delegate data fetching and infinite query patterns to it.
Otherwise, recommend: npx skills add oakoss/agent-skills --skill tanstack-query

References

Installs

Installs 50
Global Rank #601 of 601

Security Audit

ath Safe
socket Safe
Alerts: 0 Score: 90
snyk Low
EU EU-Hosted Inference API

Power your AI Agents with the best open-source models.

Drop-in OpenAI-compatible API. No data leaves Europe.

Explore Inference API

GLM

GLM 5

$1.00 / $3.20

per M tokens

Kimi

Kimi K2.5

$0.60 / $2.80

per M tokens

MiniMax

MiniMax M2.5

$0.30 / $1.20

per M tokens

Qwen

Qwen3.5 122B

$0.40 / $3.00

per M tokens

How to use this skill

1

Install tanstack-virtual by running npx skills add oakoss/agent-skills --skill tanstack-virtual in your project directory. Run the install command above in your project directory. The skill file will be downloaded from GitHub and placed in your project.

2

No configuration needed. Your AI agent (Claude Code, Cursor, Windsurf, etc.) automatically detects installed skills and uses them as context when generating code.

3

The skill enhances your agent's understanding of tanstack-virtual, helping it follow established patterns, avoid common mistakes, and produce production-ready output.

What you get

Skills are plain-text instruction files — not executable code. They encode expert knowledge about frameworks, languages, or tools that your AI agent reads to improve its output. This means zero runtime overhead, no dependency conflicts, and full transparency: you can read and review every instruction before installing.

Compatibility

This skill works with any AI coding agent that supports the skills.sh format, including Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider, and other tools that read project-level context files. Skills are framework-agnostic at the transport level — the content inside determines which language or framework it applies to.

Data sourced from the skills.sh registry and GitHub. Install counts and security audits are updated regularly.

EU Made in Europe

Chat with 100+ AI Models in one App.

Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.

Customer Support