/tencentcloudbase:miniprogram-developmentfrom tencentcloudbase
WeChat Mini Program development rules. Use this skill when developing WeChat mini programs, integrating CloudBase capabilities, and deploying mini program projects.
Ships in tencentcloudbase. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill for WeChat Mini Program development when you need to:
Do NOT use for:
Follow project structure conventions
miniprogram directorycloudfunctions directoryUnderstand authentication characteristics
cloud.getWXContext().OPENID in cloud functionsUse WeChat Developer Tools correctly
project.config.json has appid field before openingproject.config.jsonHandle resources properly
https://img.icons8.com/{style}/{size}/{color}/{icon-name}.pngstyle: ios (outline style) or ios-filled (filled style)size: 100 (recommended 100px, file size < 5KB)color: hex color code without # (e.g., 8E8E93 for gray, FF3B30 for red)icon-name: icon name (e.g., checked--v1)https://img.icons8.com/ios/100/8E8E93/checked--v1.pnghttps://img.icons8.com/ios-filled/100/FF3B30/checked--v1.pngdownloadRemoteFile tool to download resourcesCloudBase Integration:
latest versionDirectory Organization:
miniprogram directorycloudfunctions directoryproject.config.json needs to specify miniprogramRoot and other configurationsPage Generation:
index.jsonWeChat Developer Tools Opening Project Workflow:
project.config.json has appid field configured. If not configured, must ask user to provide itproject.config.json):
"C:\Program Files (x86)\Tencent\微信web开发者工具\cli.bat" open --project "项目根目录路径"/Applications/wechatwebdevtools.app/Contents/MacOS/cli open --project "/path/to/project/root"project.config.json fileEnvironment Configuration:
wx.cloud in mini program, need to specify environment IDenvQuery toolResource Management:
iconPath and other places, prefer Icons8 (see section 4 above for details)downloadRemoteFile tool to download resourcesiconPath and similar, must simultaneously help user download icons to avoid build errorsImportant: Mini programs with CloudBase are naturally login-free. It is strictly forbidden to generate login pages or login flows!
Login-Free Feature: Mini program CloudBase does not require user login, can get user identity in cloud functions via wx-server-sdk
User Identity Retrieval: In cloud functions, get user's unique identifier via cloud.getWXContext().OPENID
User Data Management: Manage user data in cloud functions based on openid, no login flow needed
// Example of getting user identity in cloud function
exports.main = async (event, context) => {
const wxContext = cloud.getWXContext();
const openid = wxContext.OPENID;
return { openid: openid };
};
Mini programs with base library version 3.7.1+ already support direct AI model invocation
// Create model instance, here we use DeepSeek AI model
const model = wx.cloud.extend.AI.createModel("deepseek");
// First set AI's system prompt, here using seven-character quatrain generation as example
const systemPrompt =
"请严格按照七言绝句或七言律诗的格律要求创作,平仄需符合规则,押韵要和谐自然,韵脚字需在同一韵部。创作内容围绕用户给定的主题,七言绝句共四句,每句七个字;七言律诗共八句,每句七个字,颔联和颈联需对仗工整。同时,要融入生动的意象、丰富的情感与优美的意境,展现出古诗词的韵味与美感。";
// User's natural language input, e.g., '帮我写一首赞美玉龙雪山的诗'
const userInput = "帮我写一首赞美玉龙雪山的诗";
// Pass system prompt and user input to AI model
const res = await model.streamText({
data: {
model: "deepseek-v3", // Specify specific model
messages: [
{ role: "system", content: systemPrompt },
{ role: "user", content: userInput },
],
},
});
// Receive AI model's response
// Since AI model's return result is streaming, we need to loop to receive complete response text
for await (let str of res.textStream) {
console.log(str);
}
WeChat step count retrieval must use CloudID method (base library 2.7.0+):
wx.getWeRunData() to get cloudID, use wx.cloud.CloudID(cloudID) to pass to cloud functionweRunData.data to get decrypted step count data, check weRunData.errCode to handle errorsproject.config.jsonWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ulpi-io/plugin-marketplace --plugin tencentcloudbase24 skills in this plugin
/ai-model-nodejsUse this skill when developing Node.js backend services or CloudBase cloud functions (Express/Koa/NestJS, serverless, backend APIs) that need AI capabilities. Features text generation (generateText), streaming (streamText), AND image generation (generateImage) via @cloudbase/node-sdk ≥3.16.0. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended), DeepSeek (deepseek-v3.2 recommended), and hunyuan-image for images. This is the ONLY SDK that supports image generation. NOT for browser/Web apps (use ai-model-web) or WeChat Mini Program (use ai-model-wechat)./ai-model-webUse this skill when developing browser/Web applications (React/Vue/Angular, static websites, SPAs) that need AI capabilities. Features text generation (generateText) and streaming (streamText) via @cloudbase/js-sdk. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended) and DeepSeek (deepseek-v3.2 recommended). NOT for Node.js backend (use ai-model-nodejs), WeChat Mini Program (use ai-model-wechat), or image generation (Node SDK only)./ai-model-wechatUse this skill when developing WeChat Mini Programs (小程序, 企业微信小程序, wx.cloud-based apps) that need AI capabilities. Features text generation (generateText) and streaming (streamText) with callback support (onText, onEvent, onFinish) via wx.cloud.extend.AI. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended) and DeepSeek (deepseek-v3.2 recommended). API differs from JS/Node SDK - streamText requires data wrapper, generateText returns raw response. NOT for browser/Web apps (use ai-model-web), Node.js backend (use ai-model-nodejs), or image generation (not supported).