Communitygithub.com

evalix098/tiktoklive

為部署在 *.grok.me 上的應用程式提供分享連結預覽、SVG 圖示及 PWA 圖標。用於應用程式的搭建、重新命名或重新造型,以及分享/解開/OG/Twitter 卡片相關問題。

tiktoklive 是什麼?

這個技能是為部署在 *.grok.me 上的應用程式處理品牌資產的完整解決方案。它管理分享卡片的 Open Graph 和 Twitter 卡片 meta 標籤、自訂 1200x630 的 OG 圖片、SVG favicon、遊戲專屬的 X 橫幅,以及可安裝 PWA 的圖標。技能強制透過專用子代理程式進行品牌資產建置,確保在產生卡片美術時,主工作流程不會因 AI 渲染延遲而受阻。它支援自訂卡片(遊戲、創意工具、品牌頁面的預設)與使用預設 og.grok.me 佔位符的純工具應用程式之間的智慧切換。技能文件詳細說明了 `src/lib/og/site.json` 的資料結構、`og:type` 為遊戲設為 `x:game` 的規範、避免損壞 `og:image` URL 的處理規則,以及透過子代理程式非同步執行品牌資產建置的協作模式;主代理程式應立即回應,不等待卡片完成。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/evalix098/tiktoklive/tree/HEAD/.grok/skills/og

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

分享卡片、圖示與應用程式圖標

