Tooluck logoTooluck
SKILL.md

ai-model-wechat

Agent skill fromTencentCloudBase/CloudBase-AI-Toolkit

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. Also covers multimodal image input (image_url content blocks, OCR and form extraction) — vision-capable models only. Models via wx.cloud.extend.AI.createModel with groups cloudbase (main managed, also 小程序成长计划 with `hy4-preview` / `hy3` / `deepseek-v4.1-flash`), the legacy hunyuan-v3 / hunyuan-exp, or custom-*; model id goes in the `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).

How to install ai-model-wechat

install ai-model-wechat
# install the CloudBase-AI-Toolkit pack with the skills CLI
npx skills add TencentCloudBase/CloudBase-AI-Toolkit

# or add only this skill to Claude Code: copy the folder

config/source/skills/ai-model-wechat/

# into

~/.claude/skills/ai-model-wechat/ (all projects)

.claude/skills/ai-model-wechat/ (one project)

config/source/skills/ai-model-wechat/SKILL.md

MITFull file
1## Sibling skills (local only)
2
3Sibling CloudBase skills ship beside this skill. Use local relative paths such as `../auth-tool-cloudbase/SKILL.md`.
4
5If 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.
6
7## When to use this skill
8
9Use this skill for **calling AI models in WeChat Mini Program** using `wx.cloud.extend.AI`.
10
11**Use it when you need to:**
12
13- Integrate AI text generation in a Mini Program
14- Stream AI responses with callback support
15- Read text and fields from an image (OCR, receipts, forms) with a vision-capable model
16- Call Hunyuan models from the WeChat environment
17
18**Do NOT use for:**
19
20- Browser/Web apps → use `ai-model-web` skill
21- Node.js backend or cloud functions → use `ai-model-nodejs` skill
22- Image generation → use `ai-model-nodejs` skill (not available in Mini Program)
23- 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)
24
25---
26
27## ⛔ STOP — `wx.cloud.extend.AI.createModel(provider)` argument is **not** a vendor / model name
28
29Read this before writing any `createModel(...)` line. Agents frequently hallucinate this argument. There are **exactly four** legal shapes. Anything else is a bug.
30
31| ✅ Legal `createModel(provider)` argument | When to use it |
32…

Excerpt shown under the repository's MIT license.

More skills in CloudBase-AI-Toolkit

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Leonxlnx /

taste-skill
113k

Agent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages

CCCXCU1 skill

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates