Skip to main content
skill CX Codex

tanstack-table · oakoss — Claude Code skill: what it does, how to install

Guides React headless table architecture with TanStack Table v8, covering server pagination, filtering, and render bug prevention.

MIT 155 installs ★ 29 updated 2026-08-17

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add oakoss/agent-skills --skill tanstack-table -a claude-code
Open on GitHub

What tanstack-table does

The skill provides the coding agent with verified implementation rules for TanStack Table v8 in React. It guides setting up useReactTable, generating type-safe columns via createColumnHelper, and attaching necessary row models such as getCoreRowModel or getSortedRowModel.

It focuses on eliminating known errors: unstable array references triggering re-renders, outdated v7 methods, and wrong package imports from @tanstack/table-core. For React 19 setups, it applies the 'use no memo' directive to prevent compiler clashes.

Pinning parent column groups causes known layout bugs in v8, so the skill enforces pinning child columns individually.

What it helps with

  • configure server-side pagination and sorting with TanStack Query
  • fix infinite re-renders caused by unmemoized table data
  • implement virtualized table scrolling with TanStack Virtual
  • set up faceted filters with min-max and unique count models

Example prompts for the agent

  • Build a data table using TanStack Table v8 with server-side pagination and filters
  • Fix the infinite re-render loop in my useReactTable component
  • Add column pinning and resizing to the transactions table

How to install tanstack-table

1Skills CLI (Vercel)

npx skills add oakoss/agent-skills --skill tanstack-table -a claude-code

2Manually: put the files in place

~/.claude/skills/tanstack-table/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tanstack-table/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about tanstack-table

How to install tanstack-table in Claude Code?

Run npx skills add oakoss/agent-skills --skill tanstack-table -a claude-code in your terminal.

What does the tanstack-table skill do?

It gives your agent accurate architectural patterns for TanStack Table v8 in React, covering row models, server state syncing, and table debugging.

Why does the skill require 'use no memo'?

The React 19 Compiler is currently incompatible with v8 table internals. Adding 'use no memo' bypasses compiler optimization until official v9 fixes arrive.

Source text

SKILL.md · MIT
---
name: tanstack-table
description: |
  TanStack Table v8 headless data tables for React. Covers column definitions, sorting, filtering (fuzzy/faceted), server-side pagination with TanStack Query, infinite scroll, virtualization (TanStack Virtual), column/row pinning, row expanding/grouping, column resizing, and reusable Shadcn-styled components. Prevents 15 documented errors including infinite re-renders, React Compiler incompatibility, and server-side state mismatches.

  Use when building data tables, fixing table performance, implementing server-side pagination, adding filtering/sorting, or debugging table state issues.
license: MIT
metadata:
  author: oakoss
  version: '1.1'
  source: 'https://tanstack.com/table/latest/docs'
user-invocable: false
---

# TanStack Table

## Overview

TanStack Table is a **headless** table library — it provides state management and logic but no UI. You supply the rendering; it handles sorting, filtering, pagination, selection, and more.

**When to use:** Complex data tables with sorting/filtering/pagination, server-side data, large datasets (1000+ rows with virtualization), row selection/expanding/grouping.

**When NOT to use:** Simple static tables (use `<table>` directly), display-only lists (use a list component), spreadsheet-like editing (consider AG Grid).

## Quick Reference

