douyin-miniapp-adapter

douyin-miniapp-adapter is a skill for Claude Code, Codex from guyulong/cn-agent-skills. It costs 23 tokens per session (541 once invoked), scanned A, original, MIT.

A guide for moving an HTML5 game or app to Douyin Mini Games, the small-app and game platform inside the Douyin mobile app. It lists platform API replacements and required project changes.

In plain words
What is it for?
Use it to adapt Canvas rendering, file access, lifecycle events, screen-safe areas, privacy prompts, sharing, ads, packaging, and performance settings.
Why use it?
It explains how to replace browser features such as the DOM, window, storage, networking, and audio with Douyin equivalents.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to adapt Canvas rendering, file access, lifecycle events, screen-safe areas, privacy prompts, sharing, ads, packaging, and performance settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guyulong/cn-agent-skills/douyin-miniapp-adapter
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add guyulong/cn-agent-skills --skill douyin-miniapp-adapter
Clone the repo
git clone --depth 1 https://github.com/guyulong/cn-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for douyin-miniapp-adapter

README.md
[![agentmods](https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/douyin-miniapp-adapter/github.svg)](https://agentmods.dev/skills/guyulong/cn-agent-skills/douyin-miniapp-adapter)
Your own site
<a href="https://agentmods.dev/skills/guyulong/cn-agent-skills/douyin-miniapp-adapter"><img src="https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/douyin-miniapp-adapter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for douyin-miniapp-adapter

Your own site · 80×15
<a href="https://agentmods.dev/skills/guyulong/cn-agent-skills/douyin-miniapp-adapter"><img src="https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/douyin-miniapp-adapter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 541 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00541
Opus 5 $0.00012 $0.00270
Sonnet 5 $0.00005 $0.00108
Haiku 4.5 $0.00002 $0.00054

Measured 12d ago against content hash 2476509df55e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

douyin-miniapp-adapter scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/douyin-miniapp-adapter/SKILL.md · 63 lines

What it actually says

抖音小游戏适配器

使用场景

将H5游戏或应用迁移到抖音小游戏平台。

适配要点

1. 项目结构

├── game.json          # 游戏配置
├── game.js            # 入口文件
├── js/
│   ├── main.js        # 主逻辑
│   └── libs/          # 第三方库
├── assets/            # 资源文件
└── project.config.json # 项目配置

2. API 替换对照

H5 API 抖音小游戏 API
document.createElement('canvas') tt.createCanvas()
new Image() tt.createImage()
XMLHttpRequest tt.request()
localStorage tt.setStorageSync() / tt.getStorageSync()
window.innerWidth tt.getSystemInfoSync().windowWidth
Audio tt.createInnerAudioContext()
requestAnimationFrame canvas.requestAnimationFrame

3. 注意事项

  • 没有 DOM 操作,所有渲染通过 Canvas
  • 没有 window 对象,用 tt 替代
  • 文件系统使用 tt.getFileSystemManager()
  • 分包加载配置在 game.json
  • 必须处理 tt.onHidett.onShow 生命周期

4. 审核要求

  • 必须有隐私协议
  • 用户信息获取需要授权弹窗说明
  • 分享功能必须是用户主动触发
  • 不能有自动播放的音视频
  • 适配刘海屏和底部安全区

5. 广告接入

  • 激励视频:tt.createRewardedVideoAd()
  • 插屏广告:tt.createInterstitialAd()
  • Banner广告:tt.createBannerAd()

6. 性能优化

  • 资源总量建议 < 4MB(首包)
  • 使用纹理压缩
  • 避免频繁GC
  • 合理使用对象池
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 63 lines · 23 tokens per session scan A 2476509df55e

Subscribe to this mod's changes

douyin-miniapp-adapter is a skill published in the GitHub repository guyulong/cn-agent-skills (3 stars, last pushed 3mo ago), licensed MIT. It adds 23 tokens to every session and 541 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

sceneview-ios

Build 3D and AR apps on Apple platforms (iOS, macOS, visionOS) with SceneViewSwift — the SwiftUI wrapper around RealityKit. Use whenever the user asks for "3D in SwiftUI", "AR with ARKit in SwiftUI", a model viewer for iOS, or any Apple-platform 3D/AR app where the dependency is the SceneViewSwift Swift Package from…

sceneview/sceneview · 148 tokens

sceneview

Build 3D and AR apps with the SceneView SDK in Jetpack Compose, SwiftUI (iOS/macOS/visionOS via SceneViewSwift), Web (Filament.js), Flutter and React Native. Use whenever the user asks for "3D in Compose", "AR with ARCore in Compose", a model viewer, or any cross-platform 3D/AR app where the dependency is…

sceneview/sceneview · 156 tokens

mobile-onboarding

A visual template showing three mobile-app onboarding screens side by side: a splash screen, a feature introduction, and sign-in.

nexu-io/html-anything · 18 tokens

build-mobile-threejs-games

Build, tune, or test a Three.js game for mobile web. Use for touch movement, action controls, target selection, touch inventory, safe areas, portrait/landscape layouts, responsive HUD, battery/performance budgets, and real mobile browser QA.

MengTo/Skills · 57 tokens

building-mobile-game

Build mobile games and game-like interactive experiences in React Native and Expo. Use when Codex is creating or refactoring arcade, puzzle, casual, action, physics-based, or animation-heavy gameplay, including Expo game setup with the with-reanimated template, sprite-sheet generation and extraction, frame-based…

Intelligent-Internet/ii-agent · 91 tokens

mobile-development

Use when targeting Android/iOS — export and signing, permissions, plugins, in-app purchases, ads, app lifecycle, device features, and mobile performance.

jame581/GodotPrompter · 33 tokens