tanstack-vue-table-skilld — скилл для Claude Code: как установить
Скилл tanstack-vue-table-skilld обучает агента правилам @tanstack/vue-table v9: явной регистрации фич в tableFeatures, атомарному состоянию и миграции с v8. Пригодится при сборке headless-таблиц на Vue 3.
MIT 144 установок ★ 186 обновлён 2026-10-10
npx skills add skilld-dev/vue-ecosystem-skills --skill tanstack-vue-table-skilld -a claude-codeЧто делает tanstack-vue-table-skilld
Пакет @tanstack/vue-table версии 9 меняет привычный подход к таблицам в Vue 3: вместо неявного базового слоя здесь требуется объявлять каждую возможность через tableFeatures. Скилл загружает в контекст модели набор правил по архитектуре v9. Он объясняет агенту, как передавать реактивные данные через ref или computed без разворачивания .value, как рендерить разметку через компонент FlexRender и как настраивать серверную пагинацию с параметром rowCount.
Внутри v9 состояние построено на атомах через @tanstack/store. Скилл следит, чтобы чтение table.atoms.* происходило строго внутри отслеживаемых границ шаблона или computed. Также он предотвращает мутацию массивов через push или splice, потому что внутренние изменяемые атомы используют shallowRef.
Этот скилл рассчитан только на v9 и требует Node не ниже 20, а также Vue от версии 3.2. Старый код на базе useVueTable и onStateChange нужно сначала переписать по правилам миграции, иначе агент попытается вызывать уже несуществующие в v9 методы.
Какие задачи решает
- настроить таблицу через
useTableиtableFeaturesдля Vue 3 - переписать компоненты с
@tanstack/vue-tablev8 на v9 - связать атомарное состояние таблицы с
computedи реактивнымиref - отрисовать ячейки и заголовки через компонент
FlexRender - настроить виртуализацию строк вместе с
@tanstack/virtual
Примеры запросов агенту
- Создай таблицу на
@tanstack/vue-tablev9 с сортировкой и пагинацией черезtableFeatures - Переведи компонент таблицы с v8 на v9: замени
useVueTableнаuseTableи обнови состояние - Настрой серверную пагинацию для таблицы Vue 3 с ручным подсчётом строк через
rowCount
Как установить tanstack-vue-table-skilld
1Через Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill tanstack-vue-table-skilld -a claude-code2Вручную: положить файлы
~/.claude/skills/tanstack-vue-table-skilld/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/tanstack-vue-table-skilld/
1Через Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill tanstack-vue-table-skilld -a codex2Вручную: положить файлы
.agents/skills/tanstack-vue-table-skilld/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill tanstack-vue-table-skilld -a cursor2Вручную: положить файлы
.cursor/skills/tanstack-vue-table-skilld/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install skilld-dev/vue-ecosystem-skills skills/tanstack-vue-table-skilld2Вручную: положить файлы
.github/skills/tanstack-vue-table-skilld/SKILL.md1Через Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill tanstack-vue-table-skilld -a gemini-cli2Командой платформы
gemini skills install https://github.com/skilld-dev/vue-ecosystem-skills --path skills/tanstack-vue-table-skilldВручную: положить файлы
.devin/skills/tanstack-vue-table-skilld/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill tanstack-vue-table-skilld -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о tanstack-vue-table-skilld
Как установить tanstack-vue-table-skilld в Claude Code?
Выполните команду npx skills add skilld-dev/vue-ecosystem-skills --skill tanstack-vue-table-skilld -a claude-code. Она добавит скилл в настройки платформы.
Зачем нужен этот скилл?
Он помогает агенту генерировать код строго по спецификации @tanstack/vue-table v9, избегая устаревших паттернов v8 и ошибок с реактивностью Vue 3.
Работает ли скилл со старой версией TanStack Table v8?
Нет, скилл предназначен только для девятой версии. Для работы также требуются Node 20 или выше, vue >=3.2 и пакет @tanstack/store ^0.11.1.
Исходный текст
SKILL.md · MIT
---
name: tanstack-vue-table-skilld
description: Use when writing, migrating, or debugging code that imports @tanstack/vue-table (TanStack Table v9 for Vue). Covers useTable with explicit tableFeatures, reactive ref/computed data, FlexRender rendering, atoms-based state, createTableHook conventions, and the v8-to-v9 breaking changes.
license: MIT
---
# @tanstack/vue-table 9.2.4
Headless table adapter for Vue 3. Re-exports all of `@tanstack/table-core` 9.2.4 plus Vue bindings: `useTable`, `FlexRender`, `flexRender`, `createTableHook` (`dist/index.d.ts:4-5`).
Environment limits: `vue >=3.2` peer dependency, Node >=20, runtime dep `@tanstack/store ^0.11.1` (`package.json:34-53`).
This Skill targets v9 only. Code using `useVueTable`, `getCoreRowModel()`, or `onStateChange` is v8; migrate it first with [Migration v8 to v9](./references/migration-v8-to-v9.md).
## Quick start
```vue
<script setup lang="ts">
import { ref } from 'vue'
import { FlexRender, tableFeatures, useTable } from '@tanstack/vue-table'
type Person = { name: string; age: number }
const features = tableFeatures({})
const columns = [
{ accessorKey: 'name', header: 'Name' },
{ accessorKey: 'age', header: 'Age' },
]
const data = ref<Person[]>([{ name: 'Ada', age: 36 }])
const table = useTable({ features, columns, data })
</script>
<template>
<table>
<thead>
<tr v-for="group in table.getHeaderGroups()" :key="group.id">
<th v-for="header in group.headers" :key="header.id">
<FlexRender v-if="!header.isPlaceholder" :header="header" />
</th>
</tr>
</thead>
<tbody>
<tr v-for="row in table.getRowModel().rows" :key="row.id">
<td v-for="cell in row.getAllCells()" :key="cell.id">
<FlexRender :cell="cell" />
</td>
</tr>
</tbody>
</table>
</template>
```
Source: `skills/getting-started/SKILL.md` (shipped in the package).
## Add features explicitly
Every feature beyond core must be registered, and each row-model slot follows its prerequisite feature in the same `tableFeatures` call. The core row model is automatic; there is no `getCoreRowModel()` option.
```ts
import {
createSortedRowModel,
rowSortingFeature,
sortFn_alphanumeric,
tableFeatures,
} from '@tanstack/vue-table'
const features = tableFeatures({
rowSortingFeature,
sortedRowModel: createSortedRowModel(),
sortFns: { alphanumeric: sortFn_alphanumeric },
})
```
APIs are feature-gated: a missing `table.atoms.pagination` means `rowPaginationFeature` was not registered. Full feature and slot list: [API surface](./references/api.md).
## State in one place per slice
State is atom-based. Read it inside a tracked boundary (template, `computed`, `watch`, or `table.Subscribe`); a bare read is only a snapshot.
```ts
const pageIndex = computed(() => table.atoms.pagination.get().pageIndex)
```
Controlled slices need a reactive `state` plus the matching `on[State]Change` callback that resolves value-or-function updaters:
```ts
const pagination = ref<PaginationState>({ pageIndex: 0, pageSize: 20 })
const state = computed(() => ({ pagination: pagination.value }))
const onPaginationChange = (next: PaginationState | ((old: PaginationState) => PaginationState)) => {
pagination.value = typeof next === 'function' ? next(pagination.value) : next
}
// pass state and onPaginationChange to useTable
```
Own each slice exactly once: internal default, `initialState`, external `atoms`, or `state` + callback. Never both `atoms.pagination` and `state.pagination`. `onStateChange` no longer exists; observe `table.store` instead. Details: [API surface](./references/api.md).
## Rules that prevent most bugs
1. Pass `data` as a `ref`/`computed`, never `data.value` (`dist/useTable.d.ts:13-19`). Update it by replacing the array (`.value = [...]`); in-place `push`/`splice` is not tracked because writable atoms use `shallowRef` (`dist/reactivity.js:50-52`).
2. Keep `features` and `columns` stable; do not rebuild arrays per render.
3. Render through `FlexRender` shorthand: `:cell`, `:header`, `:footer`. The legacy `:render`/`:props` form still compiles but is the migration target, not the default (`dist/FlexRender.d.ts:28-41`).
4. Never destructure or spread row/cell/column/header methods; they are prototype methods using `this`. Use `row.getValue('name')`, not `const read = row.getValue`.
5. In JSX, pass `table.Subscribe` its render function as the explicit `children` prop; Vue JSX children become slots (`dist/useTable.d.ts:9-11`).
6. For server-driven tables set the `manual*` option (`manualPagination: true`) and pass `rowCount`.
7. Optional `stockFeatures` bundles everything; use it only as a temporary audit bridge, not production.
## Common mistakes
- HIGH: renaming `useVueTable` to `useTable` while keeping `getSortedRowModel` options. Move row models and registries into `tableFeatures` (`skills/migrate-v8-to-v9/SKILL.md:156-159`).
- HIGH: `useTable({ data: data.value })` freezes one snapshot; pass `data` (`skills/getting-started/SKILL.md:85-99`).
- HIGH: reading `table.atoms.sorting.get()` outside a tracked boundary; wrap in `computed` (`skills/table-state/SKILL.md:104-116`).
- HIGH: assigning the updater function itself (`pagination.value = next`) instead of resolving it first (`skills/table-state/SKILL.md:146-161`).
- HIGH: `columnPinning.left`/`right` no longer exist; v9 uses `start`/`end` logical pinning (`skills/migrate-v8-to-v9/SKILL.md:99-120`).
- HIGH: `createColumnHelper<Person>()` now needs features first: `createColumnHelper<typeof features, Person>()` (`skills/migrate-v8-to-v9/SKILL.md:147-148`).
## Reusable app conventions
For app-wide table defaults, use `createTableHook({ features, tableComponents, cellComponents, headerComponents })` to get `useAppTable`, `createAppColumnHelper`, and typed context hooks (`dist/createTableHook.d.ts:136-153`). Export the context hook with an explicit type to avoid circular inference when registered components import the hook module (`skills/create-table-hook/SKILL.md:62-84`).
## Integrations
- TanStack Query: manual pagination with reactive keys, `rowCount`, computed data passthrough. [Integrations](./references/integrations.md)
- TanStack Virtual: virtualize `table.getRowModel().rows`, never the source array. [Integrations](./references/integrations.md)
## References
- [API surface](./references/api.md): exports, subpaths, `useTable`/`Subscribe` types, features and slots, atoms model.
- [Migration v8 to v9](./references/migration-v8-to-v9.md): full breaking-change map, pinning renames, TypeScript changes, checklist.
- [Integrations](./references/integrations.md): TanStack Query and TanStack Virtual composition patterns.
## Also in the package
The package ships its own agent skills under `skills/` (getting-started, table-state, migrate-v8-to-v9, create-table-hook, with-tanstack-query, with-tanstack-virtual) and mentions `npx @tanstack/intent@latest install` to wire them into coding agents (`README.md:70-78`). Verify exact APIs in the installed `node_modules/@tanstack/vue-table/dist/index.d.ts`; do not reconstruct v9 from v8 memory.
© skilld-dev · MIT · skilld-dev/vue-ecosystem-skills