| Pattern           | API / Config                                         | Key Points                                   |
| ----------------- | ---------------------------------------------------- | -------------------------------------------- |
| Basic table       | `useReactTable({ data, columns, getCoreRowModel })`  | Memoize data/columns to prevent re-renders   |
| Column helper     | `createColumnHelper<T>()`                            | Type-safe column definitions                 |
| Column groups     | `columnHelper.group({ header, columns })`            | Nested headers; don't pin group columns      |
| Sorting           | `getSortedRowModel()` + `onSortingChange`            | `manualSorting: true` for server-side        |
| Filtering         | `getFilteredRowModel()` + `onColumnFiltersChange`    | `manualFiltering: true` for server-side      |
| Pagination        | `getPaginationRowModel()` + `onPaginationChange`     | `manualPagination: true` + `pageCount`       |
| Row selection     | `enableRowSelection` + `onRowSelectionChange`        | Set `getRowId` for stable selection keys     |
| Column visibility | `onColumnVisibilityChange`                           | Toggle with `column.toggleVisibility()`      |
| Column pinning    | `enableColumnPinning` + `initialState.columnPinning` | Don't pin group columns (known bug)          |
| Row expanding     | `getExpandedRowModel()` + `getSubRows`               | For nested/tree data                         |
| Column resizing   | `enableColumnResizing` + `columnResizeMode`          | `onChange` for live, `onEnd` for performant  |
| Row grouping      | `getGroupedRowModel()` + `aggregationFn`             | Performance degrades at 10k+ rows            |
| Server-side       | `manual*: true` flags + include state in queryKey    | All state in query key for proper refetching |
| Infinite scroll   | `useInfiniteQuery` + flatten pages                   | Combine with TanStack Virtual for best perf  |
| Virtualization    | `useVirtualizer` from `@tanstack/react-virtual`      | Disable when container hidden (tabs/modals)  |
| React 19 Compiler | `'use no memo'` directive                            | Required until v9 fixes compiler compat      |

## Common Operations

| Task              | Method                         |
| ----------------- | ------------------------------ |
| Sort column       | `column.toggleSorting()`       |
| Filter column     | `column.setFilterValue(value)` |
| First page        | `table.firstPage()`            |
| Next page         | `table.nextPage()`             |
| Previous page     | `table.previousPage()`         |
| Last page         | `table.lastPage()`             |
| Go to page        | `table.setPageIndex(n)`        |
| Select row        | `row.toggleSelected()`         |
| Hide column       | `column.toggleVisibility()`    |
| Get original data | `row.original`                 |
| Pin column        | `column.pin('left')`           |
| Resize column     | `header.getResizeHandler()`    |
| Expand row        | `row.toggleExpanded()`         |

## Row Models

| Import                   | Purpose                 |
| ------------------------ | ----------------------- |
| `getCoreRowModel`        | Required                |
| `getSortedRowModel`      | Sorting                 |
| `getFilteredRowModel`    | Filtering               |
| `getPaginationRowModel`  | Pagination              |
| `getExpandedRowModel`    | Expanding               |
| `getGroupedRowModel`     | Grouping                |
| `getFacetedRowModel`     | Faceted filter counts   |
| `getFacetedUniqueValues` | Unique values per facet |
| `getFacetedMinMaxValues` | Min/max per facet       |

## Common Mistakes

| Mistake                                     | Correct Pattern                                            |
| ------------------------------------------- | ---------------------------------------------------------- |
| Unstable data/columns reference             | Memoize with `useMemo` or define outside component         |
| Missing `manual*` flags for server-side     | Set `manualPagination`, `manualSorting`, `manualFiltering` |
| Query key missing table state               | Include pagination, sorting, filters in queryKey           |
| Import from `@tanstack/table-core`          | Import from `@tanstack/react-table`                        |
| Using v7 `useTable` / `Header` / `accessor` | Use v8 `useReactTable` / `header` / `accessorKey`          |
| Pinning group columns                       | Pin individual columns within the group, not parent        |
| Grouping on 10k+ rows                       | Use server-side grouping or disable for large datasets     |
| Column filter not clearing on page change   | Reset `pageIndex` to 0 when filters change                 |
| Missing `'use no memo'` with React Compiler | Add directive to components using `useReactTable`          |
| Missing `getRowId` with row selection       | Set `getRowId: (row) => row.id` for stable selection keys  |
| Filter value type mismatch                  | Match value types; clear with `undefined`, not `null`      |

## Delegation

- **Table pattern discovery**: Use `Explore` agent
- **Server integration review**: Use `Task` agent
- **Code review**: Delegate to `code-reviewer` agent

> If the `tanstack-query` skill is available, delegate data fetching, caching, and infinite query patterns to it.
> If the `tanstack-virtual` skill is available, delegate standalone virtualization patterns to it.
> If the `tanstack-router` skill is available, delegate URL search param sync for server-side table state to it.
> If the `tanstack-start` skill is available, delegate server functions for server-side data loading to it.

