This skill facilitates the entire development lifecycle of WeChat Mini Programs, including setup, publishing, and optimization. It is designed for developers working with WeChat Mini Programs to streamline workflows and integrate cloud functionality.
$ npx skills add https://github.com/tencentcloudbase/skills --skill miniprogram-developmentThis skill supports the full development lifecycle of WeChat Mini Programs built on CloudBase. It provides guidance for setting up projects, integrating cloud functionality, publishing to WeChat, and optimizing performance. Developers use this skill when building Mini Programs that require serverless backends, cloud storage, authentication, or AI features via CloudBase. It complements Mini Program-specific authentication (auth-wechat), AI models (ai-model-wechat), and cloud services to create complete, production-ready applications.
Install using the command: `$ npx skills add https://github.com/tencentcloudbase/skills --skill miniprogram-development`
Creating and structuring WeChat Mini Programs
Integrating CloudBase for enhanced functionality
Debugging and optimizing mini programs before publishing
$ npx skills add https://github.com/tencentcloudbase/skills --skill miniprogram-developmentgit clone https://github.com/tencentcloudbase/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as an expert WeChat Mini Program developer. Help me with the full development lifecycle of a Mini Program for [COMPANY] in the [INDUSTRY] sector. Focus on [SPECIFIC_TASK: setup, API integration, UI/UX design, cloud function optimization, publishing, or debugging]. Provide code snippets, best practices, and debugging tips where applicable. Current project status: [DESCRIBE_CURRENT_STATE].
# WeChat Mini Program Development Guide for EcoMart
## Project Overview
EcoMart is a sustainable e-commerce Mini Program for reusable household products. Current focus: integrating a cloud-based inventory system with real-time stock updates.
## Key Implementation Steps
### 1. Project Setup
```json
{
"appid": "wx1234567890abcdef",
"name": "EcoMart",
"description": "Sustainable shopping made easy",
"permission": {
"scope.userInfo": true,
"scope.address": true
}
}
```
### 2. Cloud Function Integration
```javascript
// Cloud function for inventory check
exports.main = async (event, context) => {
const { productId } = event;
const db = require('wx-server-sdk').database();
try {
const result = await db.collection('inventory')
.where({ productId, active: true })
.get();
return {
status: 'success',
data: result.data[0].stock
};
} catch (error) {
return {
status: 'error',
message: error.message
};
}
};
```
### 3. UI Component for Product Listing
```html
<view wx:for="{{products}}" wx:key="id">
<product-card
name="{{item.name}}"
price="{{item.price}}"
stock="{{item.stock}}"
onAddToCart="handleAddToCart"
/>
</view>
```
## Debugging Tips
- Use WeChat Developer Tools for real-time console logging
- Test cloud functions with mock data before deployment
- Monitor API response times in the Mini Program admin panelTake a free 3-minute scan and get personalized AI skill recommendations.
Take free scan