CommunityCoding & Developmentgithub.com

WeChat MiniApp Factory

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

What is WeChat MiniApp Factory?

WeChat MiniApp Factory is a specialized toolset for AI coding agents (like GitHub Copilot's Codex agent) to streamline the development of WeChat Mini Programs. It scaffolds project structures quickly, validates code against WeChat's SDK requirements and best practices, and performs pre-submission reviews to catch common issues early—reducing rejection risk during official review. Built for developers using agent-based coding platforms (Claude Code, Cursor, Codex), it integrates with the official WeChat developer ecosystem. The skill is documented in a SKILL.md that outlines commands for scaffolding, validation functions, and review checklists.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add tianmind-studio/wechat-miniapp-factory

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does WeChat MiniApp Factory do?

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

Related Skills