Communitygithub.com

evalix098/tiktoklive

为 TanStack Start + React + Tailwind v4 + shadcn/Radix 应用设计并构建精良、非模板化的 UI。在创建或重新设计任何界面时使用——包括页面、落地页、仪表盘、表单、弹窗、导航以及游戏覆盖层(开始画面、HUD、菜单)。涵盖设计令牌、布局、排版、色彩、间距、动效以及避免输出显得“AI 味十足”的反模板规则。触发词:'design', 'UI', 'make it look good', 'polish', 'landing page', 'theme', 'style', 'redesign', 'ugly', 'clean up'。

tiktoklive 是什么?

该技能(evalix098/tiktoklive)旨在为基于 TanStack Start、React、Tailwind v4 与 shadcn/Radix 的应用打造专业、高档且不显模板化的用户界面。它适用于所有 DOM / 覆盖层 UI 场景,如页面、浏览器 Chrome、HUD、菜单和表单;对于 3D 游戏的游戏画布,则应与单独的 `building-games` 技能配合使用。技能要求首先建立以 `@theme` 为载体的设计令牌系统(色彩、圆角、字体),然后通过 Tailwind 工具类和 Radix 原语的 shadcn/ui 组件进行组合。它包含一套严格的反“AI 味”规则,禁止渐变大色块、表情图标、手绘 SVG 占位图以及混乱的布局;并强制要求 ≤5 种颜色、≤2 种字体、基于 4/8 的间距尺度、移动优先(390px)布局和细致的动效(150–250ms、尊重 `prefers-reduced-motion`)。该技能还涵盖了与游戏覆盖层搭配的注意事项,并提供了详细的完成清单,确保每次交互都经过打磨、可访问且无卡顿。

兼容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/evalix098/tiktoklive/tree/HEAD/.grok/skills/design-ui

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

设计与 UI

打造看起来有意图且高级的界面,而不是模板化的通用界面。这是应用构建器中最重要的质量杠杆。将其应用于 DOM / 覆盖层 UI — 页面、浏览器 chrome、HUD、菜单、表单。(对于 3D 游戏玩法画布,请参阅 building-games 技能;本技能管辖覆盖在其之上的 DOM UI。)

深入阅读 references/ 目录(按需加载——不要全部内联):

  • references/refined-ui.md — 完整的产品 chrome/覆盖层设计系统。
  • references/typography.md — 字体尺度、搭配、节奏。
  • references/surfaces.md — 层级、边框、阴影、分层。
  • references/animations.md — 动效、缓动、过渡。
  • references/performance.md — 保持 UI 流畅(60fps,无卡顿)。

1. 设计系统优先(在编写任何样式之前这样做)

先定义系统,然后从系统中组合。永远不要随意使用临时值。

  • CSS 中的令牌(Tailwind v4 是 CSS 优先)。 在 src/styles.css 的 @theme 中将调色板、圆角和字体定义为 CSS 变量;通过 Tailwind 工具类来使用它们。保持单一事实来源。
    @import "tailwindcss";
    @theme {
      --color-bg: #0b0b0f;      --color-surface: #16161d;
      --color-fg: #e7e7ea;      --color-muted: #a0a0ab;
      --color-primary: #14b8a6; --color-border: #26262f;
      --radius: 0.75rem;        --font-sans: "Inter", system-ui, sans-serif;
    }
    
  • 使用 shadcn/ui 组件(Radix 原语 + cva 变体 + tailwind-merge)来构建按钮、对话框、下拉菜单、输入框等。它们具有可访问性和一致性。将它们生成到 src/components/ui 中;通过令牌设置样式,不要使用内联十六进制颜色。
  • Tailwind v4 基础修复——按钮需要指针光标。 v4 的 Preflight 使 <button> 使用 cursor: default,这感觉像是有问题的。在 src/styles.css 中一次性添加以下代码,以便按钮/可点击角色显示指针:
    @layer base {
      button:not(:disabled),
      [role="button"]:not(:disabled) { cursor: pointer; }
    }
    
  • 禁止临时样式: JSX 中不得出现原始十六进制颜色,不得有 text-white/bg-black 字面量,不得使用像 p-[16px] 或 text-[13px] 这样的任意值。如果需要某个值,它必须成为一个令牌或尺度步进。

