Adding a Weekly Leaderboard to WeChat Mini Games: Open Data Context Friends Ranking and Weekly Reset

Introduction

Building a friend high-score leaderboard in a native Canvas WeChat mini-game typically involves working with the open data domain, wx.setUserCloudStorage / wx.getFriendCloudStorage, and sharedCanvas rendering all at once. Weekly leaderboards additionally require cycle-based filtering or reset logic at the presentation layer. Many projects run into issues like “the friend leaderboard flashes briefly and then only shows local/self scores,” and debugging often requires cross-referencing multiple documentation pages. Below we introduce the community Skill “Add Weekly Leaderboard to WeChat Mini Game” on SkillHub, which can be referenced when supplementing or fixing weekly leaderboard-related implementations in a coding assistant context.

What Is This

“Add Weekly Leaderboard to WeChat Mini Game” is a community Skill at the SkillHub coordinate @user_c830ad09/wechat-weekly-leaderboard, version 1.0.0, categorized under dev-programming, published by user_c830ad09, with the page listing the author as Liangzhi Xiaocao. The tag requires_api_key=false indicates it does not depend on any additional API Key.

The Skill’s scope is: adding or fixing a weekly-reset/filtered friend high-score leaderboard in a native Canvas JavaScript WeChat mini-game, covering common steps such as data reporting, retrieval, rendering, and local fallback.

Core Features

According to the official description, this Skill is applicable to the following tasks and issues (wording consistent with the SkillHub page):

  • Open data domain leaderboard: wx.setUserCloudStorage for reporting, wx.getFriendCloudStorage for rendering.
  • Weekly dimension: weekly reset and weekly filtering logic.
  • Display: sharedCanvas drawing, leaderboard panel UI.
  • Fallback: local fallback scores (displaying reasonable results even when friend cloud data is unavailable or errors occur).
  • Bug fixing: the issue where the friend ranking briefly appears and then falls back to only local/self scores.

For API-level details not separately listed on the public page, refer to the SKILL.md file within the Skill package. This article does not elaborate on unverified implementation steps.

Installation & Activation

For installation instructions, follow the official SkillHub documentation: first refer to the SkillHub Installation Guide, then install this Skill.

  1. Verify that the skillhub CLI is installed locally:
command -v skillhub && skillhub --version

If not installed, you can run the one-click installation script as described in the documentation (full install or --cli-only for CLI only).

  1. Install the Skill to the skills directory recognized by your current Agent (the --dir flag is required; otherwise it defaults to ./skills/ which may not be loaded):
skillhub install user_c830ad09/wechat-weekly-leaderboard --dir <skills directory>

Examples of skills directories across different environments (from the official installation docs):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, restart or refresh skill loading according to your Agent’s conventions. Page statistics (at time of capture): 969 downloads, 0 install count, rating 100000; SkillHub displays the category as a development & programming Skill.

Typical Usage

When handling weekly leaderboards for WeChat mini-games in a conversation, simply state the tech stack and current status to trigger the Skill. For example: native Canvas JS mini-game, need open data domain friend weekly leaderboard, cloud storage reporting and sharedCanvas already implemented or partially implemented, or encountering the issue where the friend ranking flashes and then only shows local scores.

The English trigger scenarios from the Skill description can serve as a reference for capability boundaries (consistent with the official site):

Add or fix a weekly high-score friend leaderboard in a WeChat mini game.
Use when working on native Canvas JavaScript mini games that need open data
domain leaderboards, wx.setUserCloudStorage reporting, wx.getFriendCloudStorage
rendering, weekly reset/filtering, sharedCanvas drawing, local fallback scores,
ranking panels, or bugs where the friend ranking flashes then falls back to only
local/self score.

The specific file structure, sample code, and modification checklist are generated on demand by the Agent within the Skill content. This article does not fabricate repository paths or API parameters.

Use Cases & Caveats

Who It’s For

  • Developers using the native Canvas + JavaScript tech stack for WeChat mini-games.
  • Teams that need to implement a weekly leaderboard (rather than just an all-time overall leaderboard) under the friend cloud storage system.
  • Maintainers troubleshooting issues with the open data domain, shared canvas rendering, or the “only my own score is displayed” problem.

Limitations & Notes

  • The source is a community Skill; its behavior is related to WeChat base library and open data domain policy changes. After upgrading the client or base library, re-run self-tests.
  • Only applicable to the capabilities and tech stack described in the Skill; non-Canvas mini-games or projects not using the open data domain may not be a match.
  • The “0 installs” in the installation statistics only reflects SkillHub’s counting method and does not imply no one uses it. Rely on your local skillhub install and whether your Agent actually loads it.

Conclusion

“Add Weekly Leaderboard to WeChat Mini Game” consolidates topics such as weekly leaderboards, cloud storage friend rankings, sharedCanvas, and local fallback into a single searchable Agent Skill, making it suitable for enabling when adding a weekly leaderboard or debugging related bugs. Official Skill page and installation guide:

  • SkillHub: https://www.skillhub.cn/skills/user_c830ad09/wechat-weekly-leaderboard
  • API endpoint: https://api.skillhub.cn/user_c830ad09/wechat-weekly-leaderboard
  • Installation guide: https://skillhub.cn/install/skillhub.md
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye