Skip to content

Guide · Agent skill

How to use the Sign In With Google (Web) agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The sign-in-with-google-web skill is a set of detailed instructions that teaches an AI agent how to add a 'Sign in with Google' button to a website and handle the login securely. It is written for web developers, backend teams and reviewers of existing Google login code. After this guide you will know what the skill does, how to install it, how to ask for it in plain language, and what to check before trusting the code it produces.

Sign In With Google (Web)google/skills · Apache-2.0

Quick start

  1. 1Download and unzip. Download the skill ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder.
  2. 2Or upload in the Claude apps. Open Settings, go to Capabilities, then Skills, and upload the skill.
  3. 3Describe your site. Say which framework you use, whether you have a backend, and which language it runs.
  4. 4Ask for the sign-in flow. Request a Google sign-in button, One Tap, or ID token verification in plain words.
  5. 5Check the claims. Confirm the backend checks the token signature, aud, hd and nonce as the skill describes.
  6. 6Test before deploying. Run the code in a test environment and have a qualified engineer review it.

What the skill makes the agent do

The skill covers Sign In With Google (SiwG) using the Google Identity Services web SDK, loaded from accounts.google.com/gsi/client. It gives the agent guidance for React, Next.js, Angular and plain HTML sites, and for verifying Google ID tokens on Python, Node.js, Go and Java backends.

The agent recommends server-side patterns as the safest default. In the recommended pattern, the browser sends the Google ID token to your backend, the backend checks its signature against Google's public keys, and the backend issues its own HttpOnly session cookie. Browser-only approaches are offered as fallbacks for static sites or offline apps.

The skill also covers nonces, Google Workspace domain restrictions (the hd claim), One Tap, cross-origin iframes via the Intermediate Iframe API, and security headers such as Content Security Policy and COOP.

Install the skill from the ZIP

Download the ZIP for the skill from this page and unzip it. To make it available to Claude Code for your user account, place the unzipped folder in ~/.claude/skills/. To limit it to one project, place it in that project's .claude/skills/ folder.

You can also upload the skill in the Claude apps. Open Settings, go to Capabilities, then Skills, and upload it there.

  • Personal: ~/.claude/skills/sign-in-with-google-web
  • Project only: .claude/skills/sign-in-with-google-web inside your project folder
~/.claude/skills/

Trigger the skill with natural requests

You do not need a special command. The skill is meant to be picked up when your request matches its topic. Describe the job in plain terms and name your stack, so the agent knows which reference to use.

The skill's description lists these triggers: creating Google sign-in buttons, Google One Tap with FedCM, integrating GIS in React, Next.js, Angular or HTML, verifying ID tokens on a backend, enforcing Google Workspace domain restrictions, sign-out and revocation, and configuring CSP and COOP headers.

  • Add a Sign in with Google button to my Next.js app and verify the token on a FastAPI backend.
  • Verify Google ID tokens correctly in my Node.js Express login route.
  • Restrict our Google login to users of our company Google Workspace domain.
  • Add Google One Tap to my plain HTML site and set the right security headers.
  • Review my existing Google login code and tell me what to harden.

What you need before you start

The skill expects a Google Identity Services web SDK, a Google Cloud OAuth client ID, and backend libraries for ID token verification such as google-auth for Python, depending on your chosen stack. The skill folder also contains reference files with detailed code examples that the agent can read.

The skill does not run scripts and does not use the network itself. The code it helps you write will talk to Google when your site runs, so you still need to set up the OAuth client in Google Cloud.

  • Google Identity Services web SDK (accounts.google.com/gsi/client)
  • A Google Cloud OAuth client ID
  • Backend ID token library, for example google-auth for Python

Safety notes: scripts, network and out-of-scope cases

The skill itself runs no scripts and uses no network access. Its output is code and guidance, which you must read and test before deploying.

The skill explicitly excludes legacy Google Sign-In using gapi.auth2, Google Cloud IAM service accounts, and Android or iOS native Credential Manager. Use different guidance for those. Security-sensitive login code should be reviewed by a qualified engineer, and the agent still needs to be checked when it writes and tests code.

  • Do not store raw ID tokens in localStorage or sessionStorage; the skill's guidance says never to do this.
  • Prefer the backend pattern whenever your app has a server.
  • Treat code that decodes JWTs in the browser as UI-only; backend signature verification is still required.

Tips for better results

Name your framework, backend language and whether you have a server. The skill chooses between backend and client-only patterns based on that, so a precise request gives more useful code.

Ask the agent to show which reference file it followed and to list the claims it checks, such as aud, hd and nonce. Ask it to flag anything it could not verify so you can test it.

  • State whether you need a Google Workspace domain restriction.
  • Mention if your app is offline-first, since that changes the pattern.
  • Ask for the CSP and COOP headers in the same request to avoid a second round of fixes.

What people use it for

  • Adding a Sign in with Google button to a React or Next.js site with a Python backend.
  • Verifying Google ID tokens correctly in a Node.js, Go or Java login route.
  • Restricting sign-in to a Google Workspace domain using the hd claim.
  • Adding Google One Tap with the right security headers to an HTML page.
  • Reviewing an existing Google login implementation for security gaps.

Frequently asked questions

Is the sign-in-with-google-web skill free?

The skill is published under the Apache-2.0 licence, as stated on this page. Check the licence file in the download for the full terms before using it in a commercial product.

How do I install the sign-in-with-google-web skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder for one project. You can also upload it in the Claude apps under Settings, Capabilities, then Skills.

What do I need to use this skill?

You need the Google Identity Services web SDK, a Google Cloud OAuth client ID, and a backend library for ID token verification such as google-auth for Python, depending on your stack. The skill folder also includes reference code examples.

Does the skill support legacy Google Sign-In with gapi.auth2?

No. The skill explicitly excludes legacy Google Sign-In using gapi.auth2. Android, iOS native apps and Google Cloud IAM service accounts are also out of scope.

Does the skill run scripts or access the network?

According to its listing, it runs no scripts and uses no network access. The code it helps you write will contact Google when your application runs.

How does this compare to writing Google login code by hand?

The skill gives an agent structured guidance on patterns, nonces, domain restrictions and headers, which can speed up the work. It does not replace testing or review, and its guidance may lag behind current Google code, so security-sensitive code should still be checked by a qualified engineer.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits web developers adding Google sign-in to React, Next.js, Angular or HTML sites, and teams who need to verify Google ID tokens on a Python, Node.js, Go or Java backend. It is not suitable for non-developers wanting a finished login system, for legacy gapi.auth2 code, or for native Android and iOS apps. Any code it produces should be tested and reviewed before it handles real user logins.

Download the skill