Communitygithub.com

evalix098/tiktoklive

为 *.grok.me 上的应用提供分享链接预览和品牌标识:注入器拥有的 og:image 卡片、SVG 图标以及可安装应用的 PWA 图标。在脚手架搭建、重命名或重新设计应用时使用,也适用于分享/展开/OG/Twitter 卡片相关问题。

tiktoklive 是什么?

该技能为部署在 *.grok.me 上的应用提供完整的品牌资产管理和社交分享卡片支持。它通过注入器自动重写 HTML 响应中的 `og:*` 和 `twitter:card` 元标签,开发者只需维护少量身份数据(如 `src/lib/og/site.json` 和 `public/og.jpg`)。技能支持自定义 1200×630 的 OG 卡片、游戏专属的 X 横幅(1200×264)、SVG 图标和 PWA 图标,其中自定义卡片是默认选择,仅纯工具类应用保留占位符卡片。对于游戏应用,它会设置 `og:type` 为 `x:game` 并生成专属横幅。关键操作流程是将品牌资产生成任务作为子代理异步执行,不阻塞主流程,并且通过原子写入脚本确保文件完整性。该技能明确建议手写 SVG 图标以保证 16px 清晰度,并提供了详细的失败回退机制。

兼容平台~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 的卡片;每个应用(包括预览版)在标签页中显示一个图标。分享卡片的 <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" };标题默认为主机名段。
  • public/og.jpg — 自定义 1200×630 卡片(可选;否则使用占位符)
  • public/x-banner.jpg — 仅限游戏:50:11(1200×264)X 信息流卡片
  • public/favicon.svg — 从根 head() 链接;在扫描完成之前,标签页仅显示浏览器默认图标,这不会造成任何问题

扩展 __root.tsx;切勿整体替换它(认证 SSR、重新设计、技能摘录):删除图标链接会导致标签页显示空白图标,而本地检查无法捕获此问题。

决定:应用使用哪种卡片

默认:自定义卡片,使用应用自己的美术资源——各类游戏及其渲染技术(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,将触发 BRAND WARNING。

品牌资产扫描:始终作为子代理,不等待完成

拥有 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: /:爬虫必须获取 / 来读取标签。

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

相关技能