Communitygithub.com

evalix098/tiktoklive

設計並打造精緻、非模板化的 UI,適用於 TanStack Start + React + Tailwind v4 + shadcn/Radix 應用。每當您建立或重新設計任何介面時使用——頁面、登陸頁面、儀表板、表單、模態框、導航和遊戲覆蓋層(開始畫面、HUD、選單)。涵蓋設計 token、佈局、排版、顏色、間距、動態效果,以及防止輸出看起來像 AI 樣板的反「AI 樣板」規則。在觸發詞如「設計」、「UI」、「讓它好看」、「打磨」、「登陸頁面」、「主題」、「風格」、「重新設計」、「醜」、「清理」時生效。

tiktoklive 是什麼?

這個技能是專為 TanStack Start、React、Tailwind v4 和 shadcn/Radix 打造的設計與 UI 系統。它的核心目標是幫助開發者建立看起來有意識、高級且不帶模板感的介面,避免常見的 AI 樣板問題。技能提供一套完整的設計流程,從定義 CSS token 開始,到使用量化規則防止「醜」的 UI,再到詳細的反 AI 樣板檢查清單。它支援桌面和行動端,強調行動優先、一致間距、有限色彩和字型,並融入細微且有意義的動畫。此外,它還特別處理遊戲覆蓋層的設計,確保 DOM UI 與遊戲畫布正確協作,最終透過瀏覽器驗證交付高品質輸出。

相容平台~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 中的 Token(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 中;透過 token 設定樣式,而不是使用內聯十六進位顏色。
  • 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] 這樣的任意值。如果需要某個值,它必須變成一個 token 或一個比例階梯。

2. 量化評分標準(防止「醜」的廉價規則)

  • 總共 ≤ 3–5 種顏色(一個主要色 + 中性色 + 最多一個強調色)。沒有隨機的額外色調。除非被要求,否則不要預設使用紫色。
  • ≤ 2 種字型家族(通常一種)。將一個顯示/標題字型與一個正文字型配對,或只用一種。
  • 行高 1.4–1.6 用於正文;大標題使用更緊湊的值。
  • 當你覆蓋背景顏色時,也必須覆蓋前景/文字顏色(必須保持對比度 — 同時檢查淺色和深色模式)。
  • 行動優先:先設計 ~390px 的佈局,然後再放大。沒有水平溢出;觸控目標 ≥ 44px。
  • 一致的間距比例(基於 4/8 的間距系統)。充足的留白勝過資訊擁擠。
  • 一個強調色,謹慎使用,僅用於主要操作 — 而不是到處使用。

3. 反 AI 樣板(讓輸出看起來像樣板的跡象 — 避免)

  • 沒有漸層模糊填充,沒有巨大的英雄漸層來取代內容。
  • 沒有使用表情符號作為圖示 — 使用真正的圖示集(lucide-react)。
  • 沒有手繪 SVG 插圖/地圖/圖表 — 使用真正的函式庫(recharts 用於圖表)或真正的生成圖像。
  • 最終產品中沒有佔位圖像 / 灰色的 Lorem Ipsum 方塊 — 生成真正的圖像或使用真正的內容;在 canvas 圖像上設定 crossOrigin="anonymous"。
  • 避免過度使用的字型外觀(僅限預設系統字型,或 Comic Sans 級別的選擇)。
  • 每個元素都值得存在。 減少裝飾性噪音。建立一個系統,然後有目的地變化 — 而不是隨機變化。
  • 在就地編輯應用程式時,匹配現有的 UI;不要引入第二種視覺語言。

4. 佈局與層級

  • 清晰的視覺層級:每個視圖一個主要操作;大小/粗細/顏色表達重要性。詳見 references/typography.md 和 references/surfaces.md。
  • 使用真正的佈局結構(grid/flex,容器最大寬度),而不是絕對定位的技巧。對齊到一致的網格。
  • 空狀態、載入狀態和錯誤狀態是設計的一部分 — 不要發布空白/卡頓的中間狀態。

5. 動態效果(細微、有目的)

  • 短暫、緩和的過渡效果(150–250ms)在懸停/按下/進入時;尊重 prefers-reduced-motion。詳見 references/animations.md。
  • 永遠不要以導致卡頓的方式為佈局添加動畫;優先使用 transform/opacity。

6. 遊戲覆蓋層(與 building-games 配合使用時)

遊戲畫布由 building-games 管理。此技能為 DOM 覆蓋層 設定樣式:開始/「點擊遊玩」畫面、HUD、分數、選單、暫停、行動控制。保持覆蓋層在畫布上可讀(背景、對比度),並使其遠離指標鎖定/遊戲輸入路徑。


完成檢查清單(在你宣告 UI 完成之前)

  • Token 已在 @theme 中定義;JSX 中沒有臨時十六進位顏色/任意值。
  • ≤ 5 種顏色,≤ 2 種字型,一致的間距比例。
  • 對比度維持;在設定背景的地方都已覆蓋前景色。
  • 行動端(~390px)沒有溢出;觸控目標 ≥ 44px。
  • 真正的圖示/圖像/圖表 — 沒有任何反樣板的跡象。
  • 已處理載入/空/錯誤狀態;動態效果細微且支援減少動畫模式。
  • 已在瀏覽器中渲染並目視檢查(參見 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).

相關技能