Skip to main content

mp-skills CLI

mp-skills is a command-line tool for managing SKILLs in the Mini Program AI Development Mode. It supports installing, finding, managing, and creating SKILLs from remote repositories or local paths.

Installation

npm install -g mp-skills

Or use directly with npx (no installation needed):

npx mp-skills [command]

Command Reference

CommandDescription
addInstall SKILL from GitHub repo or local path
findSearch available SKILLs across repositories
listList installed SKILLs
removeRemove installed SKILLs
updateCheck and update installed SKILLs
createCreate a new SKILL skeleton in an existing project
newCreate a new mini program project scaffold
setupOne-click environment setup (cloud functions, database, services)
validateStatic validation
executeExecute an atomic API
renderRender an atomic component
evalEnd-to-end quality evaluation
doctorHealth check (cloud function connectivity, database, services)
statusView cloud function, database, and service status diff

add — Install SKILL

Install a SKILL from a GitHub repository or local path. Run this command in your mini program project root (where project.config.json is located).

# List available SKILLs in a repository
npx mp-skills add TencentCloudBase/awesome-miniprogram-skills

# Install a specific SKILL
npx mp-skills add TencentCloudBase/awesome-miniprogram-skills -s order-skill

# Install all SKILLs
npx mp-skills add TencentCloudBase/awesome-miniprogram-skills --all

# Install from a local path
npx mp-skills add ./my-local-skill

After installation, the tool automatically:

  • Copies the SKILL to miniprogram/skills/<name>/
  • Updates miniprogram/app.json with agent.skills + subPackages
  • Updates project.config.json with packOptions.include
  • Writes skills-lock.json for version tracking

find — Search SKILLs

Search for available SKILLs across repositories:

# List all remotely available SKILLs
npx mp-skills find

# Search by keyword
npx mp-skills find payment
npx mp-skills find delivery

list — List Installed SKILLs

List all SKILLs installed in the current project:

npx mp-skills list

remove — Remove SKILLs

Remove installed SKILLs from the project:

npx mp-skills remove order-skill

# Remove all SKILLs
npx mp-skills remove --all

update — Update SKILLs

Check for updates to installed SKILLs:

# Check all SKILLs
npx mp-skills update

# Check specific SKILLs
npx mp-skills update order-skill payment-skill

create — Create a SKILL Skeleton

Create a new SKILL skeleton in an existing project:

# Create with a specific name
npx mp-skills create weather-skill

# Interactive mode (prompts for name)
npx mp-skills create

After creation, you can install it to other projects with npx mp-skills add ./<name>.

new — Create a New Project

Create a new mini program project with AI SKILL support:

npx mp-skills new my-app
cd my-app
npx mp-skills add TencentCloudBase/awesome-miniprogram-skills -s order-skill

setup — Environment Setup

One-click environment setup: aggregates cloud functions, creates database collections, checks service configuration:

# Full workflow
npx mp-skills setup

# Cloud functions only
npx mp-skills setup --cloud-functions

# Database only
npx mp-skills setup --database

# Services only
npx mp-skills setup --services

# Preview mode (dry run)
npx mp-skills setup --dry-run

# Specify CloudBase environment
npx mp-skills setup --env-id your-env-id

Options: -f, --cloud-functions | -d, --database | -s, --services | --dry-run | --env-id <id>

validate — Static Validation

npx mp-skills validate
npx mp-skills validate ./path/to/project # Specify project

execute — Execute Atomic API

npx mp-skills execute -n getDrinkList
npx mp-skills execute -n searchRestaurants -a '{"keyword":"Sichuan"}'
npx mp-skills execute -n getDrinkList -p ./path/to/project

Options: -n, --name <api-name> (required) | -a, --args <json> | -p, --project <path>

render — Render Atomic Component

npx mp-skills render -n restaurantList
npx mp-skills render -n restaurantList -p ./path/to/project

Options: -n, --name <component-name> (required) | -p, --project <path>

eval — Quality Evaluation

Run end-to-end quality evaluation on projects with installed SKILLs:

# Generate 3 test cases and run evaluation
npx mp-skills eval -c 3

# AI-assisted evaluation
npx mp-skills eval --mode agent -c 3

# Evaluate a specific SKILL only
npx mp-skills eval -s order-skill -c 3

# Headless mode (suitable for CI)
npx mp-skills eval --headless -c 3

Options: -c, --cases <n> | -s, --skill <name> | -p, --project <path> | --headless --provider <name>, -m, --model <name> | --mode official|agent

doctor & status — Health Check & Status

# Health check: test cloud function connectivity, database, and service config
npx mp-skills doctor

# View status diff for cloud functions, database, and services
npx mp-skills status

LLM Credential Configuration

The create --mode agent and eval commands require LLM credentials (BYOK):

export WXA_SKILL_EVAL_LLM_BASE_URL=<your-endpoint>
export WXA_SKILL_EVAL_LLM_API_KEY=<your-key>
export WXA_SKILL_EVAL_LLM_MODEL=<model-name>

Built-in provider presets:

ProviderDefault ModelBase URL
DeepSeekdeepseek-v4-flashhttps://api.deepseek.com/v1
Zhipu GLMglm-5.1https://open.bigmodel.cn/api/paas/v4
Kimi (Moonshot)kimi-k2.6https://api.moonshot.cn/v1
MiniMaxminimax-m2.7https://api.minimaxi.com/v1

Credentials are saved to the .env file in the current directory.

Tool SKILLs

Tool SKILLs are different from business SKILLs — they are not installed into mini programs. Instead, they serve as guided instructions for AI coding tools. The AI reads the SKILL.md and follows the steps to help you complete development tasks.

Tool SKILLs use the skills CLI (a different tool from mp-skills):

# Install Tool SKILLs (for AI coding tools)
npx skills add TencentCloudBase/mp-skills -s wxa-find-skills
npx skills add TencentCloudBase/mp-skills -s wxa-create-ai-miniprogram
npx skills add TencentCloudBase/mp-skills -s wxa-create-mp-skill

See Tool SKILLs for details.

Usage Examples

Install a Food Ordering SKILL

# List available SKILLs
npx mp-skills add TencentCloudBase/awesome-miniprogram-skills

# Install order-skill into your project
npx mp-skills add TencentCloudBase/awesome-miniprogram-skills -s order-skill

# Verify installation
npx mp-skills list

Create a Custom SKILL

# Create a new SKILL called weather-skill
npx mp-skills create weather-skill

# Generated file structure:
# miniprogram/skills/weather-skill/
# ├── SKILL.md # Business description
# ├── mcp.json # Model capability declaration
# ├── apis/ # Atomic API implementations
# └── components/ # Atomic component rendering

Create a New Project

# Create a new mini program project (with AI support)
npx mp-skills new my-ai-app

# Enter project and install SKILLs
cd my-ai-app
npx mp-skills add TencentCloudBase/awesome-miniprogram-skills -s order-skill

More Information