Skills

AI Model Wechat

Use this skill for WeChat Mini Program AI via wx.cloud.extend.AI (小程序, wx.cloud apps).

Install

npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill ai-model-wechat -g -a claude-code -y
Category
Media
Updated
3d ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Use this skill for WeChat Mini Program AI via wx.cloud.extend.AI (小程序, wx.cloud apps). Covers generateText and streamText with callbacks (onText, onEvent, onFinish); streamText needs a data wrapper, generateText returns the raw response. Models via wx.cloud.extend.AI.createModel with groups cloudbase (main managed, also 小程序成长计划 with `hy3`), the legacy hunyuan-v3 / hunyuan-exp, or custom-*; model id goes in the data wrapper `model` field. MUST run two-step preflight before code, see body. NOT for browser/Web (use ai-model-web), Node.js backend (use ai-model-nodejs), or image generation (use ai-model-nodejs).

Sibling skills (local only)

Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.

If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.

When to use this skill

Use this skill for calling AI models in WeChat Mini Program using wx.cloud.extend.AI.

Use it when you need to:

  • Integrate AI text generation in a Mini Program
  • Stream AI responses with callback support
  • Call Hunyuan models from the WeChat environment

Do NOT use for:

  • Browser/Web apps → use ai-model-web skill
  • Node.js backend or cloud functions → use ai-model-nodejs skill
  • Image generation → use ai-model-nodejs skill (not available in Mini Program)
  • Runtimes without a CloudBase SDK (native apps, Python, etc.) → use http-api-cloudbase skill (it now includes the ai_model OpenAPI spec for direct HTTP calls)

⛔ STOP, wx.cloud.extend.AI.createModel(provider) argument is not a vendor / model name

Read this before writing any createModel(...) line. Agents frequently hallucinate this argument. There are exactly four legal shapes. Anything else is a bug.

Read the whole SKILL.md on GitHub

More in Media