sui-zk-login
Add Sui zkLogin for Google, Apple, Facebook, or Twitch sign-in. Use when the user mentions zkLogin, social login, or OAuth-based Sui auth.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add Sui zkLogin for Google, Apple, Facebook, or Twitch sign-in. Use when the user mentions zkLogin, social login, or OAuth-based Sui auth.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Pick a brand name, color palette, or typography for a Sui product. Use when the user wants to name or brand a Sui project.
Build an AI agent that signs Sui transactions or runs onchain actions. Use when the user wants an AI agent on Sui.
Build a Sui data indexer or analytics pipeline. Use when the user wants to index Sui events, build a pipeline, or query Sui RPC data.
Build a mobile Sui app with React Native or the Sui Mobile SDK. Use when the user wants iOS, Android, or mobile Sui flows.
Pair with a coding agent to build a Sui MVP step by step. Use when the user wants to build the MVP iteratively with an agent.
Author Sui Move modules and packages with a senior Move dev as your pair. Use when the user wants to write, build, author, add, or scaffold Move code, smart contracts, or Sui programs at the module or function level, in any phrasing.
| name | sui-zk-login |
| description | Add Sui zkLogin for Google, Apple, Facebook, or Twitch sign-in. Use when the user mentions zkLogin, social login, or OAuth-based Sui auth. |
# Suiperpower telemetry. Routes through the CLI so projects.json + Convex stay in sync.
# Silent on failure so the skill never blocks. Opt out: SUIPERPOWER_TELEMETRY=off.
#
# AGENT NOTE: when this skill finishes, run the matching completion command:
# suiperpower track sui-zk-login build completed
# Or use "failed" / "aborted" if it ended that way.
command -v suiperpower >/dev/null 2>&1 && suiperpower track sui-zk-login build started >/dev/null 2>&1 &
true
If TEL_PROMPTED is no, before doing real work, ask the user:
Help suiperpower get better. We track which skills get used and how long they take. No code, no file paths, no PII. Change anytime in
~/.suiperpower/config.json.A) Sure, anonymous B) No thanks
Write the answer to ~/.suiperpower/config.json telemetryTier field and create ~/.suiperpower/.telemetry-prompted. Then continue.
Adds end-to-end zkLogin to a Sui app. Walks through OAuth provider registration, ephemeral keypair generation, JWT capture, ZK proof retrieval from a prover service, transaction signing, and salt management. Refuses to ship if the demo is a stub; a real OAuth flow must complete and a real transaction must execute under the resulting Sui address.
Supported providers (SDK v2): Google, Apple, Facebook, Twitch, AWS (tenant-based), Karrier One, Credenza3 (all networks). Slack, Kakao, Microsoft are devnet only.
find-next-sui-idea first.scaffold-project first.sponsored-transactions instead.If you activated this and the user actually wants something else, consult skills/SKILL_ROUTER.md and hand off.
.suiperpower/build-context.md. Read it if present.If unclear, interview the user for:
https://salt.api.mystenlabs.com/get_salt), or per-user-derived salt?https://prover-dev.mystenlabs.com/v1 for devnet/testnet), self-hosted, or a third-party?OAuth provider config (client id, redirect URIs, allowed scopes).
Frontend zkLogin flow: ephemeral keypair generation, login URL builder, JWT decode, salt fetch, ZK proof fetch, address derivation, transaction signer.
A live demo: real Google (or chosen provider) login, real Sui address derived, real transaction executed.
Append to .suiperpower/build-context.md:
## sui-zk-login session, <timestamp>
- provider(s): <list>
- sample sui address: <0x...>
- first executed tx digest: <digest>
- salt service: <self-hosted | Mysten | derived>
- prover service: <url>
- open issues: <list>
The skill never deletes files outside the integration source path without explicit user confirmation.
Context gathering
.suiperpower/build-context.md if it exists.OAuth registration
openid).Ephemeral keypair
sessionStorage with a max validity (a few epochs).OAuth flow
Salt service
ZK proof
sessionStorage (proofs are valid until the JWT expires or the max epoch passes).Address derivation
jwtToAddress(jwt, salt, legacyAddress?) accepts an optional third boolean. It defaults to false. Pass true only for backward compatibility with addresses derived under SDK v1.Sign and execute
Demo gate
Writeback
.suiperpower/build-context.md.Closing handoff
.suiperpower/intent.md exists and the session was non-trivial (new zkLogin integration, salt service decision, provider list, real signed transaction), recommend verify-against-intent as the next step so the auth surface and key-custody choices are checked before shipping.intent.md exists and the session was non-trivial, surface that gap once: offer clarify-intent to backfill, do not force it.The manual flow above gives full control but requires running your own salt service, prover, and key management. For production, consider these managed services:
| Service | What it handles | Docs |
|---|---|---|
| Enoki (Mysten Labs) | Managed zkLogin: salt, proving, ephemeral key management, sponsored transactions. Drop-in SDK. | https://docs.enoki.mystenlabs.com |
| Shinami (third-party) | zkLogin API, gas station (sponsored txs), Node Service (RPC). Single vendor for auth + gas + infra. | https://docs.shinami.com |
Both remove the need to self-host a prover and salt service. Evaluate based on custody requirements, cost, and vendor preference. The manual flow remains the right choice when you need full control over key material and salt storage.
Before reporting done, the skill asks itself the following and refuses to declare success if any answer is no:
If any answer is no, the skill reports the gap and works through it before claiming the integration is complete.
On-demand references (load when relevant to the user's question):
references/zklogin-flow.md: End-to-end flow with code for ephemeral keypair, nonce, JWT capture, and signing.references/zklogin-salt.md: Salt management options, tradeoffs, and recovery implications.references/zklogin-pitfalls.md: Expiry, redirect mismatches, prover errors, address derivation gotchas.Knowledge docs (load when scope expands beyond what is in references):
skills/data/sui-knowledge/04-protocols-and-sdks.md: SDK ecosystem context.claude "/suiper:sui-zk-login <your message>"codex "/sui-zk-login <your message>"grok, then /sui-zk-login <your message> in the session~/.cursor/rules/sui-zk-login.mdc and reference it.If you activated this and the user actually wants something else, consult skills/SKILL_ROUTER.md and hand off.