wechat-miniprogram-auto-port-deploy is a Codex Skill for professional WeChat Mini Program development, migration, validation, preview, upload, CloudBase integration, and review-preparation automation. It helps teams turn React, Vue, H5, native Mini Program, Taro, or uni-app projects into a repeatable Mini Program engineering workflow with security checks and release guardrails.
If this saves you time on WeChat Mini Program development, please star the repository so more developers can find it.
This repository packages a reusable Codex Skill named wechat-miniprogram-auto-port-deploy. The skill gives Codex a structured workflow for creating, migrating, maintaining, validating, previewing, uploading, and preparing review materials for WeChat Mini Programs.
It is designed for developers who want fewer manual release steps, safer credential handling, and a consistent migration path from web projects to Mini Programs.
- Develop new WeChat Mini Programs with native, Taro, or uni-app routes.
- Migrate React, Vue, and H5 projects into Mini Program-compatible architecture.
- Validate project structure including
project.config.json,app.json,pages.json, page paths,tabBar, and package scripts. - Detect Mini Program incompatibilities such as DOM-only APIs, browser storage, direct
fetch, Web SDKs, and unsafe frontend environment usage. - Protect secrets with
.env.localbootstrap,.wechat-private/, CI Secret guidance, private key cleanup, and plaintext secret scanning. - Automate preview and upload through
miniprogram-ci. - Prepare review materials while clearly documenting what cannot be automated or guaranteed.
- Learn from failures through a dedicated WeChat Mini Program experience ledger.
- Track official changes with Update Guardian checks for WeChat docs, CloudBase docs, GitHub sources, and dependency versions.
Install this skill into a Codex workspace:
mkdir -p .codex/skills/wechat-miniprogram-auto-port-deploy
cp -R ./* .codex/skills/wechat-miniprogram-auto-port-deploy/Add or merge these scripts into your project package.json:
{
"scripts": {
"wx:setup": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/setup-wechat-config.js",
"wx:secrets-init": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/setup-wechat-secrets.js",
"wx:inspect": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/inspect-project.js",
"wx:validate": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/validate-miniprogram.js",
"wx:preview": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/wx-preview.js",
"wx:upload": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/wx-upload.js",
"wx:deploy": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/wx-deploy.js",
"wx:review": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/generate-review-materials.js",
"wx:learn": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/wechat-experience-ledger.js preflight",
"wx:experience": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/wechat-experience-ledger.js",
"wx:health-check": "node .codex/skills/wechat-miniprogram-auto-port-deploy/scripts/skill-health-check.js"
}
}Then run:
npm run wx:setup
npm run wx:secrets-init
npm run wx:inspect
npm run wx:validatenpm run wx:setup # Create or merge non-sensitive Mini Program config
npm run wx:secrets-init # Create ignored local secret placeholders and scan for secret risks
npm run wx:inspect # Identify framework, package manager, Mini Program roots, CI, CloudBase, and risks
npm run wx:validate # Validate project structure, security, compatibility, domains, privacy, and package risk
npm run wx:preview # Generate preview QR code with miniprogram-ci
npm run wx:upload # Upload development/experience version with miniprogram-ci
npm run wx:deploy # Inspect, validate, build, validate again, then preview/upload/both
npm run wx:review # Generate review and release-preparation materials
npm run wx:learn -- "upload private key" # Search project-specific WeChat lessons
npm run wx:health-check # Check skill health, docs reachability, and dependency watchlistartifacts/wechat-inspect-report.jsonartifacts/wechat-validation-report.jsonartifacts/wechat-preview-qrcode.jpgartifacts/wechat-upload-report.jsonartifacts/wechat-deploy-report.jsonartifacts/wechat-review-materials.mdartifacts/wechat-secrets-init-report.jsonartifacts/wechat-skill-health-report.json
Generated artifacts are intended for local workflow and CI debugging. They should not contain secrets.
This skill is intentionally strict about credentials:
- Do not commit AppSecret.
- Do not commit upload private key content.
- Do not commit payment merchant keys or API v3 keys.
- Do not put
session_keyinto Mini Program frontend code or frontend storage. - Use
WECHAT_PRIVATE_KEY_PATHfor local upload key files. - Use
WECHAT_PRIVATE_KEYonly through CI Secrets or runtime environment variables. - Keep signing, payment order creation, and login code exchange on backend or CloudBase functions.
The wx:secrets-init command creates .env.local placeholders and .wechat-private/, checks ignore rules, and scans for obvious secret patterns without printing secret values.
| Source project | Recommended route |
|---|---|
| React | Taro by default, unless configured otherwise |
| Vue | uni-app by default, unless configured otherwise |
| H5 | Assessment first, then migrate business logic, API layer, data model, and pages |
| Existing Mini Program | Keep the current structure and improve validation, CI, security, and release readiness |
The skill avoids blind one-to-one DOM copying. It focuses on Mini Program-safe adapters for routing, request, storage, platform capability, permissions, privacy, and package-size control.
The skill can check and guide:
envIdwx.cloud.init- cloud functions
- CloudBase Run
- database and storage permissions
- Mini Program account and environment binding
- CloudBase Framework Mini Program plugin deployment settings
It does not assume you already have CloudBase permissions or that an environment is bound to your Mini Program account.
This project can generate review materials, pre-release checklists, and upload attempts when credentials and permissions are available. It cannot bypass WeChat review, guarantee approval, forge qualifications, hide real data collection, or replace manual confirmation for category, privacy, payment, content, and production backend readiness.
Suggested GitHub topics:
wechat-miniprogram, miniprogram, codex-skill, miniprogram-ci, taro, uni-app, cloudbase, wechat-devtools, frontend-migration, ci-cd, automation, security, privacy, release-automation
- Skill instructions
- Runtime documentation lookup policy
- First-run configuration
- Migration checklist
- Security checklist
- Deployment checklist
- CloudBase checklist
- Troubleshooting
Issues and pull requests are welcome. Useful contributions include new migration rules, better validation checks, CloudBase deployment patterns, official documentation update notes, and safer defaults for Mini Program CI.
Please do not include real AppID secrets, private keys, payment keys, API tokens, user data, or private business documents in issues or pull requests.
MIT