Auth Wechat Miniprogram
TencentCloudBase/CloudBase-AI-Toolkit
CloudBase WeChat Mini Program native authentication guide. An agent skill from TencentCloudBase/CloudBase-AI-Toolkit.
Complete guide for WeChat Mini Program authentication with CloudBase - native login, user identity, and cloud function integration.
$ npx skills add LeoYeAI/openclaw-master-skills --skill auth-wechat-miniprogram -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills auth-wechat-miniprogram --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cloudbase/references/auth-wechat .claude/skills/auth-wechat-miniprogram && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "auth-wechat-miniprogram" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/cloudbase/references/auth-wechat into .claude/skills/auth-wechat-miniprogram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-wechat-miniprogram", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/cloudbase/references/auth-wechatType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill auth-wechat-miniprogram -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills auth-wechat-miniprogram --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/cloudbase/references/auth-wechat .agents/skills/auth-wechat-miniprogram && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "auth-wechat-miniprogram" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/cloudbase/references/auth-wechat into .agents/skills/auth-wechat-miniprogram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-wechat-miniprogram", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill auth-wechat-miniprogram -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills auth-wechat-miniprogram --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/cloudbase/references/auth-wechat .cursor/skills/auth-wechat-miniprogram && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "auth-wechat-miniprogram" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/cloudbase/references/auth-wechat into .cursor/skills/auth-wechat-miniprogram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-wechat-miniprogram", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/cloudbase/references/auth-wechat--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill auth-wechat-miniprogram -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills auth-wechat-miniprogram --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/cloudbase/references/auth-wechat .gemini/skills/auth-wechat-miniprogram && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "auth-wechat-miniprogram" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/cloudbase/references/auth-wechat into .gemini/skills/auth-wechat-miniprogram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-wechat-miniprogram", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills auth-wechat-miniprogramInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill auth-wechat-miniprogram -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/cloudbase/references/auth-wechat .github/skills/auth-wechat-miniprogram && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "auth-wechat-miniprogram" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/cloudbase/references/auth-wechat into .github/skills/auth-wechat-miniprogram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-wechat-miniprogram", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill auth-wechat-miniprogram -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills auth-wechat-miniprogram --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/cloudbase/references/auth-wechat .opencode/skills/auth-wechat-miniprogram && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "auth-wechat-miniprogram" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/cloudbase/references/auth-wechat into .opencode/skills/auth-wechat-miniprogram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-wechat-miniprogram", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
auth-wechat-miniprogramComplete guide for WeChat Mini Program authentication with CloudBase - native login, user identity, and cloud function integration.
Auth Wechat Miniprogram is an agent skill from LeoYeAI/openclaw-master-skills. Complete guide for WeChat Mini Program authentication with CloudBase - native login, user identity, and cloud function integration.
Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Messaging and chat bots, Serverless and Authentication. It works with WeChat. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Auth Wechat Miniprogram loads about 3k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 956 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 956 words, ~2,994 tokens.
.claude/skills/auth-wechat-miniprogram/SKILL.md (or your agent's skills folder).Use this skill for WeChat Mini Program (小程序) authentication in a CloudBase project.
Use it when you need to:
Key advantage: WeChat Mini Program authentication with CloudBase is seamless and automatic - no complex OAuth flows needed. When a Mini Program calls a cloud function, the user's openid is automatically injected and verified by WeChat.
Do NOT use for:
Confirm CloudBase environment
env – CloudBase environment IDUnderstand the authentication flow
Pick a scenario from this file
Follow CloudBase API shapes exactly
wx-server-sdk in cloud functionswx.cloud in Mini Program client codeIf you're unsure about an API
Automatic authentication:
User identifiers:
OPENID – Unique identifier for the user in this specific Mini ProgramAPPID – The Mini Program's App IDUNIONID – (Optional) Unique identifier across all apps under the same WeChat Open Platform accountSecurity:
openid, appid, and unionid are verified and trustworthyNo explicit login required:
Use this in your Mini Program's app.js or entry point:
// app.js
App({
onLaunch: function () {
// Initialize CloudBase
wx.cloud.init({
env: 'your-env-id', // Your CloudBase environment ID
traceUser: true // Optional: track user access in console
})
}
})Key points:
wx.cloud.init() once when the Mini Program launchesenv to your CloudBase environment IDtraceUser: true enables user access tracking in CloudBase console (optional but recommended)Use this when you need to know who is calling your cloud function:
// Cloud function: cloudfunctions/getUserInfo/index.js
const cloud = require('wx-server-sdk')
// Initialize cloud with dynamic environment
cloud.init({
env: cloud.DYNAMIC_CURRENT_ENV
})
exports.main = async (event, context) => {
// Get user identity - this is automatically injected by WeChat
const { OPENID, APPID, UNIONID } = cloud.getWXContext()
console.log('User identity:', { OPENID, APPID, UNIONID })
// Use OPENID for user-specific operations
// For example: query user data, check permissions, etc.
return {
openid: OPENID,
appid: APPID,
unionid: UNIONID // May be undefined if not available
}
}Key points:
cloud.getWXContext() to get user identityOPENID is always available and uniquely identifies the userAPPID identifies the Mini ProgramUNIONID is only available when:cloud.DYNAMIC_CURRENT_ENV to automatically use the current environmentBest practices:
OPENID in your database to associate data with usersOPENID for authorization and access controlUNIONID when you need to identify users across multiple Mini Programs or Official AccountsOPENID to other users (it's a private identifier)Use this in your Mini Program to call a cloud function and get user identity:
// In Mini Program page
Page({
onLoad: function() {
this.getUserInfo()
},
getUserInfo: function() {
wx.cloud.callFunction({
name: 'getUserInfo', // Cloud function name
data: {}, // Optional parameters
success: res => {
console.log('User info from cloud function:', res.result)
// res.result contains { openid, appid, unionid }
// Use the user info
this.setData({
openid: res.result.openid
})
},
fail: err => {
console.error('Failed to get user info:', err)
}
})
}
})Key points:
wx.cloud.callFunction() to call cloud functionsCloud function (cloudfunctions/test/index.js):
const cloud = require('wx-server-sdk')
cloud.init({
env: cloud.DYNAMIC_CURRENT_ENV
})
exports.main = async (event, context) => {
// Get verified user identity - automatically injected by WeChat
const { OPENID, APPID, UNIONID } = cloud.getWXContext()
console.log('User identity:', { OPENID, APPID, UNIONID })
return {
success: true,
message: 'Authentication successful',
identity: {
openid: OPENID,
appid: APPID,
unionid: UNIONID || 'Not available'
},
timestamp: new Date().toISOString()
}
}Mini Program code:
// pages/index/index.js
Page({
data: {
userIdentity: null
},
onLoad: function() {
this.testAuth()
},
testAuth: function() {
console.log('Testing authentication...')
wx.cloud.callFunction({
name: 'test',
success: res => {
console.log('Authentication test result:', res.result)
this.setData({
userIdentity: res.result.identity
})
wx.showToast({
title: 'Auth successful',
icon: 'success'
})
},
fail: err => {
console.error('Authentication test failed:', err)
wx.showToast({
title: 'Auth failed',
icon: 'error'
})
}
})
}
})Key points:
OPENID is always present and verifiedUNIONID may be undefined if not availablecloud.init({
env: cloud.DYNAMIC_CURRENT_ENV
})This ensures the cloud function uses the correct environment automatically.
OPENID as the primary user identifierOPENID to other usersconst { OPENID, UNIONID } = cloud.getWXContext()
if (UNIONID) {
// User has UNIONID - can be used for cross-app identification
console.log('UNIONID available:', UNIONID)
} else {
// UNIONID not available - use OPENID only
console.log('Using OPENID only:', OPENID)
}OPENID to identify and authorize usersOPENID when you need to associate data with usersOPENID in queries to ensure users only access their own dataAlways handle errors when calling cloud functions:
wx.cloud.callFunction({
name: 'myFunction',
success: res => {
// Handle success
},
fail: err => {
console.error('Cloud function error:', err)
// Show user-friendly error message
wx.showToast({
title: 'Operation failed',
icon: 'error'
})
}
})Initialize CloudBase in app.js onLaunch:
App({
onLaunch: function () {
wx.cloud.init({
env: 'your-env-id',
traceUser: true
})
}
})const cloud = require('wx-server-sdk')
cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV })
exports.main = async (event, context) => {
const { OPENID, APPID, UNIONID } = cloud.getWXContext()
return {
openid: OPENID,
appid: APPID,
unionid: UNIONID || null
}
}const cloud = require('wx-server-sdk')
cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV })
exports.main = async (event, context) => {
const { OPENID } = cloud.getWXContext()
// Check if user is authorized
if (OPENID === event.resourceOwnerId) {
// User is authorized to access this resource
return { authorized: true }
} else {
return { authorized: false, error: 'Unauthorized' }
}
}const cloud = require('wx-server-sdk')
cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV })
exports.main = async (event, context) => {
const { OPENID, UNIONID } = cloud.getWXContext()
if (UNIONID) {
// Can use UNIONID for cross-app user identification
console.log('User has UNIONID:', UNIONID)
} else {
// Fall back to OPENID only
console.log('Using OPENID only:', OPENID)
}
return { openid: OPENID, hasUnionId: !!UNIONID }
}WeChat Mini Program authentication with CloudBase is simple and secure:
OPENID, APPID, and UNIONID are trustworthycloud.getWXContext() in cloud functionsKey takeaways:
wx.cloud.init() in Mini Programcloud.getWXContext() to get user identity in cloud functionsOPENID for user identification and authorizationUNIONID availability appropriatelyFor more complex authentication scenarios or integration with other systems, consider using CloudBase custom login in combination with WeChat authentication.
© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/cloudbase/references/auth-wechat of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in LeoYeAI/openclaw-master-skills, which our catalogue first saw on October 7, 2026.
Auth Wechat Miniprogram next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Auth Wechat Miniprogram this skillLeoYeAI/openclaw-master-skills | 2.2k | 1 repos | ~3k | Automated safety check: Pass | MIT | |
| Auth Wechat MiniprogramTencentCloudBase/CloudBase-AI-Toolkit | 1.1k | 2 repos | ~1.4k | Automated safety check: Pass | MIT | |
| AI Model NodejsTencentCloudBase/CloudBase-AI-Toolkit | 1.1k | 3 repos | ~5k | Automated safety check: Pass | MIT | |
| Minimal Web Baas DemoTencentCloudBase/CloudBase-AI-Toolkit | 1.1k | 1 repos | ~2.2k | Automated safety check: Pass | MIT | |
| AI Model Nodejsmajiayu000/claude-skill-registry | 666 | 2 repos | ~1.7k | Automated safety check: Pass | MIT | |
| SpecfusionLiangNiang/OpenMantis | 110 | — | ~2.1k | Automated safety check: Notes | Apache-2.0 |
TencentCloudBase/CloudBase-AI-Toolkit
CloudBase WeChat Mini Program native authentication guide. An agent skill from TencentCloudBase/CloudBase-AI-Toolkit.
TencentCloudBase/CloudBase-AI-Toolkit
A skill your agent uses for Node.js backend AI via @cloudbase/node-sdk (=3.16.0) — cloud functions, CloudRun, Express/Koa/NestJS, serverless APIs, scheduled jobs, LLM proxies, agent orchestration.
TencentCloudBase/CloudBase-AI-Toolkit
Fast path for a minimal CloudBase Web + database demo (最小前后端 / 最小可用 fullstack / Lovable-like BaaS).
majiayu000/claude-skill-registry
A skill your agent uses when developing Node.js backend services or CloudBase cloud functions (Express/Koa/NestJS, serverless, backend APIs) that need AI capabilities.
LiangNiang/OpenMantis
企业微信 飞书 钉钉 淘宝 小红书 抖音电商 微信小程序 微信小店 拼多多 有赞 微信支付 支付宝 京东 SHEIN 得物 火山引擎 阿里云百炼 泛微 北森 API文档搜索。
TencentCloudBase/CloudBase-AI-Toolkit
WeChat Mini Program development skill for building, debugging, previewing, testing, publishing, and optimizing mini program projects (小程序开发、调试、预览、发布).
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Works with
Categories
Complete guide for WeChat Mini Program authentication with CloudBase - native login, user identity, and cloud function integration. Auth Wechat Miniprogram is an agent skill from LeoYeAI/openclaw-master-skills. Complete guide for WeChat Mini Program authentication with CloudBase - native login, user identity, and cloud function integration.
Auth Wechat Miniprogram fits situations like: tasks that involve Messaging and chat bots; tasks that involve Serverless; tasks that involve Authentication.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill auth-wechat-miniprogram -a claude-code`. Or copy the skill folder (skills/cloudbase/references/auth-wechat in LeoYeAI/openclaw-master-skills) into .claude/skills/auth-wechat-miniprogram in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill auth-wechat-miniprogram -a codex`. Or copy the skill folder (skills/cloudbase/references/auth-wechat in LeoYeAI/openclaw-master-skills) into .agents/skills/auth-wechat-miniprogram in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill auth-wechat-miniprogram -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/auth-wechat-miniprogram, .gemini/skills/auth-wechat-miniprogram, .github/skills/auth-wechat-miniprogram and .opencode/skills/auth-wechat-miniprogram in your project.
SKILL.md names no scripts, command-line tools or credentials: Auth Wechat Miniprogram is instructions for the agent only. Our summary lists: Node.js.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Auth Wechat Miniprogram is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Auth Wechat Miniprogram: Auth Wechat Miniprogram (TencentCloudBase/CloudBase-AI-Toolkit, 1.1k stars), AI Model Nodejs (TencentCloudBase/CloudBase-AI-Toolkit, 1.1k stars), Minimal Web Baas Demo (TencentCloudBase/CloudBase-AI-Toolkit, 1.1k stars) and AI Model Nodejs (majiayu000/claude-skill-registry, 666 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,158 GitHub stars. The repository holds 1,215 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.