WeChat DevTools Control
Use this fallback umbrella skill for the local WeChat workflow when a narrower WeChat skill is not explicitly selected.
Entry
$RepoRoot = (Get-Location).Path
. (Join-Path $RepoRoot "scripts\wechat.ps1")
Main workflow
Invoke-WechatBootstrap
Invoke-WechatDoctor
Invoke-WechatCreate -Prompt "build a notebook mini program" -Open $true -Preview $true
Generated project operations
Get-GeneratedProjectList
Invoke-GeneratedProjectOpen
Invoke-GeneratedProjectPreview
Invoke-GeneratedProjectDeployGuard
Invoke-GeneratedProjectSetAppId
Invoke-GeneratedProjectUpload -DryRun $true
Validation
powershell -ExecutionPolicy Bypass -File (Join-Path $RepoRoot "scripts\test-wechat-skill.ps1") -GuardCheckOnly
powershell -ExecutionPolicy Bypass -File (Join-Path $RepoRoot "scripts\test-wechat-skill.ps1") -SkipSmoke -Tag fast
Safety defaults
- Keep generated projects preview-first by default.
- Block deploy/upload for
touristappidprojects. - Allow guarded upload/deploy only after setting a real appid and passing checks.
- Keep broad write/deploy routes disabled unless explicitly requested.
AutoFix loop policy (required)
When the user asks for "generate and make it correct", this skill must follow a repair loop and must not report success early.
- Generate/update the target project code.
- Run detector round (
automatorpreferred; fallback route allowed). - If any issue is found, produce and apply a repair change.
- Re-run detector round.
- Repeat until:
- success: checks pass, or
- blocked: runtime/environment blocker, or
- failed: max rounds reached.
Hard rule:
- Do not return
successwhile known issues remain. - Do not wait for extra user feedback between loop rounds unless the state is
blocked. - Runtime blockers (for example invalid appid, automator startup failure) must be surfaced explicitly as
blocked, not hidden as pass.
Compile error gate (required)
After project open/startup, compile/runtime parse errors in DevTools must be treated as blocking issues, not as startup success.
Examples:
- WXML parse errors such as
unexpected token/Bad value with message - file-level compile errors like
at files://...wxml - JS runtime load failures that stop page render
Required behavior:
- Run a post-open detection round before declaring success.
- If compile error evidence exists, classify as issue (critical), enter repair loop, and re-check.
- Only return success when compile errors are cleared and detector result is healthy.
- Collect console logs into
artifacts\wechat-devtools\console\latest.logand evaluate them in every repair round.
Prefer narrower skills when appropriate
wechat-spec-executorwechat-release-guardwechat-lab-builder