2. 量化规则(防止“丑”的廉价规则)

  • 总共 ≤ 3–5 种颜色(一个主色 + 中性色 + 最多一个强调色)。无随机额外色调。除非被要求,否则不要默认使用紫色。
  • ≤ 2 种字体族(通常是一种)。可以将展示/标题字体与正文字体配对,或者只使用一种。
  • 正文字体行高 1.4–1.6;大标题行高更紧凑。
  • 当你覆盖背景颜色时,也要同时覆盖前景/文本颜色(对比度必须保持——同时检查亮色和暗色模式)。
  • 移动优先:先设计约 390px 的布局,然后向上扩展。无水平溢出;触摸目标 ≥ 44px。
  • 一致的空间尺度(基于 4/8)。慷慨的留白优于拥挤。
  • 一个强调色,适度使用用于主要操作——而不是到处使用。

3. 反“AI 味”(那些让输出显得模板化的特征——避免它们)

  • 无渐变色块填充,无作为内容替代的巨大 hero 渐变。
  • 无表情符号作为图标——使用真正的图标集(lucide-react)。
  • 无手绘 SVG 插图/地图/图表——使用真正的库(图表用 recharts)或真正的生成图像。
  • 最终产品中无占位图 / 灰色 Lorem 占位框——生成真正的图像或使用真实内容;对 canvas 图像设置 crossOrigin="anonymous"。
  • 避免过度使用的字体外观(仅默认系统字体,或 Comic Sans 级别的字体选择)。
  • 每个元素都要有它存在的理由。 削减装饰性噪音。建立一个系统,然后有意图地变化——而不是随机变化。
  • 在编辑现有应用时,匹配已有的 UI;不要引入第二种视觉语言。

4. 布局与层级

  • 清晰的视觉层级:每个视图一个主要操作;大小/粗细/颜色表达重要性。参见 references/typography.md 和 references/surfaces.md。
  • 使用真正的布局结构(网格/弹性容器、容器最大宽度),而不是绝对定位的 hack。对齐到一致的网格。
  • 空状态、加载状态和错误状态是设计的一部分——不要发布空白/卡顿的中间状态。

5. 动效(微妙、有目的)

  • 短暂、缓和的过渡(150–250ms)用于悬停/按下/进入;尊重 prefers-reduced-motion。详细内容见 references/animations.md。
  • 永远不要以导致卡顿的方式动画化布局;优先使用 transform/opacity。

6. 游戏覆盖层(当此技能与 building-games 配合使用时)

游戏画布由 building-games 管理。本技能为 DOM 覆盖层 设置样式:开始/“点击以播放”画面、HUD、分数、菜单、暂停、移动端控件。保持覆盖层在画布上可读(背景遮罩、对比度),并使其远离指针锁定/游戏输入路径。


完成清单(在您认为 UI 完成之前)

  • 在 @theme 中定义了令牌;JSX 中没有临时十六进制颜色 / 任意值。
  • ≤ 5 种颜色,≤ 2 种字体,一致的空间尺度。
  • 对比度保持;在覆盖背景的地方同时覆盖了前景色。
  • 移动端(约 390px)无溢出;触摸目标 ≥ 44px。
  • 使用真正的图标/图像/图表——没有反“AI 味”的特征。
  • 处理了加载/空/错误状态;动效微妙且支持减少动效模式。
  • 在浏览器中渲染并肉眼检查过(参见 AGENTS.md 验证),而不仅仅是 curl 测试。

Individual skills in this repo

This repo contains 17 individual skills — each has its own dedicated page.

