finding-google-skills
Locates and loads the right Google product skill on demand from a remote catalog index, instead of preloading every skill. Use at the START of any request…
Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for
$ npx -y skills add google/skills --skill dpop-adoption --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dpop-adoptionContext preview
The summary Claude sees to decide when to auto-load this skill.
Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for
name: dpop-adoption metadata: category: Identity description: >- Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for authorization code exchange and token refresh, or handling 400 use_dpop_nonce challenge retry loops at oauth2.googleapis.com/token. Don't use for unconstrained OAuth 2.0 flows (where refresh tokens are not bound to a client key pair), or for Google Cloud IAM / service account authentication.
Demonstrating Proof-of-Possession (DPoP, RFC 9449) secures OAuth 2.0 refresh tokens against interception and replay attacks by cryptographically binding them to a private key held exclusively by the client. In Google's OAuth 2.0 platform, DPoP binds the refresh token at the token endpoint, while access tokens issued for Google APIs are standard Bearer tokens (`token_type: "Bearer"`).
When implementing DPoP helpers or upgrading HTTP clients, you MUST adhere to the following strict security invariants:
ALWAYS access `globalThis.crypto` directly after verifying the environment context.
reference browser-scoped `window.crypto`, as these cause module initialization crashes across hybrid runtimes.
name: 'ECDSA', namedCurve: 'P-256' }`.
**non-extractable** (`extractable: false`). This guarantees the private key can never leave the hardware cryptographic boundary (Secure Enclave, Android KeyStore, or JS sandbox memory), thwarting XSS and dependency token theft attacks.
emitting JSON Web Keys (JWKs).
clean JWK dictionary containing strictly:
padding (`=`).
padding (`=`).
S$, exactly 64 bytes for P-256) per IEEE P1363 and RFC 7518.
ECDSA signatures are ALREADY emitted natively in raw IEEE P1363 format (concatenated 32-byte `r` and `s` buffers, 64 bytes total). **DO NOT** attempt DER-to-Raw conversion on `crypto.subtle.sign` outputs, as parsing a 64-byte raw buffer as ASN.1 DER causes an immediate runtime exception (`Invalid DER sequence`). Directly base64url-encode the raw ArrayBuffer.
(`java.security.Signature`) or Node CommonJS (`crypto.createSign`), convert ASN.1 DER output to raw 64-byte IEEE P1363 format before base64url encoding.
(SPAs) without a backend cannot use DPoP directly with Google APIs due to `client_secret` requirements on server endpoints and browser CORS limitations on the `DPoP-Nonce` response header.
refresh requests through a Backend-for-Frontend (BFF) server-side client. The BFF sets `access_type=offline`, binds refresh tokens server-side using DPoP, and maintains secure session cookies with the frontend.
When creating new modules, your module MUST explicitly export all functions below to integrate cleanly with CI/CD verification harnesses and automated probers. When inspecting or refactoring existing codebases, ensure equivalent cryptographic and RFC 9449 logic is present. Obey strict claim derivation logic in all cases:
When generating the DPoP Proof JWT in `createDPoPProof`:
**1. JOSE Header (`typ`, `alg`, `jwk`):**
// Header
{
"typ": "dpop+jwt",
"alg": "ES256",
"jwk": await exportPublicJWK(publicKey)
}**2. Payload Claims:**
`sanitizeHTU(htu)`. For token requests, this is `https://oauth2.googleapis.com/token`.
(`Math.floor(Date.now() / 1000)`).
1. If an explicit `jti` argument is provided to `createDPoPProof`, use that exact string over all others. 2. Otherwise, if an `authCode` argument is provided (during initial code exchange), set `jti = await calculateAuthCodeJti(authCode)` where `calculateAuthCodeJti` computes `base64url(sha256(authCode))` to ensure the DPoP proof is cryptographically bound to the authorization code. 3. Only if neither `jti` nor `authCode` is provided, generate a fresh cryptographic random string via `generateRandomString()` (such as `crypto.getRandomValues(new Uint8Array(24))` base64ur
This repository contains Agent Skills for Google products and technologies, including Google Cloud.
Repo: google/skills
Locates and loads the right Google product skill on demand from a remote catalog index, instead of preloading every skill. Use at the START of any request…
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.…
Provides expert guidance on authenticating and authorizing to Google Cloud services and APIs, covering human users, service identities, Application Default…
Guides a developer's first steps on Google Cloud, covering account creation, billing setup, project management, and deploying a first resource. Use when a new…
Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and…
Guides developers through managing (adding, removing, and clearing) audience members for Google products using the Data Manager API and its associated client…