npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dygame-cli

v1.0.1

Published

CLI to install 抖音小游戏开发 skill for AI coding assistants (Claude Code, Cursor, Codex, Windsurf, etc.)

Readme

dygame-cli — 抖音小游戏开发 AI Skill 安装器

npm version license

CLI 工具,一键安装抖音(TikTok 中国)小游戏开发技能到 AI 编程助手(Claude Code、Cursor、Codex、Windsurf 等 14 种)。

安装后,AI 助手将自动获得抖音小游戏平台的完整开发知识:登录授权、排行榜、激励广告、支付结算、合规审核、tt.* API 等。


快速上手

# 全局安装
npm install -g dygame-cli

# 在项目目录下运行
dygame init --ai claude

# 或使用 npx(无需全局安装)
npx dygame-cli init --ai claude

# 交互式选择 AI 助手(自动检测当前项目已有配置)
dygame init

# 安装到所有 AI 助手
dygame init --ai all

支持的 AI 助手

| AI 助手 | 安装路径 | 命令 | |---------|----------|------| | Claude Code | .claude/skills/douyin-minigame/ | dygame init --ai claude | | Cursor | .cursor/skills/douyin-minigame/ | dygame init --ai cursor | | Windsurf | .windsurf/skills/douyin-minigame/ | dygame init --ai windsurf | | Codex | .codex/skills/douyin-minigame/ | dygame init --ai codex | | RooCode | .roo/skills/douyin-minigame/ | dygame init --ai roocode | | Kiro | .kiro/steering/douyin-minigame/ | dygame init --ai kiro | | GitHub Copilot | .github/prompts/douyin-minigame/ | dygame init --ai copilot | | Antigravity | .agent/skills/douyin-minigame/ | dygame init --ai antigravity | | Gemini CLI | .gemini/skills/douyin-minigame/ | dygame init --ai gemini | | Trae | .trae/skills/douyin-minigame/ | dygame init --ai trae | | OpenCode | .opencode/skills/douyin-minigame/ | dygame init --ai opencode | | Continue | .continue/skills/douyin-minigame/ | dygame init --ai continue | | CodeBuddy | .codebuddy/skills/douyin-minigame/ | dygame init --ai codebuddy | | Qoder | .qoder/skills/douyin-minigame/ | dygame init --ai qoder |

功能覆盖

| 模块 | 能力 | |------|------| | 登录授权 | tt.login → code2Session 完整流程、匿名登录降级 | | 排行榜 | 好友/世界排行、日/周/月周期、内置 UI 和自定义 UI | | 激励广告 | 激励视频、Banner、插屏广告集成与降级 | | 支付结算 | 游戏币购买、道具直购、服务端回调验签、结算规则 | | 数据分析 | tt.reportAnalytics 事件埋点 | | 服务端 | getAccessToken、签名算法、SDK 集成 | | 反作弊 | 服务端验证、内容安全 API | | 合规审核 | 自审标准 P0/P1/P2、ICP 备案、广告合规 |

触发关键词

安装完成后,在 AI 助手中输入以下关键词即可激活技能:

中文: 抖音小游戏、小游戏开发、小游戏登录、小游戏排行榜、小游戏激励广告、小游戏支付、小游戏合规

English: douyin mini-game, ByteDance mini-game, TikTok mini-game, mini-game login, mini-game leaderboard, mini-game payment

安装后的目录结构

以 Claude Code 为例:

.claude/skills/douyin-minigame/
├── SKILL.md                        # 主技能文件
├── references/                     # 详细参考文档(按需加载)
│   ├── api-reference.md            # tt.* 完整 API 参考
│   ├── features.md                 # 9 大功能模块详解
│   ├── payment.md                  # 支付结算接入指南
│   ├── compliance.md               # 合规政策与审核规则
│   ├── architecture.md             # 平台分层架构
│   ├── runtime.md                  # 运行时引擎详解
│   ├── cli-reference.md            # dygame CLI 参考
│   ├── templates.md                # 模板系统详解
│   └── sources.md                  # 官方文档 URL 索引
├── examples/                       # 示例代码
│   ├── login-basic.ts              # 登录集成
│   ├── rank-monthly-top3.ts        # 排行榜
│   ├── incentive-revive.ts         # 激励广告复活
│   ├── payment-gamecoins.ts        # 游戏币支付
│   └── project-scaffold/           # 项目脚手架
└── scripts/                        # 实用脚本
    ├── validate-project.sh         # 项目结构校验
    └── check-compliance.sh         # 合规快速检查

CLI 命令参考

dygame --help               # 查看帮助
dygame --version             # 查看版本
dygame init --help           # 查看 init 命令帮助
dygame init                  # 交互式选择 AI 助手
dygame init --ai claude      # 安装到指定 AI 助手
dygame init --ai all         # 安装到所有 AI 助手
dygame init --ai claude -f   # 强制覆盖已有文件

开发

# 克隆仓库
git clone https://gitee.com/freechful/dygame.git
cd dygame

# 安装依赖
npm install

# 构建
npm run build

# 本地测试
node dist/index.js init --ai claude

项目结构

├── src/                    # TypeScript 源码
│   ├── index.ts            # CLI 入口
│   ├── commands/init.ts    # init 命令
│   ├── types/index.ts      # 类型定义
│   └── utils/              # 工具函数
├── assets/                 # Skill 数据(随 npm 包发布)
│   ├── SKILL.md
│   ├── references/
│   ├── examples/
│   └── scripts/
├── dist/                   # 编译输出(gitignore)
├── build.mjs               # esbuild 构建脚本
├── package.json
└── tsconfig.json

许可证

MIT