Community编程与开发github.com

tianmind-studio/wechat-miniapp-factory

微信小程序工厂 / WeChat MiniApp Factory: Codex skills to scaffold, validate, and pre-review Mini Programs before submission

wechat-miniapp-factory 是什么?

wechat-miniapp-factory is a Codex agent skill that 微信小程序工厂 / WeChat MiniApp Factory: Codex skills to scaffold, validate, and pre-review Mini Programs before submission.

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add tianmind-studio/wechat-miniapp-factory

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

wechat-miniapp-factory 是做什么的?

WeChat MiniApp Factory: Codex skills to scaffold, validate, and pre-review WeChat Mini Programs before submission.

Overview

This skill provides a set of commands and workflows for AI agents to:

  • Scaffold a new Mini Program project with a recommended file structure and configuration.
  • Validate the project against WeChat's official guidelines and common pitfalls.
  • Pre-review the code for potential issues before submitting to WeChat's review.

Usage

Scaffolding a New Project

Use the scaffold action to create a new Mini Program project:

scaffold --appid YOUR_APPID --name "My MiniApp"

This generates:

  • app.js, app.json, app.wxss
  • A pages/ directory with a sample page
  • A utils/ directory for helpers
  • A default .gitignore and README.md

Validation

Run validation against your current project:

validate --path ./miniprogram

The validation checks:

  • Required files exist (app.js, app.json, app.wxss)
  • Pages referenced in app.json actually exist
  • No deprecated APIs from WeChat SDK are used
  • Environment variables like WX_APPID are set

Pre-Review

Generate a pre-submission review report:

pre-review --path ./miniprogram

This will output a checklist of items to verify before submission, such as:

  • Private keys exposed in code
  • Hardcoded environment variables
  • Missing privacy policy or user agreement pages
  • Code issues flagged by WeChat's best practices

Continuous Integration

The skill can be integrated into CI/CD pipelines. Example GitHub Actions workflow snippet:

name: MiniApp CI
on: [push]
jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Validate Mini Program
        run: npx wechat-miniapp-factory validate

Configuration

Set the following environment variables:

VariableDescriptionRequired
WX_APPIDYour WeChat Mini Program App IDYes
WX_APP_SECRETWeChat App Secret (for API calls)No

Supported Platforms

This skill is designed for use with:

  • Claude Code (Anthropic)
  • Cursor (Cursor AI)
  • Codex (GitHub Copilot)

License

MIT

相关技能