## References

- [Column definitions, helpers, visibility, and selection](references/column-definitions.md)
- [Filtering: column, global, fuzzy, and faceted](references/filtering.md)
- [Server-side patterns with TanStack Query](references/server-side-patterns.md)
- [Infinite scroll with cursor pagination](references/infinite-scroll.md)
- [Reusable table components (Shadcn-styled)](references/reusable-components.md)
- [Virtualization for large datasets](references/virtualization.md)
- [Column and row pinning](references/column-row-pinning.md)
- [Row expanding and grouping](references/expanding-grouping.md)
- [Known issues and solutions (15 documented)](references/known-issues.md)
- [v7 to v8 migration guide](references/v7-migration.md)

© oakoss · MIT · oakoss/agent-skills

Similar skills

All skills for Frontend and UI →

tanstack-table by other authors comes first.

tanstack-table tanstack-skills This skill teaches the agent how to build headless tables with TanStack Table v8. It guides setup for sorting and filtering without render loops. CX Codex +1 5,700installs tanstack-table Claude Skills Maintainers Provides headless table patterns for TanStack Table with server pagination, sorting, and Cloudflare D1 integration. Useful when managing large datasets in React. CX Codex +1 520installs tanstack-vue-table-skilld skilld-dev tanstack-vue-table-skilld helps AI agents write and migrate @tanstack/vue-table v9 code. Enforces explicit tableFeatures, atom-based state, and clean Vue 3 reactivity patterns. CX Codex +1 144installs table-builder patricio0312rev table-builder generates data tables in React with sorting, filtering, pagination, and server or client rendering modes. CX Codex +1 293installs tanstack-virtual tanstack-skills Shows the agent how to wire up TanStack Virtual so only visible rows render in long lists, tables and grids. CX Codex +1 2,600installs tanstack-wasp-drone Legion Code Inc. tanstack-wasp-drone guides TanStack library integration inside SvelteKit applications running Svelte 5 runes. CX Codex ★ 96repo stars tanstack-vue-virtual-skilld skilld-dev The tanstack-vue-virtual-skilld skill guides Vue work with @tanstack/vue-virtual, from implementing virtual lists to debugging adapter usage. It also covers window scrolling and chat feeds anchored at the end. CX Codex +1 129installs table-generation lingzhi227 table-generation — a skill for Claude Code, Codex, Cursor and other platforms that converts JSON and CSV into publication-ready LaTeX tables with best-result highlighting, multirow layouts and captions. CX Codex +1 1,700installs

From the same set106

The whole set →
design-system This skill structures design systems around tokens, themes, and component APIs. Use it for dark mode, CVA variants, accessibility checks, and Storybook docs. CX Codex +1 160installs zustand Get guidance for Zustand v5 in React, from typed stores and middleware to SSR, tests, and migrations from Redux or Context. CX Codex +1 158installs tanstack-start Teaches your coding agent TanStack Start: server functions, SSR with streaming, middleware and deploy presets. Useful when you build a full-stack React app. CX Codex +1 156installs pglite Hands your coding agent the PGlite API: a WASM build of PostgreSQL 17.4 with storage backends, transactions, live queries and React hooks. CX Codex +1 156installs changesets The changesets skill manages package versions and changelogs in a monorepo. Use it to coordinate releases and publish packages to npm. CX Codex +1 154installs opentofu Get help writing and reviewing OpenTofu configurations and Pulumi programs. Use the skill to manage infrastructure code, state, and environment setups. CX Codex +1 153installs arktype-validation arktype-validation — a skill for ArkType, where schemas are TypeScript-shaped strings. Covers morphs, scopes and ArkEnv checks for environment variables. Handy for runtime validation that stays close to the type syntax. CX Codex +1 153installs tanstack-router tanstack-router adds guidance for type-safe file-based React routing with @tanstack/react-router. Useful for loaders, search param validation, and code splitting. CX Codex +1 150installs

Project sponsors

Companies that keep this analytics open