Preface¶
The Mini Program AI development paradigm requires that page capabilities be decomposed into atomic interfaces and atomic components conforming to wx.modelContext. These must be placed in an independent skills/ subpackage, alongside necessary modifications to app.json and project.config.json. Manually sorting out network requests, JSAPI calls, and business steps from existing business code involves a significant workload and a high risk of missing configuration updates.
The following introduces @tencent-adm/wxa-skills-generate on SkillHub (WeChat Mini Program AI Development Mode Skills Generator). It is designed for scenarios where “an existing Mini Program project requires a one-time generation of a skills subpackage skeleton”: The Agent reads the Skill instructions, performs static analysis on the project source code, and generates the code and configuration. Upon completion of the generation, the result should be handed over to @tencent-adm/wxa-skills-validate for verification, rather than treating it as ready for deployment.
What is this¶
One-sentence positioning: Analyzes Mini Program project source code (including minified and obfuscated code), identifies core business steps, extracts network interfaces and JSAPI calls, generates a skills subpackage conforming to the wx.modelContext specification (atomic interfaces + atomic components), and completes the configuration integration for app.json / project.config.json.
- Coordinate:
@tencent-adm/wxa-skills-generate - Version: 0.2.3 (as marked on the SkillHub page)
- Source: enterprise
- Publisher: WeChat Mini Program Team
- Category: dev-programming
- API Key: Labeled as
requires_api_key=false; no separate SkillHub API Key configuration is required after installation.
Official Entrances:
- Skill Metadata:
https://api.skillhub.cn/tencent-adm/wxa-skills-generate - SkillHub Detail Page:
https://www.skillhub.cn/skills/tencent-adm/wxa-skills-generate
Core Functions¶
The following capabilities are derived from the official introduction. This Skill performs static generation only and does not include runtime verification.
- Source Code Analysis: Reads the Mini Program project source code; the description explicitly supports minified and obfuscated code.
- Business Step Identification: Summarize core business steps from the source code to serve as the basis for subsequent atomic capability division.
- Interface and JSAPI Extraction: Sort out network interface calls and WeChat JSAPI calls in the project to facilitate mapping to AI-callable atomic interfaces.
- Skills Subpackage Generation: Produce content for subpackages conforming to the
wx.modelContextspecification, including atomic interfaces and atomic components, typically corresponding to theskills/subpackage structure within the project. - Engineering Configuration Integration: Automatically or semi-automatically complete the writing of configuration items related to the skills subpackage in
app.jsonandproject.config.json, reducing the omission of manual configuration changes. - Division of Labor with Verification Skill: After generation is complete, the baton must be passed to
wxa-skills-validate(@tencent-adm/wxa-skills-validate) for specification and integrity verification; this Skill does not replace the verification step.
Suggested scenarios for triggering within an Agent (as listed by the official source):
- Transform Mini Program page capabilities into Mini Program AI atomic interfaces
- Generate
skills/subpackage code - Derive MCP tools from source projects
- Code generation under the Mini Program AI development mode
Installation and Activation¶
The Skill is based on the universal SKILL.md format. After being installed into the current Agent’s skills directory via SkillHub, the Agent executes it according to the Skill documentation during the conversation.
1. Install SkillHub CLI (if not already installed)¶
First, check if skillhub exists:
command -v skillhub && skillhub --version
If not installed, you can follow the SkillHub installation documentation to perform a complete installation (CLI + Default Skill):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
CLI only:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
Instructions available at: https://skillhub.cn/install/skillhub.md.
2. Install this Skill¶
When installing, you must use --dir to point to the skills directory currently being used by the Agent; otherwise, it will be installed to ./skills/ by default, and the Agent may not recognize it.
skillhub install @tencent-adm/wxa-skills-generate --dir <skills directory>
Common client skills paths (from SkillHub installation documentation):
| Client | skills Directory |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under the project |
| Windsurf | ~/.codeium/windsurf/skills/ or .windsurf/skills/ under the project |
The SkillHub page also provides a method of “Sending the prompt to AI for installation”: Let the Agent install @tencent-adm/wxa-skills-generate based on https://skillhub.cn/install/skillhub.md. This is consistent with the CLI installation target, with the only difference being that the Agent performs the directory selection and command execution.
3. Activation and Follow-up Skills¶
This Skill does not require an API Key. If you wish to follow the complete “Generate → Validate” chain, you need to separately install @tencent-adm/wxa-skills-validate in the same Agent environment and explicitly trigger verification after the generation task ends.
Typical Usage¶
The official page does not provide a fixed one-line shell example; the actual usage is: Within an Agent where the Skill is installed, initiate a generation task for the target Mini Program project. The workflow can be understood in the following order:
- Prepare the Project: A locally readable and writable Mini Program project directory, including pages, logic, and existing
app.json/project.config.json. - State the Intent in the Agent: Reference one of the trigger scenarios from the previous section, for example: “Analyze the current Mini Program project, generate a
skills/subpackage conforming to wx.modelContext, and updateapp.jsonandproject.config.json.” - Agent Executes via SKILL.md: Scan source code (including obfuscation), extract interfaces and JSAPIs, output atomic interfaces/components and subpackage files, and write or prompt to merge configuration changes.
- Pass the Baton to Verification: After generation is complete, call
wxa-skills-validatein the same Agent to perform specification checks on the generated artifacts; do not skip this step to submit for review or launch directly.
If the project path is not in the current workspace, write the absolute path clearly in the conversation or open the corresponding folder first to avoid the Agent analyzing the wrong directory.
Applicable Scenarios and Notes¶
Who it is for
- Teams already using or planning to use the WeChat Mini Program AI development mode who need to decompose existing page capabilities into atomic interfaces/components.
- Developers hoping to derive
skills/subpackages or MCP tool definitions from existing Mini Programs, rather than hand-writing the subpackage skeleton from scratch.
Limitations and Notes
- Static Generation Only: Does not guarantee that the generated results are directly runnable; they must be iterated upon after passing
wxa-skills-validateverification. - Obfuscated Code: The official source claims support for minified/obfuscated source code, but extreme obfuscation may still affect the quality of step identification; a manual diff of critical business paths is required after generation.
- Configuration Merging: If
app.jsonorproject.config.jsonalready have complex custom structures, the generation results may require manual merging of conflict items. - Data Reference: SkillHub scraped metadata shows a score of 100000 and approximately 53585 downloads (statistics vary with SkillHub updates; please refer to the page for details).
Conclusion¶
@tencent-adm/wxa-skills-generate is published by the WeChat Mini Program Team. It converges “Read Source Code → Extract Interfaces and JSAPIs → Produce wx.modelContext Skill Subpackages and Engineering Configuration” into a Skill process that can be repeatedly executed by an Agent, forming a division of labor for generation and verification with wxa-skills-validate.
- SkillHub:
https://www.skillhub.cn/skills/tencent-adm/wxa-skills-generate - Metadata API:
https://api.skillhub.cn/tencent-adm/wxa-skills-generate