Pixi Mini-Game Readiness
Use this skill when the project is still Web-first today but must avoid architecture choices that will block future WeChat or Douyin mini-game support.
This skill does not implement wx or tt adapters. It defines what must stay abstract, which rules must be locked during audit, and what constraints must hand off into future dual-target development.
If the repository already maintains both Web and WeChat outputs, use $pixi-web-wechat-dual-target alongside this skill. Use this skill for audit and readiness work, not as the only ongoing-dev guardrail.
1) Audit First and Set Rules Before Code Changes
Before proposing refactors, identify where browser-only coupling already exists and turn that audit into no-regression constraints.
Treat these as migration risks when they appear outside a dedicated platform boundary:
- direct
window,document, ornavigatoraccess - direct
localStorage,sessionStorage, or IndexedDB usage - raw
fetchorXMLHttpRequestcalls in gameplay logic - browser-only audio or media APIs
- gameplay-critical HTML or CSS overlays
- resize, focus, visibility, or lifecycle logic wired directly to DOM events
- hardcoded asset roots such as
/assets/... - platform branches spread through scenes or systems
Document every finding as:
blockerhigh-riskwatch
Also document:
- which directories may contain platform-specific code
- which layers must stay platform-neutral
- which validation commands must stay green after readiness refactors
2) Refactor Readiness Without Writing Vendor Adapters
Keep these contracts explicit even if they initially have only Web implementations:
RuntimeTarget = 'web' | 'wechat-minigame' | 'douyin-minigame'GameBootConfigPlatformBridgeAssetResolverStorageBridgeInputAdapterSceneContract
Reserve interfaces for:
- launch parameters
- pause and resume lifecycle
- persistence
- share
- vibration or haptics
- open data context or leaderboard bridges
Do not implement vendor details in v1 unless the user explicitly asks for real mini-game integration.
3) Hand Off Explicit Constraints for Dual-Target Development
The readiness output must not stop at "this is adaptable." It must leave behind constraints that future Web work cannot violate.
Hand off:
- current readiness level
- blocker and high-risk list
- contracts that must exist now
- safe temporary Web-only code that may remain isolated
- validation commands that future contributors must run
- official documents that must be re-verified when real
wxorttwork starts
Resource Map
references/readiness.md: audit workflow, severity model, and deliverable templatereferences/platform-abstraction-contract.md: recommended future-proof interfacesreferences/dual-target-red-lines.md: rules that should be locked during audit and kept during future developmentreferences/wechat.md: WeChat mini-game verification notes and official linksreferences/douyin.md: Douyin mini-game verification notes and official links