Agent skill
t-sui
Server-rendered TypeScript UI framework. Use when building t-sui applications, creating UI components, handling forms with server actions, using data tables, setting up routes, or implementing WebSocket patches. Triggered by "t-sui", "server-rendered UI", "TypeScript UI framework", form handling, or data collation.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/t-sui
SKILL.md
t-sui Framework
Server-rendered UI framework for TypeScript. All HTML generation, business logic, and state management occur on the server. Interactivity achieved through server actions and WebSocket patches.
Quick Start
import ui from "./ui";
import { MakeApp, Context } from "./ui.server";
const app = MakeApp("en");
app.Page("/", function(ctx: Context): string {
return app.HTML("Home", "bg-gray-100",
ui.Div("p-8")(
ui.Div("text-2xl font-bold")("Hello World"),
),
);
});
app.Listen(1423);
Documentation Index
| Topic | File | Description |
|---|---|---|
| Core Concepts | CORE.md | Architecture, Context, Actions, Targets, server rendering |
| UI Components | COMPONENTS.md | Buttons, inputs, forms, tables, alerts, cards, tabs, etc. |
| Data Management | DATA.md | Data collation, search, sort, filter, pagination, helpers |
| Server Setup | SERVER.md | App initialization, routes, WebSocket, PWA, assets |
| Best Practices | PATTERNS.md | Testing, validation, security, state management patterns |
Core Philosophy
- Server-Centric Rendering - All HTML generated server-side as strings
- String-Based Components - Components are TypeScript functions returning HTML strings
- Action-Based Interactivity - User interactions trigger server handlers returning HTML
- WebSocket-Enhanced - Real-time updates via
/__wsendpoint - Type-Safe - Full TypeScript support with proper type definitions
Key Types
type Callable = (ctx: Context) => string // All handlers return HTML
type Attr = {
ID?: string;
Class?: string;
Value?: string;
OnClick?: string;
OnSubmit?: string;
// ... other HTML attributes
}
Common Imports
import ui from "./ui";
import { MakeApp, Context, Callable } from "./ui.server";
import { createCollate, TQuery, BOOL, SELECT } from "./ui.data";
Development Commands
npm run dev # Run examples (Node.js)
npm run dev:bun # Run examples (Bun)
npm run check # Type-check without emitting JS
npm test # Run Playwright tests
Runtime Support
- Node.js 18+ - Uses built-in
httpmodule - Bun 1.0+ - Uses native
serve()API for better performance
Both runtimes support WebSocket connections, session management, and form submissions.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?