Globales Ranking · von 601 Skills
tanstack-virtual AI Agent Skill
Quellcode ansehen: oakoss/agent-skills
SafeInstallation
npx skills add oakoss/agent-skills --skill tanstack-virtual 50
Installationen
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-tableskill 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-tableIf the
tanstack-queryskill is available, delegate data fetching and infinite query patterns to it.
Otherwise, recommend:npx skills add oakoss/agent-skills --skill tanstack-query
References
Installationen
Sicherheitsprüfung
Quellcode ansehen
oakoss/agent-skills
Mehr aus dieser Quelle
Power your AI Agents with
the best open-source models.
Drop-in OpenAI-compatible API. No data leaves Europe.
Explore Inference APIGLM
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
So verwenden Sie diesen Skill
Install tanstack-virtual by running npx skills add oakoss/agent-skills --skill tanstack-virtual in your project directory. Führen Sie den obigen Installationsbefehl in Ihrem Projektverzeichnis aus. Die Skill-Datei wird von GitHub heruntergeladen und in Ihrem Projekt platziert.
Keine Konfiguration erforderlich. Ihr KI-Agent (Claude Code, Cursor, Windsurf usw.) erkennt installierte Skills automatisch und nutzt sie als Kontext bei der Code-Generierung.
Der Skill verbessert das Verständnis Ihres Agenten für tanstack-virtual, und hilft ihm, etablierte Muster zu befolgen, häufige Fehler zu vermeiden und produktionsreifen Code zu erzeugen.
Was Sie erhalten
Skills sind Klartext-Anweisungsdateien — kein ausführbarer Code. Sie kodieren Expertenwissen über Frameworks, Sprachen oder Tools, das Ihr KI-Agent liest, um seine Ausgabe zu verbessern. Das bedeutet null Laufzeit-Overhead, keine Abhängigkeitskonflikte und volle Transparenz: Sie können jede Anweisung vor der Installation lesen und prüfen.
Kompatibilität
Dieser Skill funktioniert mit jedem KI-Coding-Agenten, der das skills.sh-Format unterstützt, einschließlich Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider und anderen Tools, die projektbezogene Kontextdateien lesen. Skills sind auf Transportebene framework-agnostisch — der Inhalt bestimmt, für welche Sprache oder welches Framework er gilt.
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.