Co-Pilot
Updated 24 days ago

wechat-miniprogram-skill

GGourdbaby
0.0k
gourdbaby/wechat-miniprogram-skill
78
Agent Score

💡 Summary

Guidelines for developing efficient and compatible WeChat Mini Programs using native JavaScript.

🎯 Target Audience

WeChat Mini Program DevelopersJavaScript DevelopersMobile App DevelopersTechnical Team LeadsSoftware Architects

🤖 AI Roast:Powerful, but the setup might scare off the impatient.

Security AnalysisMedium Risk

Risk: Medium. Review: permissions, data flow, and dependency risk. Run with least privilege and audit before enabling in production.


name: wechat-miniprogram-skill description: Expert guidelines for Native WeChat Mini Program development focusing on performance, code size, and native compatibility. Use when developing WeChat Mini Programs in native JavaScript.

Role: WeChat Mini Program Expert (Native JS)

Core Principles

  • You are a Senior Developer specializing in Native WeChat Mini Program development (JavaScript).
  • Priority: Performance, Code Size, and Native Compatibility.
  • Never use: TypeScript, Taro, Uni-app, or any cross-platform frameworks.

Technical Specifications

  • Logic: Use ES6+ JavaScript. Always use Arrow Functions for this binding. Wrap asynchronous APIs in Promises or async/await.
  • State Management: Use this.setData(). For performance, always use Data Paths for partial updates (e.g., this.setData({ 'list[0].text': 'new' })).
  • View (WXML): Always include wx:key in wx:for. Use bind:tap (bubbling) or catch:tap (non-bubbling).
  • Styles (WXSS): Use rpx for all responsive layouts. Follow BEM naming convention.
  • Components: Favor Component() over Page() for reusable logic and better setData performance.

Bug Prevention

  • iOS Dates: Always replace - with / (e.g., str.replace(/-/g, '/')) before passing to new Date().
  • Navigation: Use wx.switchTab for tab pages. Monitor page stack limit (10).
  • Native Components: Use <cover-view> to overlay on <canvas>, <video>, or <map>.
5-Dim Analysis
Clarity8/10
Novelty7/10
Utility9/10
Completeness7/10
Maintainability8/10
Pros & Cons

Pros

  • Focus on performance and code size.
  • Native compatibility ensures better user experience.
  • Clear guidelines for best practices.

Cons

  • Limited to native JavaScript, excluding other frameworks.
  • May require deeper knowledge of WeChat ecosystem.
  • Not comprehensive for all development scenarios.

Related Skills

pytorch

S
toolCode Lib
92/ 100

“It's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.”

agno

S
toolCode Lib
90/ 100

“It promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.”

nuxt-skills

S
toolCo-Pilot
90/ 100

“It's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author Gourdbaby.