violet: Skill for Claude Code

.agents/skills/admin-data-table/SKILL.md

admin-data-table is a skill for Claude Code, Codex from VOD-Studio/violet. It costs 68 tokens per session (778 once invoked), scanned A, original, MIT.

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

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is VOD-Studio/violet's own configuration. It tells Claude Code and Codex how to work on violet itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything violet configures →

Reuse

Borrowing it

Nothing to install: this file belongs to VOD-Studio/violet. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/VOD-Studio/violet/release/2.0/.agents/skills/admin-data-table/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/VOD-Studio/violet

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for admin-data-table

README.md
[![agentmods](https://agentmods.dev/badge/skills/vod-studio/violet/admin-data-table/github.svg)](https://agentmods.dev/skills/vod-studio/violet/admin-data-table)
Your own site
<a href="https://agentmods.dev/skills/vod-studio/violet/admin-data-table"><img src="https://agentmods.dev/badge/skills/vod-studio/violet/admin-data-table/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for admin-data-table

Your own site · 80×15
<a href="https://agentmods.dev/skills/vod-studio/violet/admin-data-table"><img src="https://agentmods.dev/badge/skills/vod-studio/violet/admin-data-table.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00068 $0.00778
Opus 5.5 $0.00027 $0.00311
Sonnet 5.5 $0.00014 $0.00156
Haiku 4.5 $0.00007 $0.00078

Measured 2mo ago against content hash dda486767784, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 PageQuery(shared/api/types.ts)。
  • 响应统一 PagedResponse<T>(httpClient 拦截器解包后的形态)。
  • API client / queries / query keys 统一收 PageQuery 对象,不散写 page/limit 参数。

后端契约

  • 唯一真相在 api/internal/domain/shared/paging.go:PageQuery / 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-0,min-height:auto 会把内容自然高度向上传导,max-h-full 失效,表格退化为整页滚动、表头滚走。

验证方式:浏览器探针断言 .os-host 的 scrollHeight > 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. 2mo 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 (4 stars, last pushed yesterday), licensed MIT. It adds 68 tokens to every session and 778 once invoked, about $0.0003 per session on Opus 5.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

admin-data-table compared with skills from other repositories

admin-data-table next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
admin-data-tableVOD-Studio/violetSkill4yesterdayMITA68Claude Code, Codex
ddd-go-backendLSTM-Kirigaya/jinhui-skillsSkill242mo agononeA98Claude Code, Codex
build-teaql-appteaql/teaql-agent-kitSkill2.8kyesterdayMITA112Codex
design-mcp-servercyanheads/obsidian-mcp-serverSkill7026d agoApache-2.0A62Claude Code
api-telemetrycyanheads/obsidian-mcp-serverSkill7026d agoApache-2.0A85Claude Code
api-servicescyanheads/obsidian-mcp-serverSkill7026d agoApache-2.0A32Claude Code
api-gatewayTheBeardedBearSAS/claude-craftSkill1073d agoMITA43Claude Code