
auth-wechat-miniprogram
CloudBase WeChat Mini Program native authentication guide. This skill should be used when users need mini program identity handling, OPENID/UNIONID access, or wx.cloud auth behavior in projects where login is native and automatic.
- Installs
- 81
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/tencentcloudbase/cloudbase-ai-toolkit --skill auth-wechat-miniprogram- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads auth-wechat-miniprogram automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Sibling skills (local only)
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.
Activation Contract
Use this first when
- The task is about WeChat Mini Program auth behavior,
wx.cloudidentity,OPENID/UNIONID, or how a mini program caller is identified in CloudBase. - The project is a CloudBase mini program and the auth question is about native mini program identity rather than provider configuration.
Read before writing code if
- The request mentions mini program login, user identity in cloud functions, or
wx.cloudauth assumptions. - The user expects a Web-style login page or explicit token exchange in a mini program; route them back to native mini program auth behavior.
Then also read
- Mini program project implementation ->
../miniprogram-development/SKILL.md - Cloud function implementation ->
../cloud-functions/SKILL.md
Do NOT use for
- Web-based WeChat login or Web auth UI.
- Provider enable/disable or auth console setup.
- Generic Node-side auth flows outside mini program identity handling.
Common mistakes / gotchas
- Generating a Web-style login page for a
wx.cloudmini program. - Treating mini program auth as a provider-configuration problem.
- Forgetting that caller identity is injected in cloud functions automatically.
When to use this skill
Use this skill for WeChat Mini Program (小程序) authentication in a CloudBase project.
Use it when you need to:
- Implement identity-aware WeChat Mini Program flows with CloudBase
- Access user identity (openid, unionid) in cloud functions
- Understand how WeChat authentication integrates with CloudBase
- Build Mini Program features that require user identification
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:
- Web-based WeChat login (use the auth-web skill)
- Server-side auth with Node SDK (use the auth-nodejs skill)
- Non-WeChat authentication methods (use appropriate auth skills)
How to use this skill (for a coding agent)
-
Confirm CloudBase environment
- Ask the user for:
env– CloudBase environment ID- Confirm the Mini Program is linked to the CloudBase environment
- Ask the user for:
-
Understand the authentication flow
- WeChat Mini Program authentication is native and automatic
- No explicit login API calls needed in most cases
- User identity is automatically available in cloud functions
- CloudBase handles all authentication verification
-
Pick a scenario from this file
- For basic user identity in cloud functions, use Scenario 2
- For Mini Program initialization, use Scenario 1
- For calling a cloud function from the Mini Program and receiving user identity, use Scenario 3
- For testing authentication, use Scenario 4
-
Follow CloudBase API shapes exactly
- Use
wx-server-sdkin cloud functions - Use
wx.cloudin Mini Program client code - Treat method names and parameter shapes in this file as canonical
- Use
-
If you're unsure about an API
- Consult the official CloudBase Mini Program documentation
- Only use methods that appear in official documentation
Core concepts
How WeChat Mini Program authentication works with CloudBase
-
Automatic authentication:
- When a Mini Program user calls a cloud function, WeChat automatically injects the user's identity
- No need for complex OAuth flows or token management
- CloudBase verifies the authenticity of the identity
-
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 account- Only available when the Mini Program is bound to a WeChat Open Platform account
- Useful for identifying the same user across multiple Mini Programs or Official Accounts
-
Security:
- The
openid,appid, andunionidare verified and trustworthy - WeChat has already completed authentication
- Developers can directly use these identifiers without additional verification
- The
-
No explicit login required:
- Users are automatically authenticated when they use the Mini Program
- No need to call login APIs in most cases
- Identity is available immediately in cloud functions
Extended guide
For detailed scenarios, examples, and patterns, read extended-guide.md.
Reference index
All packaged reference files (required for skill lint reachability):
- extended-guide.md
FAQ
What does the auth-wechat-miniprogram skill do?
CloudBase WeChat Mini Program native authentication guide. This skill should be used when users need mini program identity handling, OPENID/UNIONID access, or wx.cloud auth behavior in projects where login is native and automatic.
How do I install auth-wechat-miniprogram?
Run npx skills add https://github.com/tencentcloudbase/cloudbase-ai-toolkit --skill auth-wechat-miniprogram in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/auth-wechat-miniprogram/ (personal) or .claude/skills/auth-wechat-miniprogram/ (project).
Which AI agents can use auth-wechat-miniprogram?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is auth-wechat-miniprogram safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains auth-wechat-miniprogram?
It is published by tencentcloudbase in tencentcloudbase/cloudbase-ai-toolkit. It has 81 recorded installs.
More from tencentcloudbase/cloudbase-ai-toolkit
miniprogram-development
tencentcloudbase/cloudbase-ai-toolkit
WeChat Mini Program development skill for building, debugging, previewing, testing, publishing, and optimizing mini program projects (小程序开发、调试、预览、发布). Covers project structure and config (project.config.json, appid, miniprogramRoot, tabBar, routing/navigation, icon assets), WeChat Developer Tools Nightly workflows (wechatide CLI, WeChat IDE Skills/MCP), miniprogram-ci preview/upload, console/network debugging, message push (消息推送) and customer-service auto-reply (客服消息), mini program SEO / search indexing (小程序搜索优化、页面收录、搜索推广、mpcrawler), and CloudBase integration (wx.cloud, 腾讯云开发, 云开发) when explicitly used. Use when users create, develop, modify, debug, preview, deploy, publish, or promote WeChat Mini Programs. NOT for Web frontend (use web-development), pure backend services (use cloudrun-development / cloud-functions), or UI-design-only tasks (use ui-design).
web-development
tencentcloudbase/cloudbase-ai-toolkit
Use when users need to implement, integrate, debug, build, deploy, or validate a Web frontend after the product direction is already clear, especially for React, Vue, Vite, browser flows, or CloudBase Web integration.
cloudbase-document-database-in-wechat-miniprogram
tencentcloudbase/cloudbase-ai-toolkit
Use CloudBase document database WeChat MiniProgram SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.
cloudbase-platform
tencentcloudbase/cloudbase-ai-toolkit
CloudBase platform overview and routing guide. This skill should be used when users need high-level capability selection, platform concepts, console navigation, realtime (broadcast / presence / live database changes), or cross-platform best practices before choosing a more specific implementation skill.
cloud-functions
tencentcloudbase/cloudbase-ai-toolkit
CloudBase function runtime guide for building, deploying, and debugging your own Event Functions or HTTP Functions. This skill should be used when users need application runtime code on CloudBase, not when they are merely calling CloudBase official platform APIs.
ai-model-wechat
tencentcloudbase/cloudbase-ai-toolkit
Open the skill to read its SKILL.md instructions.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.