ai-model-cloudbase
Complete guide for calling AI models with CloudBase - covers JS/Node SDK and WeChat Mini Program. Text generation, streaming, and image generation.
npx skills add majiayu000/claude-skill-registry --skill ai-model-cloudbase --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## When to use this skill Use this skill for **calling AI models using CloudBase** across all platforms. **Supported platforms:** | Platform | SDK/API | Section | |----------|---------|---------| | Web (Browser) | `@cloudbase/js-sdk` | Part 1 | | Node.js (Server/Cloud Functions) | `@cloudbase/node-sdk` ≥3.16.0 | Part 1 (same API, different init) | | Any platform (HTTP) | HTTP API / OpenAI SDK | Part 2 | | WeChat Mini Program | `wx.cloud.extend.AI` | Part 3 ⚠️ Different API | --- ## How to use this skill (for a coding agent) 1. **Identify the target platform** - Ask user which platform they're developing for 2. **Confirm CloudBase environment** - Get `env` (environment ID) and credentials 3. **Pick the appropriate section** - **Part 1** for JS/Node SDK, **Part 3** for WeChat Mini Program 4. **Follow CloudBase API shapes exactly** - Do not invent new APIs --- # Part 1: CloudBase JS SDK & Node SDK **JS SDK and Node SDK share the same AI API.** Only initialization differs. ## Installation ```bash # For Web (Browser) npm install @cloudbase/js-sdk # For Node.js (Server/Cloud Functions) npm install @cloudbase/node-sdk ``` ⚠️ **Node SDK AI feature requires version 3.16.0 or above.** Check
- When to use this skill
- How to use this skill (for a coding agent)
- Installation
- Initialization - Web (JS SDK)
- Initialization - Node.js (Node SDK)
- generateText() - Non-streaming
- streamText() - Streaming
- generateImage() - Image Generation
- API Endpoint
- cURL - Non-streaming
- cURL - Streaming
- OpenAI SDK Compatible
- Initialization
- JS/Node SDK - BaseChatModelInput
For Web (Browser) npm install @cloudbase/js-sdk For Node.js (Server/Cloud Functions) npm install @cloudbase/node-sdk curl -X POST 'https://<ENV_ID>.api.tcloudbasegateway.com/v1/ai/deepseek/v1/chat/completions' \
What does the ai-model-cloudbase skill do?
Complete guide for calling AI models with CloudBase - covers JS/Node SDK and WeChat Mini Program. Text generation, streaming, and image generation.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill ai-model-cloudbase --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
