AI Agent Hub
Back to skills
WeChat Mini Program Pitfall and Collaboration Guide icon

WeChat Mini Program Pitfall and Collaboration Guide

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install the @user_6b038fe4/wechat-miniprogram-guardian skill into your AI assistant according to https://skillhub.cn/install/skillhub.md.

About this skill

The problem it addresses

Many WeChat Mini Program incidents are not feature bugs, but boundary failures in audit compliance, ad placement, local storage, and cross-project collaboration:
- A WeChat ID, email address, or official account appears in the UI and is rejected as channel diversion;
- wx:if, hidden, or bottom-ad positioning is changed incorrectly, causing occupied screen space or blank areas;
- “Data lost after restart” is usually caused by broken _contentDirty / _layoutDirty protection;
- AI assistants add unrequested features in user projects or misread “enforce subscription” as “make it free.”

How the skill works

wechat-miniprogram-guardian turns maintenance lessons from live projects into actionable references:
- Greenfield builds: follow greenfield-build.md for app.json, local-first storage, separated ad systems, and compliant entry points;
- Live project fixes: use audit-compliance.md, ad-systems.md, and local-first-storage.md to diagnose ads, storage, and audit issues;
- Collaboration guardrails: use collaboration-rules.md and agent-collaboration-guardrails.md to read code first, lock file paths, and verify completion with grep;
- Self-upgrade: append sanitized “problem + approach” entries to learnings.md, without storing code, file paths, secrets, or personal data.

The execution flow is explicit: locate the current implementation with keyword search, separate safe-to-change modules from frozen ones, run syntax and keyword checks after edits, and state whether frontend upload or cloud-function deployment is required for the change to take effect.

Use Cases

  • When a Mini Program submission is rejected for diverting users to other channels, replace WeChat IDs or emails with a compliant contact button.
  • When the bottom ad occupies space or leaves blank gaps after hiding, locate the ad container and adjust its bottom offset without touching incentive videos.
  • When saved data disappears after restart, inspect local-first storage and verify _contentDirty or _layoutDirty protection logic.
  • Before enabling subscription, credits, or access gates in a live project, read existing code, lock file paths, and avoid unrequested feature changes.

Best For

  • Frontend engineers maintaining a live Mini Program who want to reduce audit rejections, ad layout failures, and storage rollback incidents.
  • Independent developers taking over an existing Mini Program who need to fix production issues without breaking established rules or ad systems.
  • Engineers using AI assistants to edit Mini Program code who need guardrails against unrequested changes, false completion, and ad deletion.
  • Mini Program product managers owning word-library import, credits, and subscription rollout who need data import, cloud deployment, and access-control rules.