Skip to main content

Write WeChat Mini Programs with AI

Use AI to write Mini Program code, preview in the simulator, and set up cloud database / functions / storage.

This is not the same as “AI features inside a Mini Program for end users.” This page is about your coding workflow. For product AI capabilities, start at AI overview.

WeChat’s own guide (source of truth for menus and version requirements): DevTools Skills.

Before you start

  1. WeChat Developer Tools Nightly
    This AI surface ships with Nightly; Stable often does not.
    Nightly affects local development only — it is not a different publishing channel. Version requirements follow WeChat’s Skills doc. Sign in with WeChat and keep DevTools open while coding.

  2. An AI coding tool
    Pick one path (finishing the selector alone does not mean Skills are connected):

    • Path A: CloudBase AI inside DevTools (default in the selector below)
    • Path B: CodeBuddy, Cursor, Claude Code, etc., then import the DevTools Skill into that Agent
  3. A real Mini Program AppID
    appid in the project must not be empty or touristappid, or the Agent cannot open the project window.

  4. (Recommended) CloudBase skill pack so the Agent writes CloudBase correctly:

npx skills add tencentcloudbase/cloudbase-skills -y
Do I need CloudBase MCP?

Only when you need advanced console-side work (permissions, data models, MySQL/PostgreSQL). See Connect CloudBase MCP.

Connect

1. Install and sign in to Nightly

Open the Nightly download page, install, scan to sign in, keep DevTools running.

2. Choose your AI tool

Client

Configure your AI tool to connect with CloudBase capabilities. Supports local and hosted connection. See connection modes.

Step 1: Install / Configure CloudBase

Step 2: Chat with AI

Enter the following in your AI chat in order:

prompt
Install CloudBase Skills: run npx skills add tencentcloudbase/cloudbase-skills -y
Use CloudBase Skills: Check whether DevTools is signed in; then build a WeChat Mini Program sample with CloudBase login and a list page, and preview it

3. External Agents only: import the DevTools Skill

Path A (built-in DevTools AI): after step 2, go to step 4.

Path B (CodeBuddy / Cursor / …): you must import the Skill, or the Agent cannot drive the simulator:

  1. Menu → Export DevTools Skill → import into your Agent (menu label follows the current WeChat build)
  2. Or run wechatide and give the printed Skill path to the Agent
  3. On first connect, DevTools shows an auth popup — you must allow it, or everything after fails

4. Confirm the project can open

Root folder has project.config.json with a real AppID for your account.

5. One acceptance prompt

Check whether DevTools is signed in, then open this Mini Program and preview it.

After preview works, describe features, e.g. “Build a Mini Program with login and a list page; store data in CloudBase.”

If it does not connect

Check in order — most failures are the first three:

  1. Nightly installed? Signed in? DevTools window open?
  2. External Agent: Skill imported? First auth popup allowed?
  3. Valid appid (not empty, not touristappid)?
  4. Still stuck: paste the error to the Agent, or read WeChat’s DevTools Skills