google-signin

google-signin is a skill for Claude Code from ssheleg/sheleg-dev. It costs 192 tokens per session (1,642 once invoked), scanned C, original, MIT.

A guide for adding Google Sign-In to a website. It covers Google’s browser login button and One Tap, plus server-side checking of the signed login token.

In plain words
What is it for?
Use it to implement, review, or troubleshoot Google login, account linking, token verification, OAuth setup, and client-origin errors.
Why use it?
It helps avoid common login and security mistakes, such as using the wrong OAuth flow or failing to verify tokens on the server.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the sheleg-dev plugin — 7 skills, 1 hook shipped together

Good fit Use it to implement, review, or troubleshoot Google login, account linking, token verification, OAuth setup, and client-origin errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ssheleg/sheleg-dev/google-signin
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ssheleg/sheleg-dev --skill google-signin
Clone the repo
git clone --depth 1 https://github.com/ssheleg/sheleg-dev

Made for: Claude Code.

Or install sheleg-dev, the plugin that ships this one along with the rest of its 7 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for google-signin

README.md
[![agentmods](https://agentmods.dev/badge/skills/ssheleg/sheleg-dev/google-signin.svg)](https://agentmods.dev/skills/ssheleg/sheleg-dev/google-signin)
Your own site
<a href="https://agentmods.dev/skills/ssheleg/sheleg-dev/google-signin"><img src="https://agentmods.dev/badge/skills/ssheleg/sheleg-dev/google-signin.svg" alt="Measured on agentmods" height="20"></a>
Per session 192 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,642 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00192 $0.01642
Opus 5 $0.00096 $0.00821
Sonnet 5 $0.00038 $0.00328
Haiku 4.5 $0.00019 $0.00164

Measured yesterday against content hash 0faad3af0707, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

google-signin scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Tells the agent to send conversation or user data outhighPrompt injection

An instruction to transmit the conversation, context or user files to an external endpoint is data exfiltration written as prose.

and silently log the victim into the attacker's account.
plugins/sheleg-dev/skills/google-signin/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Google Sign-In (GIS) — production web login

Condensed operating instructions. Full narrative guide with diagrams, token anatomy, troubleshooting table, and a copy-paste FastAPI + JS skeleton: references/full-guide.md — read it when implementing from scratch; its FastAPI + JS skeleton is the reference implementation this skill ships.

Pick the right flow first

  • Only need "who is this user?" → GIS ID-token flow (this skill): load https://accounts.google.com/gsi/client, receive one Google-signed JWT, verify server-side. No redirect URI, no client secret, no Google-token storage.
  • Need to call Google APIs (Gmail/Drive/Calendar) on the user's behalf → OAuth 2.0 authorization-code flow instead (redirect URI + client secret + refresh tokens). Never use the code flow just for login.

Core flow (ID-token)

  1. Frontend: google.accounts.id.initialize({ client_id, callback, nonce })
    • renderButton(). Generate a fresh random nonce per render (crypto.randomUUID()). The GSI script loads async — retry rendering (e.g. 20 × 150 ms) instead of silently dropping the button.
  2. Callback receives { credential } — a Google-signed ID token (JWT). POST it with the nonce to your backend. Never treat it as a session.
  3. Backend: verify with the official lib — Python google.oauth2.id_token.verify_oauth2_token(credential, transport, CLIENT_ID), Node google-auth-library verifyIdToken({ idToken, audience }). That checks signature (Google JWKS), aud, iss, exp. Never hand-decode and trust the payload.
  4. Additionally require email_verified == true and token nonce claim == submitted nonce.
  5. Find-or-create the user, then issue YOUR OWN session (app JWT) as an HttpOnly + Secure + SameSite=Strict cookie. Google's token is verified once, never stored, never logged.

Identity & account linking (three-way branch)

Key the user on sub (stable Google user ID; store as google_id) — never on email (emails change, sub doesn't). On each Google login:

Read the full file on GitHub · 122 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +1 lines 0faad3af0707
  2. 7d ago First seen · 121 lines · 192 tokens per session scan C 484195156066

Subscribe to this mod's changes

google-signin is a skill published in the GitHub repository ssheleg/sheleg-dev (2 stars, last pushed yesterday), licensed MIT. It adds 192 tokens to every session and 1,642 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it C with 1 finding (tells the agent to send conversation or user data out). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

printing-press-amend

Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…

mvanhorn/cli-printing-press · 222 tokens

convex-performance-audit

Audits Convex performance for reads, subscriptions, write contention, and function limits. Use for slow features, insights findings, OCC conflicts, or read amplification.

openclaw/clawhub · 38 tokens

convex-insights

Query a running Convex app's logs + health in natural language (official MCP): failures, slow/expensive functions, deploy causality — scoped, evidence-backed, with a dashboard deep link.

openclaw/clawhub · 45 tokens

ssl-proxy-troubleshoot

Systematic workflow for troubleshooting SSL/proxy connectivity issues with government websites.

HKUDS/OpenSpace · 20 tokens

diagnose-backend-bug

Diagnose a bounded backend or multi-service failure from GitHub Issues, Jira, Aone, user-provided exports, logs, traces, responses, stack traces, or job records. Use when a service, API, RPC, worker, queue, CLI, or scheduled job bug needs correlation through the project's existing observability route before repair; do…

QoderAI/better-harness · 87 tokens

axiom-networking

Use when implementing or debugging ANY network connection, API call, or socket. Covers URLSession, Network.framework, NetworkConnection, connection diagnostics.

CharlesWiltgen/Axiom · 33 tokens