evalix098/tiktoklive

Add user accounts and sign-in to this TanStack Start app. Use when the app needs authentication, sign-in, user accounts, protected routes, or per-user data. Triggers on "auth", "login", "log in", "sign in", "sign up", "account", "users", "authentication", "protected", "who is logged in", "current user", "per-user".

evalix098/tiktoklive

Build browser games and interactive/canvas/3D experiences in this TanStack Start + React app. Use for any game, simulation, or WebGL/Canvas experience — 2D or 3D, single-player. Covers the game loop & timing, 3D orientation/camera conventions, collision, performance, assets, audio, save, game feel, and per-genre playbooks. For WASD / vehicle / flight **input signs and inverted A/D**, open the **`controls`** skill — do not rely on this file or racing-kart alone. Triggers on "game", "minecraft", "fps", "platformer", "racing", "tetris", "snake", "shooter", "3d", "three.js", "canvas", "voxel", "physics".

evalix098/tiktoklive

Player-facing input signs for browser games: WASD, vehicles, flight, FPS mouse-look, and the #1 failure mode (inverted A/D). Mandatory control self-tests and a tiny test interface so you can verify A turns left before shipping. Load for ANY game with movement, steering, flying, driving, tanks, boats, mechs, drones, planes, karts, third-person follow cams — not only racing. Triggers on "controls", "WASD", "inverted", "steer", "flight", "airplane", "kart", "vehicle", "yaw", "roll", "pitch", "mouse look", "A/D".

evalix098/tiktoklive

Deep guide for game ANIMATION assets: motion cycles, action keyframes, effect sequences, and animation sprite sheets — built around a video-first pipeline. In this app-builder sandbox, execute via the video2dsprite / generate2dsprite skills (magenta + scripts), not ad-hoc ffmpeg. Use whenever generating anything that moves: walk/run cycles, attacks, idles, FX, flags, fire, animation sheets. Complements game-asset-core.

evalix098/tiktoklive

Core discipline for ANY game-asset generation with Imagine tools: the engine-ready defaults users don't state, spec checklists, style anchoring, read-back verification, honest defect flagging. Use whenever generating any game art (sprites, sheets, animations, tiles, UI, FX) — then ALSO load the matching specialist skill: game-animation-frames for anything that moves, game-tilesets for tiles/terrain, game-character-consistency for recurring characters, game-ui-icons for UI and icons.

evalix098/tiktoklive

Deep guide for CHARACTER IDENTITY across images: turnarounds (front/side/ back), state and damage variants, palette swaps, equipment changes, and same-character-in-context sets. Use whenever generating character turnarounds, character sheets, variants of an existing sprite, or any same-subject multi-image set. Complements game-asset-core.

evalix098/tiktoklive

Deep guide for game TILE assets: seamless tileable textures, terrain transition tilesets, autotiles, and ground/platform tiles. Use whenever generating tileable textures, tilesets, terrain transitions, or seamless patterns. Complements game-asset-core.

evalix098/tiktoklive

Deep guide for game UI assets: buttons with interaction states, panels, bars, wordmark logos, and icon sets. Use whenever generating game UI elements, HUD assets, inventory icons, icon sets, buttons, or title logos. Complements game-asset-core.

evalix098/tiktoklive

Generate production-oriented 2D game maps with `imagine_text_to_image`: RPG/top-down maps, side-scroller parallax stages, tilemaps, layered raster maps, prop packs, collision zones, and walkable areas. Use when building browser games that need real map art (not pure code-drawn tiles), layered props, or map collision metadata. Triggers on "map", "level", "stage", "tilemap", "overworld", "dungeon", "side scroller background", "prop pack", "2D map".

evalix098/tiktoklive

