kortix-ui
它能做什么
这项技能指导 AI 使用 @kortix/ui React 库构建界面,例如聊天视图、会话工作区和仪表盘。适合构建 Kortix 风格应用或自定义仪表盘的开发人员。
适用场景
- ✓你使用 @kortix/ui 库构建 React 页面或组件的时候。
- ✓你想要与 Kortix 风格一致的聊天或会话视图的时候。
- ✓你构建连接到 Kortix SDK 的自定义仪表盘的时候。
技能链接
https://github.com/kortix-ai/suna/blob/dev/packages/ui/skills/kortix-ui/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请使用 @kortix/ui 构建一个 React 页面,包含聊天视图和项目侧边栏。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会一次性设置样式和 provider,然后组合现成的组件,而不是自己编写。它会按照库的指南处理每个部分。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
@kortix/ui
@kortix/ui is the one React component library for every Kortix surface: apps/web, Kortix Apps, the
white-label demo and SDK customer apps. Components are Tailwind v4 class strings that read CSS variables.
Docs: https://kortix.com/docs/developers#kortix-ui. Live catalog: https://kortix.com/design-system.
Install: npm i @kortix/ui @kortix/sdk, the same version of each (peers: references/custom-dashboard.md).
Module entries and @kortix/ui/theme need 0.14.4+. Inside kortix-ai/suna: "workspace:*". Never copy component source.
1. Set up once
- Styles. A Tailwind v4 host:
@import 'tailwindcss'; @import '@kortix/ui/tailwind.css';in its main CSS, plus the optional peerstw-animate-css,tailwind-scrollbar,tailwind-scrollbar-hide. A host without Tailwind imports@kortix/ui/styles.cssonce: every class the package uses, none of yours. - Fonts.
@kortix/ui/fonts.css(Roobert) is for Kortix-owned surfaces only. A white-label host never imports it. - Mount once at the root:
QueryClientProvider,UiProvider(link,navigation: your router,observesHistory: trueunder Next.js;components: host slots, a missing slot hides its control;config:managedModelsEnabled,connectorsEnabled,terminalEnabled,cliConnectEnabled,publicSharesEnabled,commandPaletteShortcut,settingsShortcut,accountApiEnabled;resolvePreviewUrl;useBrand: your marks;i18n,strings,image,useViewerId: without it no sender name or "Stopped by" shows),IconProvider(@kortix/ui/icon-provider), one<Toaster />(@kortix/ui/toast).setUiTelemetry(@kortix/ui) once at module load. Dark mode isdarkon<html>. SDKbillingEnabledstays off (Kortix's app only). - Ids, never route params.
SessionThread,SessionWorkspaceandProjectHomemountSessionIdsProviderand the SDK project scope themselves. A block outside them:KortixProjectProvider(@kortix/sdk/react) andSessionIdsProvider(projectId,sessionId) around it. Links followsetUiRoutes(@kortix/ui): map each page you do not serve tonull. - Import by subpath:
import { Modal } from '@kortix/ui/modal'. The root@kortix/ui(section 7) needs no@kortix/sdk.
2. Compose before you create
| Job | Compose | Subpath |
|---|---|---|
| Dialog or sheet | Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, ModalFooter |
modal |
| Destructive action | ConfirmDialog before the mutation, never a single click |
confirm-dialog |
| Tooltip on an icon button | Hint label="…" |
hint |
| Toast after a mutation | successToast, errorToast, infoToast, warningToast, loadingToast |
toast |
| Status chip; count beside a label | Badge size="sm"; CountBadge (waiting, reminder, conflict, neutral) |
badge, count-badge |
| Inline alert | InfoBanner tone="…" title="…" |
info-banner |
| Pending spinner | Loading (default export) |
loading |
| Expand and collapse | Disclosure, DisclosureTrigger, DisclosureContent |
disclosure |
| Form field; search field | Field, FieldLabel, FieldGroup, FieldDescription with Input, Textarea, Select; InputGroupSearch |
field, input-group |
| Panel; buttons side by side | Card and its slots, or bg-popover rounded-md border px-4 py-5; ButtonGroup |
card, button-group |
| Tabs and filters | Tabs, TabsList, TabsListCompact |
tabs |
| Menu, picker, palette | DropdownMenu, Popover, Command |
dropdown-menu, popover, command |
| Table and empty list | Table; Empty with one muted line |
table, empty |
A new primitive is the last step: tokens only, a small API, and a section on /design-system.
3. Banned
| Never | Use |
|---|---|
Dialog / DialogContent in feature code |
Modal |
Tooltip primitives in feature code |
Hint |
toast() from sonner, toast.success() |
the toast helpers and <Toaster />, all from @kortix/ui/toast; a host needs no sonner import |
An icon with animate-spin, CircleNotchIcon, SpinnerIcon |
Loading |
A hand-rolled chip <span> or a colored banner |
Badge, InfoBanner |
SectionCard, List / ListRow |
Card, <ul className="space-y-2"> rows |
lucide-react or another icon set |
@phosphor-icons/react, *Icon names, no weight prop (only weight="fill" for solid status glyphs) |
| A fork or a restyled copy of a component | the component as it ships; the |
常见问题
我需要 Tailwind 吗?
该包的样式是为 Tailwind v4 构建的。如果不使用 Tailwind,技能要求只需导入一次完整的样式文件。
我应该复制组件代码吗?
不应该。技能要求安装该包,绝不复制其组件源代码。
它只适用于 Kortix 的产品吗?
它是为 Kortix 界面构建的,但安装了它的自定义仪表盘和白标应用也可以使用。
详情
作者的原始描述
Build React UI with @kortix/ui, the Kortix component library and the whole Kortix session experience as modules (session workspace, thread, composer, side panel, files, file viewer, terminal, project sidebar and home, customize pages): Kortix Apps, white-label hosts, custom dashboards on @kortix/sdk and apps/web. Load before you write a component, a page, a chat or session view, a custom dashboard or App, or a className in a React host that renders Kortix UI, or when you theme Kortix components for another brand. Covers setup, the module map, which component to compose, banned primitives, toke
repo: kortix-ai/suna
热度
- GitHub 星标
- 20k
- 排名
- #10387
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
claude-code
20k帮你的智能体把编写代码、审查或规划任务交给 Anthropic 的 Claude Code CLI,并保存结果以便检查。
codex-cli
20k帮你的智能体把编写代码或审查任务交给 OpenAI 的 Codex CLI,并取回结果,让第二个模型检查工作。
commit-dis
20k帮你的智能体把本次对话中的修改保存为当前 Git 分支上的一次提交,不推送,也不创建新分支。
composio
20k帮你的智能体使用 Composio 连接 Gmail、Slack、GitHub 和 Notion 等应用,服务于你自己的智能体或你开发的产品。