Agents & OrchestrationSûr100100/100
Create Table Hook (TanStack) — Svelte Table
Define a Svelte createAppTable/createAppColumnHelper using the adapter's rune-capable createTableHook implementation, shared features/defaults, reactive per-table getters, optional App component registries, and typed table/cell/header context hooks.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs create-table-hook__tanstack-table__packages-svelte-table-skills-7a7293ebae48TanStack
TanStack/table
Contenu à copier
---
name: create-table-hook
description: >
Define a Svelte createAppTable/createAppColumnHelper using the adapter's rune-capable createTableHook implementation, shared features/defaults, reactive per-table getters, optional App component registries, and typed table/cell/header context hooks.
metadata:
origin: TanStack
type: framework
library: '@tanstack/svelte-table'
framework: svelte
library_version: '9.2.4'
requires:
- '@tanstack/table-core#core'
- getting-started
- table-state
sources:
- 'TanStack/table:docs/framework/svelte/guide/composable-tables.md'
- 'TanStack/table:examples/svelte/composable-tables'
- 'TanStack/table:packages/svelte-table/src/createTableHook.svelte.ts'
---
This skill builds on `@tanstack/table-core#core`, `getting-started`, and `table-state`. Use it when multiple tables share conventions; keep one-off tables on `createTable`.
## Setup
Use the shipped `createTableHook`; its implementation is rune-capable. The app hook module itself may be a normal `.ts` module, as in the maintained example.
```ts
import {
createTableHook,
rowSortingFeature,
tableFeatures,
} from '@tanstack/svelte-table'
export const {
createAppTable,
createAppColumnHelper,
useTableContext,
useCellContext,
useHeaderContext,
} = createTableHook({
features: tableFeatures({ rowSortingFeature }),
})
```
```svelte
<script lang="ts">
import { createAppColumnHelper, createAppTable } from './app-table.svelte'
type Person = { name: string }
const helper = createAppColumnHelper<Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])
let data = $state<Person[]>([{ name: 'Ada' }])
const table = createAppTable({
columns,
get data() {
return data
},
})
</script>
```
## Core Patterns
### Register reusable components once
Pass stable `tableComponents`, `cellComponents`, and `headerComponents` to `createTableHook`. Render them through the returned `AppTable`, `AppCell`, and `AppHeader` wrappers so their typed context hooks have a provider.
### Prefer context inside registered components
```ts
import { useCellContext } from './app-table.svelte'
const cell = useCellContext<string>()
const value = cell.getValue()
```
This avoids prop drilling and keeps feature/component types bound to the app hook.
## Common Mistakes
### CRITICAL Reimplementing the rune-aware hook
Wrong:
```ts
// app-table.ts
export function createAppTable(options) {
return constructTable(options)
}
```
Correct:
```ts
// app-table.ts
export const { createAppTable } = createTableHook({ features })
```
The shipped implementation supplies Svelte rune reactivity, option synchronization, wrappers, and context plumbing that a plain core wrapper omits.
Source: `packages/svelte-table/src/createTableHook.svelte.ts`
### HIGH Freezing per-table rune inputs
Wrong:
```ts
const table = createAppTable({ columns, data })
```
Correct:
```ts
const table = createAppTable({
columns,
get data() {
return data
},
})
```
Shared defaults are static, but each table must still expose current reactive values.
Source: `docs/framework/svelte/guide/composable-tables.md`
### HIGH Reading context outside its wrapper
Wrong:
```ts
const cell = useCellContext()
```
Correct:
```svelte
<table.AppCell {cell}><cell.TextCell /></table.AppCell>
```
Context helpers require the matching App wrapper in the rendered ancestor tree.
Source: `packages/svelte-table/src/createTableHook.svelte.ts`
### MEDIUM Abstracting a single table too early
Wrong:
```ts
const hook = createTableHook({ features: tableFeatures({}) })
```
Correct:
```ts
const table = createTable({
features: tableFeatures({}),
columns,
get data() {
return data
},
})
```
Use the hook for recurring app conventions, not merely to rename standalone construction.
Source: `docs/framework/svelte/guide/composable-tables.md`
## API Discovery
Inspect `node_modules/@tanstack/svelte-table/dist/createTableHook.svelte.d.ts` and the `App*.svelte` wrappers for exact returned helpers and component contracts.Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait Create Table Hook (TanStack) — Svelte Table
Applique les pratiques du skill create-table-hook__tanstack-table__packages-svelte-table-skills-7a7293ebae48.
Comment utiliser Create Table Hook (TanStack) — Svelte Table
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour Create Table Hook (TanStack) — Svelte Table
Dis simplement à ton agent quelque chose comme :
Applique le skill create-table-hook__tanstack-table__packages-svelte-table-skills-7a7293ebae48 à cette tâche
Utilise create-table-hook__tanstack-table__packages-svelte-table-skills-7a7293ebae48 pour améliorer cette implémentation
Passe en revue ce sujet avec create-table-hook__tanstack-table__packages-svelte-table-skills-7a7293ebae48
Skills liés à Create Table Hook (TanStack) — Svelte Table
Acceleration (Microsoft)
Compare synthetic acceleration options and clearly separate scenario value from forecast commitments.Account Overview (Microsoft)
Create a synthetic Acme account overview and identify evidence that merits seller attention.Acroform Writer (Microsoft)
Use this skill whenever the user wants values written INTO an existing PDF form that lives in the connected SharePoint knowledge source — filling out, completing, populating, or submitting a fillable PDF (application, intake sheet, contract, government form) from data they supply, a spreadsheet row, or the conversation. Triggers include "fill out the job application form", "complete the intake form for [person]", "populate our standard NDA template", and "make this ready to send / non-editable" (flatten). The source form should be found via knowledge search; only ask the user to upload it if knowledge search turns up nothing plausible. different task), and do NOT use it on scanned/image-only PDFs that have no real fillable fields — those need OCR or manual overlay instead, which this skill explicitly detects and reports rather than silently failing.