Generate and postprocess 2D game sprites and animation sheets: pixel-art characters, NPCs, creatures, spells, projectiles, impacts, props, summons, and transparent PNG/GIF exports. Use when building browser games that need real sprite sheets (not code-drawn placeholders), matching a map art style, or producing magenta-background sheets for chroma-key cleanup. Triggers on "sprite", "sprite sheet", "animation sheet", "pixel art character", "walk cycle", "attack animation", "projectile sprite", "2D game asset".

evalix098/tiktoklive

How to use the Imagine tools in Grok Build: imagine_text_to_image, imagine_image_to_image, imagine_reference_to_image, imagine_text_to_video, imagine_image_to_video, imagine_reference_to_video, and render_file for chat previews. When to build a visual with code instead of generating it, prompt-craft, reference-first handling of real people, factual grounding, and asset-consistency. Load this whenever generating or editing an image or video is on the table. Tool-usage-driven, not triggered by a user merely mentioning images.

evalix098/tiktoklive

Peer-to-peer realtime multiplayer over WebRTC data channels: every user of the deployed app connects directly to every other user (full mesh), the server only brokers the handshake at /api/rtc. Lowest possible latency, zero per-message server cost. Use for 2-8 player co-op/casual realtime: shared cursors, drawing, party games, casual action. Triggers: p2p, peer to peer, webrtc, low latency multiplayer, direct connection.

evalix098/tiktoklive

Use Neon Postgres (the database) in this TanStack Start app. Use when the app needs to store or query data, persist state, or keep per-user data. Triggers on "database", "Postgres", "Neon", "save data", "store data", "persist", "tables", "SQL", "query", "migrations".

evalix098/tiktoklive

Share-link previews and app identity for apps on *.grok.me: the injector-owned og:image card, the SVG favicon, and PWA icons for installable apps. Use when scaffolding, renaming, or restyling the app — and for share / unfurl / OG / Twitter card questions. A custom 1200×630 card from the app's own art is the default — games of every kind (DOM board/word games included), whimsical apps, creative tools, and brand-forward pages; only plain utilities keep the placeholder. Always run the brand-asset pass as a `task` subagent and never wait for it. Triggers on "share", "rename", "app name", "OG", "Open Graph", "twitter card", "unfurl", "og:image", "og:type", "x:game:image", "x-banner", "link preview", "social card", "thumbnail", "preview image", "favicon", "app icon", "PWA", "manifest", "installable", "home screen", "SEO", "meta description".

evalix098/tiktoklive

Official Three.js API and TSL (Three.js Shading Language) reference for LLM code generation. Load when writing or debugging three.js / WebGL / WebGPU / custom materials / shaders / GLTF / advanced three APIs beyond basic game loop/controls. Prefer building-games for game correctness (loop, WASD, camera, orientation); use this skill for full API/TSL depth. Triggers on "three.js", "threejs", "WebGPU", "TSL", "NodeMaterial", "shader", "GLTF", "MeshStandard", "OrbitControls", "WebGLRenderer".

evalix098/tiktoklive

Grok Build only. Turn a 2D character still into denser animation sprites via imagine_text_to_image base → imagine_image_to_video (6s/10s run-in-place) → ffmpeg frames → magenta chroma-key → dense sampled strips/grids/GIFs. Use when the user wants video-to-sprite, smoother run/walk cycles, or denser intermediate poses. Prefer generate2dsprite for crisp production pixel sheets. Triggers on "video to sprite", "imagine_image_to_video sprite", "dense walk cycle", "smooth run animation from video".

evalix098/tiktoklive

Call the xAI API (Grok) from this app's server code using the injected XAI_API_KEY: chat/LLM features, image and video generation (Imagine), and voice (text-to-speech). Use when the app needs any "AI" / "assistant" / "chatbot" / "Grok" functionality, runtime image/video generation, or speech. Triggers on "AI", "LLM", "chatbot", "assistant", "Grok", "xAI", "generate text", "summarize", "generate image", "AI video", "voice", "text to speech", "TTS", "OpenAI" (use xAI instead).

相关技能