douyin-miniprogram-dev

A complete skill set for Douyin/ByteDance mini-program development covering cloud function coding and deployment, in-app payment and order systems, privacy-compliance dialogs, HTTPS request encapsulation, online PDF report preview, membership paywall module, and end-to-end backend REST API integration. Intended for scenarios needing mini-program development, in-app payments, member systems, backend API integration, privacy compliance handling, PDF preview, or cloud function implementation.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "douyin-miniprogram-dev" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-0ece3f7883c6f25736e8bbee47896ac24cfbfdfafc0345d98ea15e39ecd0c455. Verify the upstream source and version against https://skillhub.cn/skills/user_d292cff3/douyin-miniprogram-dev before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A complete skill set for Douyin/ByteDance mini-program development covering cloud function coding and deployment, in-app payment and order systems, privacy-compliance dialogs, HTTPS request encapsulation, online PDF report preview, membership paywall module, and end-to-end backend REST API integration. Intended for scenarios needing mini-program development, in-app payments, member systems, backend API integration, privacy compliance handling, PDF preview, or cloud function implementation.

0 Downloads

Introduction source: third_party · user_d292cff3 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: douyin-miniprogram-dev
description: "抖音小程序全套开发技能,涵盖云函数开发部署、支付订单系统、隐私合规弹窗、HTTPS网络请求封装、PDF报告在线预览、会员付费墙模块,以及后端REST API全链路对接。当用户需要开发抖音/字节跳动小程序、实现小程序内支付、搭建会员体系、对接后端API、处理隐私合规、预览PDF文件或编写云函数时触发此技能。"
agent_created: true

抖音小程序开发全套技能

概述

本技能覆盖抖音(字节跳动)小程序开发的核心场景,提供从网络请求到支付闭环的全链路开发指导。包含 7 大模块,每个模块配有详细参考文档和可直接复用的代码模板。

模块导航

模块 参考文档 核心能力
云函数开发 references/cloud-functions.md tt.cloud 云函数编写、部署、调用、调试
支付订单系统 references/payment-orders.md 担保支付、订单创建、回调处理、退款
隐私合规弹窗 references/privacy-popup.md 隐私授权弹窗、合规检查、用户协议
HTTPS接口请求 references/https-request.md tt.request 封装、拦截器、错误重试
PDF报告预览 references/pdf-preview.md 下载预览、WebView方案、自定义查看器
会员付费模块 references/membership-payment.md 会员体系、付费墙、权益管理、订阅
REST API对接 references/rest-api-integration.md 后端API全链路、鉴权、数据同步

开发环境

使用流程

1. 识别需求模块

根据用户描述判断涉及哪个模块:

  • "写个云函数" / "部署云函数" → 云函数开发
  • "接入支付" / "创建订单" / "退款" → 支付订单系统
  • "隐私弹窗" / "用户协议" / "合规" → 隐私合规弹窗
  • "请求接口" / "调API" / "网络请求" → HTTPS接口请求
  • "预览PDF" / "查看报告" / "打开文件" → PDF报告预览
  • "会员" / "VIP" / "付费墙" / "订阅" → 会员付费模块
  • "对接后端" / "REST" / "数据同步" → REST API对接

2. 加载参考文档

读取对应模块的 references/xxx.md 获取详细 API 用法、代码示例和注意事项。

3. 使用代码模板

assets/templates/ 目录提供可直接复用的代码模板:

  • request-wrapper.js — HTTPS 请求封装(含拦截器、重试、Token管理)
  • cloud-function.js — 云函数模板(含数据库操作、错误处理)
  • payment-flow.js — 支付流程模板(订单创建→调起支付→回调验证)
  • privacy-popup.js — 隐私弹窗组件
  • pdf-viewer.js — PDF 预览组件
  • membership-wall.js — 会员付费墙组件

4. 辅助脚本

scripts/ 目录提供开发辅助工具:

  • gen_api_client.js — 根据后端 Swagger/OpenAPI 规范自动生成小程序端 API 客户端代码
  • validate_cloud_config.js — 检查云开发环境配置是否正确

关键注意事项

API 命名空间

抖音小程序使用 tt 命名空间(区别于微信的 wx),核心 API 对照:

功能 抖音 (tt) 微信 (wx)
网络请求 tt.request wx.request
云函数调用 tt.cloud.callFunction wx.cloud.callFunction
支付 tt.pay wx.requestPayment
本地存储 tt.setStorageSync wx.setStorageSync
登录 tt.login wx.login
弹窗 tt.showModal wx.showModal

域名白名单

在开发前需在字节跳动开放平台配置 request/socket/upload/download 合法域名。开发阶段可在 IDE 中关闭域名校验。

隐私合规

2023年9月起,抖音小程序强制要求隐私授权弹窗。未通过合规审核的小程序将无法发布。详见 references/privacy-popup.md。

支付能力

担保支付需满足:企业主体认证、类目资质审核通过、签署支付协议。个人开发者暂不支持支付能力。

代码规范

  • 使用 ES6+ 语法(async/await、解构、模板字符串)
  • 统一错误码体系:业务错误码 >= 10000,HTTP 状态码保留原始值
  • 所有用户敏感操作需二次确认
  • 云函数入口统一使用 exports.main = async (event, context) => {} 签名
  • API 响应统一格式:{ code: 0, data: {}, message: '' }

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 覆盖抖音小程序开发全链路核心场景
  • 提供7大模块完整开发指导
  • 包含可直接复用的代码模板
Trigger Precision95/100

Highlights

  • 触发词覆盖全面,包含多种变体表达
  • 边界清晰,不易误触或漏触
  • description内容完整且位置正确
Structure and Standards90/100

Highlights

  • 开发流程步骤清晰完整
  • 包含端到端示例和代码模板
  • frontmatter结构规范
Execution Reliability88/100

Areas to improve

  • 引用文件缺失 Reported severity: Major

    SKILL.md引用了references/目录下的多个文档,但未验证这些文件是否实际存在

    Recommendation: 请确保所有引用的references/文件都已上传,或提供占位文件

  • 引用文件缺失 Reported severity: Major

    SKILL.md引用了assets/templates/和scripts/目录,但未验证这些目录和文件是否实际存在

    Recommendation: 请确保所有引用的模板文件和脚本文件都已上传,或提供占位文件

Highlights

  • 工具来源明确,基于官方字节跳动开发者工具
  • 覆盖主要异常场景和配置要求
  • 提供配置验证脚本增强可靠性
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • developer.open-douyin.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.