ktui-datatable

ktui-datatable is a skill for Claude Code, Codex from keenthemes/ktui. It costs 56 tokens per session (2,679 once invoked), scanned A, original, MIT.

A guide to KtUI’s DataTable component, which displays rows of information in a web page. It covers local or remote data, sorting, filtering, page navigation, checkbox selection, saved table settings, fixed layouts, and events.

In plain words
What is it for?
Create tables, connect them to a remote data URL, transform requests and responses, add sorting and filtering, configure pagination and selection, save table state, and respond to table events.
Why use it?
It helps developers build or fix tables without guessing the required HTML attributes, configuration options, or response mapping for data loaded from an API.

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/keenthemes/ktui/ktui-datatable
Any agent
npx skills add keenthemes/ktui --skill ktui-datatable
Clone the repo
git clone --depth 1 https://github.com/keenthemes/ktui

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 ktui-datatable

README.md
[![agentmods](https://agentmods.dev/badge/skills/keenthemes/ktui/ktui-datatable.svg)](https://agentmods.dev/skills/keenthemes/ktui/ktui-datatable)
Your own site
<a href="https://agentmods.dev/skills/keenthemes/ktui/ktui-datatable"><img src="https://agentmods.dev/badge/skills/keenthemes/ktui/ktui-datatable.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,679 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.00056 $0.02679
Opus 5 $0.00028 $0.01340
Sonnet 5 $0.00011 $0.00536
Haiku 4.5 $0.00006 $0.00268

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

Security

Grade A, and why

ktui-datatable 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 4d 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.

skills/ktui-datatable/SKILL.md · 303 lines

How it starts

The opening of the file, as written. The whole thing — 303 lines — stays where its author put it; the contents beside it link to each section on GitHub.

KTDataTable — AI Agent Reference

Full reference for the DataTable component in KtUI. Package: @keenthemes/ktui. Class: KTDataTable. Root attribute: data-kt-datatable.

Always prefer ktui.io/docs/datatable docs and examples over guessing markup or options.


1. Basic Usage

<div data-kt-datatable="true">
  <table>
    <thead>
      <tr>
        <th data-kt-datatable-column="name">Name</th>
        <th data-kt-datatable-column="email">Email</th>
      </tr>
    </thead>
    <tbody></tbody>
  </table>
</div>
import { KTDataTable } from '@keenthemes/ktui';

const dt = KTDataTable.getInstance(tableEl);

2. Config Options

Option Type Description
apiEndpoint string Remote data URL
requestMethod string HTTP method (default 'POST')
requestHeaders object Custom headers
mapResponse function Transform API response
mapRequest function Transform request params
pageSize number Rows per page
pageSizes number[] Page size options
stateSave boolean Persist state in localStorage
columns object Column config (render, checkbox, sortType, sortValue, createdCell)
sort object Sort config with classes and callback
search object Search config with delay and callback
pagination object Pagination markup config
loading object Spinner template
checkbox object Row checkbox config (checkedClass, preserveSelection)
lockedLayout object Sticky headers/columns
tableLayout string 'fixed' for fixed column widths (use with <colgroup>)
filter object Column filter config (type, value)
infoEmpty string Empty state HTML (supports innerHTML)

3. Programmatic API

const dt = KTDataTable.getInstance(tableEl);

dt.sort('name');
dt.sort('name', 'desc');           // explicit sort order
dt.goPage(2);
dt.setPageSize(25);
dt.search('query');
dt.setFilter({ column: 'status', type: 'text', value: 'active' });
dt.reload();        // re-fetch from API
dt.redraw();        // re-render current data
dt.getState();      // { page, sortField, sortOrder, pageSize, ... }
dt.check(value);    // check a row by value
dt.uncheck(value);  // uncheck a row by value
dt.getChecked();    // get array of checked row values
dt.dispose();

Read the full file on GitHub · 303 lines

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. 4d ago First seen · 303 lines · 56 tokens per session scan A 8a614f04b6f1

Subscribe to this mod's changes

ktui-datatable is a skill published in the GitHub repository keenthemes/ktui (149 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 2,679 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-30.

Related

Other skills, from other repositories

magic-ui

Use this skill when users want to add, customize, or troubleshoot Magic UI components in React/Next.js projects. It covers component selection, shadcn registry installation (@magicui/), integration patterns, and practical quality checks for accessibility and maintainability.

magicuidesign/magicui · 56 tokens

onejs-setup-and-overview

Use this skill whenever the user wants to build or set up user interface in a Unity project using OneJS, React, TypeScript, or JSX, e.g. 'add a main menu to my game', 'build a settings screen', 'make a HUD', 'set up OneJS', 'my OneJS panel is blank', 'the UI is not hot reloading'. Covers confirming OneJS is installed…

Singtaa/OneJS · 199 tokens

coss-particles

Index of all COSS UI particle examples. Use when implementing UI features to find copy-paste-ready component patterns built on coss primitives. Each particle has a description and a JSON URL for easy installation.

cosscom/coss · 46 tokens

coss

Helps implement coss UI components correctly. Use when building UIs with coss primitives and patterns (buttons, dialogs, selects, forms, menus, tabs, segmented controls, inputs, toasts, etc.), migrating from shadcn/Radix to coss/Base UI, composing trigger-based overlays, or troubleshooting coss component behavior.…

cosscom/coss · 85 tokens

ui-beats

Use this skill when users want to add, customize, or troubleshoot UI Beats components in React/Next.js projects. It covers component selection, shadcn registry installation from uibeats.com, the UI Beats MCP server, motion and reduced-motion handling, and integration patterns for animated sections.

nikhils4/ui-beats · 62 tokens

morphous-catalog

Create or refresh Morphous website design-system/theme bundles from animal, insect, plant, landscape, mineral, weather, or other nature motifs. Use when Codex is asked to generate Morphous motif images, light/dark design-system boards, reusable image prompts, generated web assets, shadcn/tweakcn theme exports, or the…

Ameyanagi/morphos · 79 tokens