admin-data-table

A set of rules for building paginated administrator list and table pages, including the frontend query hooks and backend paging contract.

In plain words
What is it for?
Use it when adding an admin table, connecting a paged query, or implementing paginated repositories and endpoints. It covers server-side and client-side pagination, shared types, and stable sorting.
Why use it?
It prevents different pages and API layers from handling page sizes, response types, sorting, and scrolling in inconsistent ways.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/vod-studio/violet/admin-data-table
Any agent
npx skills add VOD-Studio/violet --skill admin-data-table
Clone the repo
git clone --depth 1 https://github.com/VOD-Studio/violet

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 778 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00068 $0.00778
Opus 5 $0.00034 $0.00389
Sonnet 5 $0.00014 $0.00156
Haiku 4.5 $0.00007 $0.00078

Measured 2d ago against content hash dda486767784, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

admin-data-table scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/admin-data-table/SKILL.md · 46 lines

What it actually says

Admin 列表页接入规范

Hook 选择

场景 用法
服务端分页表格 usePagedQuery(useListHook, baseQuery?, options?)
客户端全量切片 useClientPagination(data, initialPageSize?)
需全量的下拉(如角色选择) useAllRoles 模式:limit=100 + select 解包
  • 落位看消费方:跨 feature 的通用分页 hook 放 web/src/features/admin-shared/ui/data-table/hooks/(扩展既有 hook,见下);单一 feature 私有的分页 hook 放该 feature 的 hooks/ 目录。useAllRoles 模式即后者(如 admin-roles/api/queries.ts),不在 data-table 下。
  • usePagedQuery 内管 page/pageSize 状态、拼 PageQuery 调模块 hook,返回的 pagination 在 JSX 直接 pagination={pagination} 消费。
  • 无额外筛选的页面省略 baseQuery
  • 要新的分页形态,扩展 hook 本身,不在页面组件手搓变体。
  • 默认每页 DEFAULT_PAGE_SIZE(导出自 use-paged-query.ts);页面需要偏离默认时显式传 initialPageSize(如 posts 页传 10),不复制常量值。

类型约定

  • 请求类型 extends PageQueryshared/api/types.ts)。
  • 响应统一 PagedResponse<T>(httpClient 拦截器解包后的形态)。
  • API client / queries / query keys 统一收 PageQuery 对象,不散写 page/limit 参数。

后端契约

  • 唯一真相在 api/internal/domain/shared/paging.goPageQuery / PageResult[T](钳制范围与默认值以源码为准)。
  • 仓储统一签名 FindPage(ctx, shared.PageQuery) (shared.PageResult[T], error);GORM 层复用 countAndFind helper。
  • ORDER BY 必须带唯一列 tiebreaker(id ASC)——相同排序键的行在 offset 翻页间会漂移。
  • admin 端点用 RespondPaged;公开端点(如 tags)无分页参数时返回全量数组保持前台兼容,带参才 paged。

min-h-0 滚动链

表格内部自适应滚动依赖一条 CSS 高度链,每层 min-h-0 缺一不可:

main (overflow-hidden) → PageShell 内容区 → 页面内容 wrapper → DataTable 根 → 卡片 → OverlayScroll

任一层丢失 min-h-0min-height:auto 会把内容自然高度向上传导,max-h-full 失效,表格退化为整页滚动、表头滚走。

验证方式:浏览器探针断言 .os-hostscrollHeight > clientHeight(内层滚动生效),且页面级滚动不因表格高度被撑开。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 46 lines · 68 tokens per session scan A dda486767784

Subscribe to this mod's changes

admin-data-table is a skill published in the GitHub repository VOD-Studio/violet (2 stars, last pushed 2d ago), licensed MIT. It adds 68 tokens to every session and 778 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

openspec-sync-specs

Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.

cedricziel/truenas-mcp · 38 tokens

testing-the-mcp-server

Test the libtmux-go MCP server end to end — drive the real binary over raw JSON-RPC, run the exhaustive advertised-schema gate, and point installed agent CLIs (Claude, Codex, Cursor, Gemini, grok, agy, opencode) at a local build. Use when verifying the server beyond go test, checking a branch works in a real client…

libtmux/libtmux-go · 145 tokens

dark-memory

Use for governance, memory, drift detection, and audit trail via dark-memory-mcp. Covers 52 canonical + 3 red-team tools across 16 namespaces: session lifecycle, agentmemory CRUD+search, vibe-flow spec/artifact publish + drift, LLM-as-judge, delegation+mindset, research, observability, error observatory, governance…

Opita-Code/dark-memory-mcp · 353 tokens

audit-network-security

../../../.github/skills/audit-network-security/SKILL.md.

gordcurrie/unifi-mcp · 0 tokens

ddd-go-backend

Build production-ready Go backend services following DDD-layered architecture. Covers project scaffolding, config (Viper), database (GORM + MySQL/PostgreSQL), object storage (S3/MinIO), OAuth2 + JWT auth, OpenTelemetry tracing + Jaeger visualization, Zap logging, middleware patterns, and API routing. Use when creating…

LSTM-Kirigaya/jinhui-skills · 98 tokens

openspec-update-change

Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the user wants to revise a change's plan, fold new decisions into it, or reconcile its artifacts after an edit. Never edits code.

cedricziel/truenas-mcp · 55 tokens