AI Agent Hub
Back to skills
WeChat Mini Program AI Development Mode Validation icon

WeChat Mini Program AI Development Mode Validation

Development Updated 2026.08.30

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

Please refer to https://skillhub.cn/install/skillhub.md to install @tencent-adm/wxa-skills-validate.

About this skill

Challenges in Validating WeChat Mini Program AI Development Mode Artifacts

In WeChat Mini Program development, SKILLs artifacts generated via AI mode (such as skill packages) require rigorous validation before deployment. These artifacts include mcp.json, interface code, and component files, but often suffer from static configuration errors, interface execution failures, component rendering issues, or incomplete delivery documentation. Manual verification is time-consuming and error-prone, especially when handling multiple skill subpackages and sensitive interfaces, leading to fragmented development workflows without a unified tool.

Core Validation Workflow

This skill provides a closed-loop validation mechanism, covering the full pipeline from static checks to real-device verification:
- Static Validation: Automatically scans skill subpackages and executes V001-V019 rules (e.g., Schema consistency, component binding), generating validation reports and classifying errors (such as T1 naming mistakes or T5 compliance violations).
- Atomic Interface Execution: Uses WeChat Developer Tools CLI to execute interfaces, ensuring status === "ok" and invokeResult.isError !== true. Sensitive interfaces (e.g., those with side effects) are managed via destructive-manifest.json and skipped by default, only running with --confirm-destructive upon explicit user confirmation.
- Atomic Component Rendering: For interfaces with _meta.ui.componentPath, runs render and performs 5-point checks (e.g., lifecycle logs, overflow detection) to ensure components render correctly on real devices.
- Delivery Document Generation: After validation passes, generates a DELIVERY.md template summarizing results.

During execution, the skill arranges interface calls in topological order (non-parameterized interfaces first), maintains a data pool for parameter passing, and automatically fixes failures based on error types (e.g., T2 aligning fields, T3 adjusting bindings). Iteration rules limit repair rounds to prevent infinite loops.

Applicable Boundaries and Considerations

  • Environment Dependencies: Requires Node.js ≥ 18, WeChat Developer Tools installed with CLI available; projects must configure project.config.json (with appid) and app.json (with agent.skills).
  • Sensitive Interface Handling: Interfaces hitting sensitive keywords are pre-screened by V019, requiring model judgment to edit destructive-manifest.json; unapproved interfaces are intercepted by default for safety.
  • Validation Strictness: Static compilation success does not equal acceptance; real-device execution and rendering are mandatory, and a single interface is allowed to hang only after 3 consecutive repair failures.
  • Limitations: Not applicable to main package code validation; depends on CLI stability—tool timeouts must be handled manually; the product directory cli-agent-run/ is automatically added to ignore lists to avoid developer tool interference.
    When using, complete each phase step-by-step and refer to references/CLI_AGENT_REFERENCE.md for complex scenarios.

Use Cases

  • After completing the coding of a WeChat Mini Program AI skill package, developers use this skill to perform static rule checks and compilation validation to ensure mcp.json and component files meet standards.
  • Before delivering a skill package, run atomic interface execute and render tests via this skill to verify functional correctness and component rendering on real devices.
  • When encountering validation errors (such as Schema mismatches or component binding issues), leverage the skill's auto-fix functionality to locate and modify problematic files without manual debugging.
  • For skill packages with sensitive interfaces, use the skill's sensitive interface management mechanism to skip dangerous execution and generate annotations in the delivery document.

Best For

  • Engineers responsible for developing WeChat Mini Program AI skills who need to ensure newly developed skill packages pass static validation and real-device tests before integration.
  • Technical leads maintaining the Mini Program skill library who need to batch-verify compliance of multiple skill subpackages and generate delivery documents for team review.
  • QA personnel performing Mini Program functional testing who need to simulate interface execution and component rendering to verify skill performance in real environments.
  • Project managers integrating third-party AI capabilities who need to confirm the safety of skill packages (e.g., sensitive interface handling) to avoid production risks.