已部署的應用程式(https://{name}.grok.me)會展開一張 1200×630 的卡片;每個應用程式(包含預覽)都會在分頁標籤中顯示一個 favicon。分享卡片的 <meta> 標籤並非在 __root.tsx 中編寫——注入器(scripts/grok-pwa-shared.mjs)會在每個 HTML 回應中覆寫 og:* 和 twitter:card。身分識別資料是唯一需要編寫的內容,而整個流程會處理所有這些——你不需要預先設定任何資料:

  • src/lib/og/site.json——無需預先建立,僅在需要時建立:{ "title", "type"?: "x:game", "card"?: "custom", "color"?: "RRGGBB" };標題預設為主機 slug。
  • public/og.jpg——自訂 1200×630 卡片(可選;否則使用佔位符)
  • public/x-banner.jpg——僅限遊戲:50:11(1200×264)的 X 動態卡片
  • public/favicon.svg——從根 head() 連結;在流程完成之前,分頁只會顯示瀏覽器預設圖標,這不會造成任何問題

擴充 __root.tsx;絕不要完全取代它(包含驗證 SSR、重新設計、技能摘要):移除了 favicon 連結會導致分頁顯示空白圖標,而本機檢查無法捕捉到這個問題。

決定:此應用程式使用哪種卡片

預設:使用自訂卡片——來自應用程式自身的美術作品——無論是任何遊戲和渲染技術(Canvas/WebGL 以及 DOM 棋盤、卡牌、文字、拼圖、問答:即使是 div 組成的井字棋盤格也算遊戲)、趣味應用、創意工具、內容和品牌頁面。若有疑問,一律製作自訂卡片。

僅限純工具應用程式(轉換器、CRUD 追蹤器、儀表板、筆記/管理後台——這些應用程式的介面就是資料本身)保留預設的 og.grok.me 佔位符:不產生 public/og.jpg。其 URL、"color" 設定和重新命名規則,請參閱:references/placeholder-card.md。

遊戲的 og:type

任何類型的遊戲都需在 src/lib/og/site.json 中包含 "type": "x:game"——流程會負責編寫它,擁有該檔案。無需主機名稱,永遠不依賴自訂卡片,也永遠不「修正」為 website、單純的 game、twitter:card 或自創的 x:type:X 的管線正是依據這個精確的值來運作。非遊戲應用程式則省略此設定。這是你的檢查責任,不是你的編輯責任——如果缺少它,或在自訂卡片存在時缺少 public/x-banner.jpg,就是一個品牌警告。

品牌資產建置:一律使用子代理程式,且永遠不等待

**有 task 工具嗎?**將此建置流程作為一個子代理程式執行,切勿自己生成卡片美術——內聯執行會導致使用者在前面等待數分鐘的生成延遲。一旦名稱和調色板確定後(請參閱 AGENTS.md §「平行工作」),完全照搬以下提示執行。這是完整的——請勿開啟以下參考資料來豐富它;該流程會自行讀取:

你是品牌資產建置流程。遵循 og 技能,它會告訴你從哪裡開始。應用程式 <NAME>、og:type <TYPE>、調色板 <PALETTE>。你獨自擁有 public/ 目錄下的品牌資產和 src/lib/og/site.json。

繼續建置。只有在使用者正在進行美術指導,或尚無可重複使用的美術作品時,才保持順序執行。

永遠不要等待它。不要使用 wait_tasks,而且永遠不要對品牌任務使用 get_task_output:讀取任務的輸出會消耗它,而消耗的任務不會發送完成通知,因此卡片的結果(包含失敗)將無法送達任何人。一旦應用程式成功渲染就立即回應;該流程之後會喚醒你,而那次輪次的回應最多只有一句簡短的句子——一個要求重新發佈的句子,因為 public/og.jpg 是包含在建置中的,而如果在發佈之後卡片才生成,它無法自行到達線上應用程式:「已新增分享卡片——如果你已經發佈過,請重新發佈。」/「卡片生成失敗;將使用預設卡片。」

只要該流程保持 /workspace/.grok/og-pending 檔案新鮮,品牌檢查就不會報告卡片的問題:處理中不是一個發現。該標記會在 10 分鐘後過期,因此一個非常長的流程會讓警告通過——但在其執行期間出現品牌警告絕不是重新執行其工作的提示。

沒有 task 工具?那麼你就是這個流程——立即建置這些資產;沒有其他東西會做。無論誰執行它,都會認領該標記,將檔案暫存到 /workspace/.grok/ 目錄下——永遠不要放在 public/ 目錄內,因為 vite build 會將該目錄的內容原樣複製到已部署的應用程式中——然後使用 scripts/write-atomic.mjs 腳本進行原子寫入,確保建置過程不會讀取到一半的 JPEG 檔案,最後使用 node scripts/brand-check.mjs --game 進行自我檢查。

建置資產——流程會讀取這些,父代理程式則不會

如果你是調度者?請勿開啟它們——上面的提示已完整。一次讀取會在你的上下文中的每個後續輪次中載入此程序,而子代理程式無論如何都會執行這項工作。

**你是流程本身?**從 references/brand-pass.md 開始,然後根據你欠的資產逐一閱讀:references/custom-card.md 用於 public/og.jpg,references/x-banner.md 用於僅限遊戲的 public/x-banner.jpg,references/favicon-and-icons.md 用於 public/favicon.svg 以及 PWA 點陣圖圖標——僅在使用者要求可安裝/PWA 時才建立,絕不要無中生有地建立 manifest。親手編寫那個 SVG,切勿使用 imagine_text_to_image:它必須在 16px 時保持清晰銳利。為遊戲編寫 site.json?references/og-type-contract.md 說明了 X 會拒絕哪些拼寫。

在重新命名或發生重要的身分識別變更時重新生成——APP_NAME、site.json 的 title 以及內嵌的卡片標題應一併更新。如果沒有 imagine_text_to_image 或 xAI Images API,請保留 og.grok.me 卡片;永遠不要導致 og:image URL 失效。

不支援

沒有 /api/og 路由、沒有執行時期圖片渲染器、沒有按路由區分的卡片——卡片是一張靜態的全站圖片(public/og.jpg 或佔位符服務)。如果你新增了 robots.txt,千萬不要使用全域的 Disallow: /:爬蟲必須能夠存取 / 來讀取這些標籤。


This is an AI-generated translation of the skill documentation.

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

Design and build polished, non-generic UI for this TanStack Start + React + Tailwind v4 + shadcn/Radix app. Use whenever you create or restyle any interface surface — pages, landing pages, dashboards, forms, modals, nav, and game overlays (start screens, HUD, menus). Covers design tokens, layout, typography, color, spacing, motion, and the anti-"AI-slop" rules that keep output from looking generic. Triggers on "design", "UI", "make it look good", "polish", "landing page", "theme", "style", "redesign", "ugly", "clean up".

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

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).

相關技能