table-skill-generator
Generate a project-specific data table patterns skill. Use for frontend apps to document table/list handling. Triggers on: generate table skill, create table patterns, table-skill-generator.
Best use case
table-skill-generator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate a project-specific data table patterns skill. Use for frontend apps to document table/list handling. Triggers on: generate table skill, create table patterns, table-skill-generator.
Teams using table-skill-generator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/table-skill-generator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How table-skill-generator Compares
| Feature / Agent | table-skill-generator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate a project-specific data table patterns skill. Use for frontend apps to document table/list handling. Triggers on: generate table skill, create table patterns, table-skill-generator.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Table Skill Generator
Generate a project-specific `table-patterns` skill that documents exactly how data tables are built in THIS project.
---
## The Job
1. Read project context (`docs/project.json`)
2. Analyze existing table implementations
3. Ask clarifying questions about table patterns
4. Generate `docs/skills/table-patterns/SKILL.md`
5. Update `project.json` to record the generated skill
---
## Step 1: Read Project Context
```bash
cat docs/project.json
```
Look for:
- `apps[].type` — includes "frontend" or "fullstack"
- `stack.framework` — React, Vue, etc.
---
## Step 2: Analyze Existing Table Implementations
```bash
# Find table components
find . -type f \( -name "*Table*" -o -name "*DataGrid*" -o -name "*List*" \) -name "*.tsx" | grep -v node_modules | head -20
# Find table libraries
grep -E "@tanstack/react-table|ag-grid|react-table" package.json 2>/dev/null
# Find column definitions
grep -r "columnDef\|columns.*=\|ColumnDef" --include="*.tsx" | head -10
# Look at existing table
cat $(find . -type f -name "*Table*.tsx" | grep -v node_modules | head -1) 2>/dev/null | head -80
```
---
## Step 3: Clarifying Questions
```
I found the following table patterns:
Table Library: [detected]
UI Components: [detected]
Data Fetching: [detected]
Please confirm or correct:
1. What table library do you use?
A. TanStack Table (react-table)
B. AG Grid
C. Custom table components
D. shadcn/ui DataTable
E. Other: [specify]
2. How is data fetched?
A. Server Components (RSC)
B. Client-side fetch (SWR, React Query)
C. Server Actions
D. API routes
3. What table features do you need?
A. Basic display only
B. Sorting
C. Filtering
D. Pagination
E. All of the above
```
---
## Step 4: Generate the Skill
Create `docs/skills/table-patterns/SKILL.md`:
```markdown
---
name: table-patterns
description: "Build data tables with sorting, filtering, and pagination in [PROJECT_NAME]"
project-specific: true
generated-by: table-skill-generator
generated-at: [DATE]
---
# Table Patterns Skill
How to build data tables in this project.
---
## Quick Reference
| Task | Pattern |
|------|---------|
| Create table | Use DataTable + columns |
| Add sorting | Column header with sort button |
| Add filtering | Search input + URL params |
| Add pagination | Pagination component |
---
## Architecture
- **Table Library:** [TABLE_LIBRARY] (e.g., TanStack Table)
- **UI Components:** [UI_LIB] (e.g., shadcn/ui)
- **Data Fetching:** [FETCH_PATTERN] (e.g., Server Components)
---
## Basic Table Template
### Column Definitions
\`\`\`typescript
// components/entities/columns.tsx
'use client'
import { ColumnDef } from '@tanstack/react-table'
import { Entity } from '@/types'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import { MoreHorizontal, ArrowUpDown } from 'lucide-react'
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu'
export const columns: ColumnDef<Entity>[] = [
{
accessorKey: 'name',
header: ({ column }) => (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
Name
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
),
},
{
accessorKey: 'status',
header: 'Status',
cell: ({ row }) => {
const status = row.getValue('status') as string
return (
<Badge variant={status === 'active' ? 'default' : 'secondary'}>
{status}
</Badge>
)
},
},
{
accessorKey: 'createdAt',
header: 'Created',
cell: ({ row }) => {
return new Date(row.getValue('createdAt')).toLocaleDateString()
},
},
{
id: 'actions',
cell: ({ row }) => {
const entity = row.original
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" className="h-8 w-8 p-0">
<MoreHorizontal className="h-4 w-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => navigator.clipboard.writeText(entity.id)}>
Copy ID
</DropdownMenuItem>
<DropdownMenuItem>Edit</DropdownMenuItem>
<DropdownMenuItem className="text-red-600">Delete</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)
},
},
]
\`\`\`
### Data Table Component
\`\`\`typescript
// components/ui/data-table.tsx
'use client'
import {
ColumnDef,
flexRender,
getCoreRowModel,
getSortedRowModel,
getPaginationRowModel,
getFilteredRowModel,
useReactTable,
SortingState,
ColumnFiltersState,
} from '@tanstack/react-table'
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from '@/components/ui/table'
import { Input } from '@/components/ui/input'
import { Button } from '@/components/ui/button'
import { useState } from 'react'
interface DataTableProps<TData, TValue> {
columns: ColumnDef<TData, TValue>[]
data: TData[]
searchKey?: string
}
export function DataTable<TData, TValue>({
columns,
data,
searchKey,
}: DataTableProps<TData, TValue>) {
const [sorting, setSorting] = useState<SortingState>([])
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([])
const table = useReactTable({
data,
columns,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
getPaginationRowModel: getPaginationRowModel(),
getFilteredRowModel: getFilteredRowModel(),
onSortingChange: setSorting,
onColumnFiltersChange: setColumnFilters,
state: {
sorting,
columnFilters,
},
})
return (
<div>
{searchKey && (
<div className="flex items-center py-4">
<Input
placeholder="Search..."
value={(table.getColumn(searchKey)?.getFilterValue() as string) ?? ''}
onChange={(event) =>
table.getColumn(searchKey)?.setFilterValue(event.target.value)
}
className="max-w-sm"
/>
</div>
)}
<div className="rounded-md border">
<Table>
<TableHeader>
{table.getHeaderGroups().map((headerGroup) => (
<TableRow key={headerGroup.id}>
{headerGroup.headers.map((header) => (
<TableHead key={header.id}>
{header.isPlaceholder
? null
: flexRender(
header.column.columnDef.header,
header.getContext()
)}
</TableHead>
))}
</TableRow>
))}
</TableHeader>
<TableBody>
{table.getRowModel().rows?.length ? (
table.getRowModel().rows.map((row) => (
<TableRow key={row.id}>
{row.getVisibleCells().map((cell) => (
<TableCell key={cell.id}>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</TableCell>
))}
</TableRow>
))
) : (
<TableRow>
<TableCell colSpan={columns.length} className="h-24 text-center">
No results.
</TableCell>
</TableRow>
)}
</TableBody>
</Table>
</div>
<div className="flex items-center justify-end space-x-2 py-4">
<Button
variant="outline"
size="sm"
onClick={() => table.previousPage()}
disabled={!table.getCanPreviousPage()}
>
Previous
</Button>
<Button
variant="outline"
size="sm"
onClick={() => table.nextPage()}
disabled={!table.getCanNextPage()}
>
Next
</Button>
</div>
</div>
)
}
\`\`\`
### Page Component
\`\`\`typescript
// app/entities/page.tsx
import { createClient } from '@/lib/supabase/server'
import { columns } from './columns'
import { DataTable } from '@/components/ui/data-table'
export default async function EntitiesPage() {
const supabase = await createClient()
const { data: entities } = await supabase
.from('entities')
.select('*')
.order('created_at', { ascending: false })
return (
<div className="container py-10">
<h1 className="text-2xl font-bold mb-6">Entities</h1>
<DataTable columns={columns} data={entities ?? []} searchKey="name" />
</div>
)
}
\`\`\`
---
## Server-Side Pagination
For large datasets, paginate on the server:
### Page Component
\`\`\`typescript
// app/entities/page.tsx
import { createClient } from '@/lib/supabase/server'
interface Props {
searchParams: { page?: string; limit?: string; search?: string }
}
export default async function EntitiesPage({ searchParams }: Props) {
const page = parseInt(searchParams.page ?? '1')
const limit = parseInt(searchParams.limit ?? '20')
const search = searchParams.search ?? ''
const supabase = await createClient()
let query = supabase
.from('entities')
.select('*', { count: 'exact' })
if (search) {
query = query.ilike('name', \`%\${search}%\`)
}
const { data: entities, count } = await query
.range((page - 1) * limit, page * limit - 1)
.order('created_at', { ascending: false })
return (
<div className="container py-10">
<DataTable
columns={columns}
data={entities ?? []}
pageCount={Math.ceil((count ?? 0) / limit)}
currentPage={page}
/>
</div>
)
}
\`\`\`
### URL-Based Pagination
\`\`\`typescript
// components/ui/data-table-pagination.tsx
'use client'
import { useRouter, useSearchParams } from 'next/navigation'
import { Button } from '@/components/ui/button'
interface PaginationProps {
pageCount: number
currentPage: number
}
export function DataTablePagination({ pageCount, currentPage }: PaginationProps) {
const router = useRouter()
const searchParams = useSearchParams()
const setPage = (page: number) => {
const params = new URLSearchParams(searchParams)
params.set('page', page.toString())
router.push(\`?\${params.toString()}\`)
}
return (
<div className="flex items-center justify-between py-4">
<span className="text-sm text-muted-foreground">
Page {currentPage} of {pageCount}
</span>
<div className="flex gap-2">
<Button
variant="outline"
size="sm"
onClick={() => setPage(currentPage - 1)}
disabled={currentPage <= 1}
>
Previous
</Button>
<Button
variant="outline"
size="sm"
onClick={() => setPage(currentPage + 1)}
disabled={currentPage >= pageCount}
>
Next
</Button>
</div>
</div>
)
}
\`\`\`
---
## Column Types
### Text Column
\`\`\`typescript
{
accessorKey: 'name',
header: 'Name',
}
\`\`\`
### Sortable Column
\`\`\`typescript
{
accessorKey: 'name',
header: ({ column }) => (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
Name
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
),
}
\`\`\`
### Date Column
\`\`\`typescript
{
accessorKey: 'createdAt',
header: 'Created',
cell: ({ row }) => format(new Date(row.getValue('createdAt')), 'PPP'),
}
\`\`\`
### Badge/Status Column
\`\`\`typescript
{
accessorKey: 'status',
header: 'Status',
cell: ({ row }) => (
<Badge variant={row.getValue('status') === 'active' ? 'default' : 'secondary'}>
{row.getValue('status')}
</Badge>
),
}
\`\`\`
### Actions Column
\`\`\`typescript
{
id: 'actions',
cell: ({ row }) => <EntityActions entity={row.original} />,
}
\`\`\`
---
## Checklist
When creating a data table:
- [ ] Define columns with proper accessors
- [ ] Add sorting for relevant columns
- [ ] Add search/filter if needed
- [ ] Add pagination (client or server)
- [ ] Add actions dropdown
- [ ] Handle empty state
- [ ] Handle loading state
- [ ] Test with various data sizes
```
---
## Step 5: Update project.json
Add to `skills.generated[]`:
```json
{
"name": "table-patterns",
"generatedFrom": "table-skill-generator",
"generatedAt": "2026-02-20"
}
```Related Skills
technology-stack-blueprint-generator
Comprehensive technology stack blueprint generator that analyzes codebases to create detailed architectural documentation. Automatically detects technology stacks, programming languages, and implementation patterns across multiple platforms (.NET, Java, JavaScript, React, Python). Generates configurable blueprints with version information, licensing details, usage patterns, coding conventions, and visual diagrams. Provides implementation-ready templates and maintains architectural consistency for guided development.
tailored-resume-generator
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
tableau-cleanup
Clean up Tableau workbooks by standardizing captions, adding comments, and organizing into folders.
mermaid-diagram-generator
Creates Mermaid diagrams for flowcharts, sequence diagrams, ERDs, and architecture visualizations in markdown. Use when users request "Mermaid diagram", "flowchart", "sequence diagram", "ERD diagram", or "architecture diagram".
fullstory-stable-selectors
Framework-agnostic guide for implementing stable, semantic selectors in any web application. Solves the dynamic class name problem caused by CSS-in-JS, CSS Modules, and build tools. Includes patterns for React, Angular, Vue, Svelte, Next.js, Astro, and more. Future-proofed for Computer User Agents (CUA) and AI-powered automation tools. Provides TypeScript patterns, naming taxonomies, and enterprise-scale conventions.
fullstack-template-generator
Generates a complete fullstack application template with Python FastAPI backend and React Vite frontend. Includes OpenAI ChatGPT integration, CORS configuration, comprehensive error handling, and a modern Tailwind CSS + shadcn/ui React UI. Use this skill when the user wants to bootstrap a new fullstack web application project with both API backend and web frontend components ready to go.
doc-generator
Generate professional Word documents with formatted text, tables, and layouts using Claude and Anthropic's docx skill
copilot-instructions-blueprint-generator
Technology-agnostic blueprint generator for creating comprehensive copilot-instructions.md files that guide GitHub Copilot to produce code consistent with project standards, architecture patterns, and exact technology versions by analyzing existing codebase patterns and avoiding assumptions.
claude-md-generator
Automatically generates claude.md files for new folders/modules following hierarchical structure. Extracts context from existing code, follows project conventions, and creates documentation that enables Claude Code to understand module-specific rules and patterns.
checklist-generator
Generate context-aware quality checklists for code review and QA using IEEE 1028 base standards plus LLM contextual additions
card-generator
创建可下载的卡片式宣传网页/海报。当用户需要制作产品介绍卡片、教程卡片、知识科普卡片、小红书风格图文、PPT式滑动展示页时使用。支持多种预设模板(科技风、简约风、渐变风、暗黑风等),生成包含React+SVG的单HTML文件,内置ZIP打包下载功能。
canifi-skill-generator
Self-evolving skill that enables Canifi to create, install, and manage new skills autonomously