auth-tool-cloudbase — CloudBase skill for auth provider setup
Readies CloudBase authentication before you write client code: checks providers, publishable keys and login methods.
npx skills add TencentCloudBase/skills --skill auth-tool-cloudbase -a claude-codeWhat auth-tool-cloudbase does
The skill manages CloudBase auth providers: anonymous login, username and password, SMS, email, WeChat, Google and others. Use it when you need to enable or disable a login method, verify a publishable key, set up SMS or email sending, or confirm a third-party provider is ready before implementing a client or backend flow.
It gives the agent a working order: prefer queryAppAuth and manageAppAuth over raw callCloudApi, keep the management auth tool separate from app-side configuration. A checklist covers what to confirm before implementation, and local references point to sibling skills for web auth, WeChat mini programs, server-side identity and raw HTTP clients.
You need a CloudBase environment ID (env). Anonymous login is off by default; a publishable accessKey alone does not create an anonymous session. With @cloudbase/js-sdk 3.x, enable anonymous through this skill, then call await auth.signInAnonymously() before NoSQL app.database() CRUD, or the gateway returns 401. Re-issuing a key does not widen its scope.
What it helps with
- Check which login methods are enabled in a CloudBase environment
- Enable anonymous, SMS or email login before writing the client
- Verify the publishable key before integration
- Diagnose 401 responses from the NoSQL gateway
- Keep management auth separate from app auth configuration
Example prompts for the agent
- Check which auth providers are enabled in this CloudBase environment
- Enable anonymous login and tell me what the client must call before database queries
- Set up SMS code delivery for CloudBase sign-in
How to install auth-tool-cloudbase
1Skills CLI (Vercel)
npx skills add TencentCloudBase/skills --skill auth-tool-cloudbase -a claude-code2Manually: put the files in place
~/.claude/skills/auth-tool-cloudbase/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/auth-tool-cloudbase/
1Skills CLI (Vercel)
npx skills add TencentCloudBase/skills --skill auth-tool-cloudbase -a codex2Manually: put the files in place
.agents/skills/auth-tool-cloudbase/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add TencentCloudBase/skills --skill auth-tool-cloudbase -a cursor2Manually: put the files in place
.cursor/skills/auth-tool-cloudbase/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install TencentCloudBase/skills auth-tool-cloudbase2Manually: put the files in place
.github/skills/auth-tool-cloudbase/SKILL.md1Skills CLI (Vercel)
npx skills add TencentCloudBase/skills --skill auth-tool-cloudbase -a gemini-cli2Platform CLI
gemini skills install https://github.com/TencentCloudBase/skills --path skills/auth-tool-cloudbaseManually: put the files in place
.devin/skills/auth-tool-cloudbase/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add TencentCloudBase/skills --skill auth-tool-cloudbase -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about auth-tool-cloudbase
How do I install auth-tool-cloudbase in Claude Code?
Run npx skills add TencentCloudBase/skills --skill auth-tool-cloudbase -a claude-code. The skill lands at ~/.claude/skills/auth-tool-cloudbase/SKILL.md.
What does auth-tool-cloudbase do?
It guides the agent through CloudBase provider setup: toggling login methods, checking the publishable key, configuring SMS and email senders, and confirming third-party provider readiness before client or backend work starts.
Why does CloudBase NoSQL return 401 with anonymous login?
Anonymous login is disabled by default. Enable it through this skill, then call await auth.signInAnonymously() before any app.database() operations, or the gateway rejects the request.
Source text
SKILL.md · MIT
--- name: auth-tool-cloudbase description: CloudBase auth provider configuration and login-readiness guide. This skill should be used when users need to inspect, enable, disable, or configure auth providers, publishable-key prerequisites, login methods, SMS/email sender setup, or other provider-side readiness before implementing a client or backend auth flow. version: 2.36.1 license: MIT alwaysApply: false --- ## 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 to inspect, enable, disable, or configure CloudBase auth providers, login methods, publishable key prerequisites, SMS/email delivery, or third-party login readiness. - An auth implementation cannot proceed until provider status and login configuration are confirmed. - A CloudBase Web auth flow needs provider verification before `auth-web-cloudbase`. ### Read before writing code if - The request mentions provider setup, auth console configuration, publishable key retrieval, login method availability, SMS/email sender setup, or third-party provider credentials. - The task mixes provider configuration with Web, mini program, Node, or raw HTTP auth implementation. ### Then also read - Web auth UI -> `../auth-web-cloudbase/SKILL.md` - Mini program native auth -> `../auth-wechat-miniprogram/SKILL.md` - Node server-side identity / custom ticket -> `../auth-nodejs-cloudbase/SKILL.md` - Native App / raw HTTP auth client -> `../http-api-cloudbase/SKILL.md` ### Do NOT use this as - The default implementation guide for every login or registration request. - A replacement for mini program native auth behavior when no provider change is involved. - A replacement for Node-side caller identity, user lookup, or custom login ticket flows. - A replacement for frontend integration, session handling, or client UX implementation. ### Common mistakes / gotchas - Writing login UI before enabling the required provider. - Treating any mention of "auth" as a provider-management task. - Implementing Web login in cloud functions. - Routing native App auth to Web SDK flows. - Making configuration or code changes without first following the Change Safety Protocol (`cloudbase-platform/references/protocols/change-safety-protocol.md`). - In an existing application, looping on provider queries after readiness is already known instead of wiring the active login and register handlers. ### Minimal checklist - Read [Authentication Activation Checklist](checklist.md) before auth implementation. - Anonymous login is disabled by default. Publishable `accessKey` alone does **not** create a gateway-authenticated anonymous session. With `@cloudbase/js-sdk` **3.x**, enable anonymous via this skill when needed, then clients must call `await auth.signInAnonymously()` (or an equivalent authenticated session) **before** NoSQL `app.database()` CRUD — otherwise the gateway returns **401**. For apps that require verified login (e.g. admin panels), enforce AuthGuard / RLS and reject `is_anonymous` rather than relying on the login strategy toggle alone. ## Overview Configure CloudBase authentication providers: Anonymous, Username/Password, SMS, Email, WeChat, Google, and more. **Prerequisites**: CloudBase environment ID (`env`) ## MCP Tool Boundary Keep these two auth domains separate: - `auth`: MCP / management-side login only. Use it for `status`, `start_auth`, `set_env`, `logout`, and `get_temp_credentials`. - `queryAppAuth` / `manageAppAuth`: app-side authentication configuration. Use them for login methods, provider settings, publishable key, static domain, client config, and custom login keys. Preferred execution order for this skill: 1. Use `queryAppAuth` / `manageAppAuth` first when the needed action exists there. 2. Use `callCloudApi` only as a fallback or for debugging raw request shapes. 3. Do not route app-side provider configuration back to the MCP `auth` tool. 4. In existing projects with active login and register handlers, stop revisiting provider setup after the required login method and publishable key are confirmed. Move back to the active frontend handler and finish the actual user flow. ### Credential scope — what each login can actually reach Read this before telling a user to "re-authorize" after a permission-shaped failure. Re-authorizing does not widen a key's scope; it just issues the same scope again. - **Account-level** (`auth(status)` → `credential_scope: account`): reaches control-plane APIs, subject to that identity's own CAM policies. - **Environment API Key** (`credential_scope: single_env`): scoped to **one environment's data plane** plus the fixed TCB policies. It is not an account-level credential, so control-plane calls outside that scope fail, and there is **no channel to attach additional CAM policies to a single key** — issuing the key again changes nothing. When a task needs a capability the current credential cannot have, switch to an account-level login or follow the role route rather than retrying the same key. Full identity table and how to grant what is missing: `../../cloud-api-operations/references/calling-methods.md`. --- ## Extended guide For detailed scenarios, examples, and patterns, read [extended-guide.md](references/extended-guide.md). ## Reference index All packaged reference files (required for skill lint reachability): - [extended-guide.md](references/extended-guide.md)
© TencentCloudBase · MIT · TencentCloudBase/skills