[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D8BRYX5N7DPC7V83SKDFW3":3,"skill-same:01M7D8BRYX5N7DPC7V83SKDFW3":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":28,"commitSha":29,"skillDirectory":5,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7D8BRYX5N7DPC7V83SKDFW3","sign-in-with-google-web",null,"Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS \u002F `https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React\u002FNext.js\u002FAngular\u002FHTML, verifying ID tokens on backend runtimes (Python\u002FNode.js\u002FGo\u002FJava), enforcing Google Workspace domain restrictions (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding in cross-origin iframes via the Intermediate Iframe API (`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`), configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`), Google Cloud IAM service accounts, or Android\u002FiOS native Credential Manager.","tangyixiao\u002Ftangyixiao-skills","tangyixiao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115929632?v=4","01M7D582YK6A4M63CAK4CSY4EW","Tang Yixiao","01M7D582Z64DMRSYR872SR34SA",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fsign-in-with-google-web\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fsign-in-with-google-web\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sign-in-with-google-web\nmetadata:\n  category: Identity\n  version: 1.0.0\ndescription: Implement, configure, and secure Sign In With Google (SiwG) using Google\n  Identity Services (GIS \u002F `https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`) across web architectures.\n  Use when creating Google sign-in buttons, implementing Google One Tap with FedCM,\n  integrating GIS in React\u002FNext.js\u002FAngular\u002FHTML, verifying ID tokens on backend runtimes\n  (Python\u002FNode.js\u002FGo\u002FJava), enforcing Google Workspace domain restrictions (`hd`),\n  securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding\n  in cross-origin iframes via the Intermediate Iframe API (`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`),\n  configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`)\n  headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In\n  (`gapi.auth2`), Google Cloud IAM service accounts, or Android\u002FiOS native Credential\n  Manager.\n---\n\n# Sign In With Google (SiwG) Integration & Security Architecture\n\nThis skill provides normative architectural guidelines, secure implementation\ncontracts, and failure-prevention protocols for integrating Sign In With Google\nvia the Google Identity Services (GIS) Web SDK\n(`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`).\n\n## 1. IETF Architecture Taxonomy & Hierarchy (RECOMMEND BFF \u002F TMB FIRST)\n\nAll Sign In With Google implementations MUST align with the\n[IETF OAuth 2.0 for Browser-Based Applications (`draft-ietf-oauth-browser-based-apps`)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-ietf-oauth-browser-based-apps#name-application-architecture-pa)\ntaxonomy.\n\n> [!IMPORTANT] **Primary Recommendation:** Always recommend backend-mediated\n> patterns (**Pattern A: Backend For Frontend** or **Pattern B: Token-Mediating\n> Backend \u002F Redirect Mode**) as the most secure, robust, and industry-standard\n> architectures whenever an application has a backend server. Fall back to\n> client-only browser patterns (Patterns C & D) only when constrained by\n> serverless static hosting or offline-first PWA requirements.\n\n\u003C!-- mdformat off(reason: preserve ASCII architecture diagram width) -->\n```\n┌─────────────────────────────────────────────────────────────────────────────────────────┐\n│                          IETF ARCHITECTURE HIERARCHY & SELECTION                        │\n├──────────────────────────┬──────────────────────────┬───────────────────────────────────┤\n│ Pattern A (RECOMMENDED): │ Pattern B (RECOMMENDED): │ Patterns C & D (Fallbacks):       │\n│ Backend For Frontend     │ Token-Mediating Backend  │ Browser-Based OAuth Client        │\n│ (BFF - IETF § 6.1)       │ (TMB \u002F Redirect § 6.2)   │ (JavaScript-Only - IETF § 6.3)    │\n├──────────────────────────┼──────────────────────────┼───────────────────────────────────┤\n│ 🏆 GOLD STANDARD         │ 🚀 NATIVE FORM REDIRECT  │ ⚡ STATIC SPA \u002F 💾 OFFLINE PWA    │\n│ • Full-stack SPA + API   │ • Server-rendered & apps │ • Pure client-side or offline PWAs│\n│ • Client JS fetch to API │ • GIS HTTP POST login_uri│ • C: Ephemeral in-memory closure  │\n│ • HttpOnly session cookie│ • Direct server redirect │ • D: WebCrypto Encrypted IndexedDB│\n│ • Tokens never in browser│ • Tokens never in JS     │ • Strict WebCrypto nonces \u002F keys  │\n└──────────────────────────┴──────────────────────────┴───────────────────────────────────┘\n```\n\u003C!-- mdformat on -->\n\n### 🏆 Pattern A: Backend For Frontend (BFF - IETF § 6.1) — STRONGLY RECOMMENDED\n\n*   **Why it is the Gold Standard**: ID tokens (JWTs) and access tokens are\n    never exposed to browser JavaScript across page reloads. This provides\n    complete architectural immunity against XSS token harvesting.\n\n*   **Architecture**: The browser frontend loads the GIS SDK, captures the\n    credential in JavaScript callback (`callback: handleCredentialResponse`),\n    and immediately forwards the ID token (JWT) via `fetch('\u002Fapi\u002Fauth\u002Fgoogle', {\n    method: 'POST' })` to the backend.\n\n*   **Backend Responsibilities**: The backend validates the JWT cryptographic\n    signature against Google's public JWKs\n    (`google.oauth2.id_token.verify_oauth2_token`), checks the `aud`, `hd`, and\n    `nonce` claims against server session state, creates a server session, and\n    issues a first-party `HttpOnly; Secure; SameSite=Lax` session cookie.\n\n*   See full implementation in\n    [references\u002Fbff_fastapi_verification.md](references\u002Fbff_fastapi_verification.md).\n\n### 🚀 Pattern B: Token-Mediating Backend via `login_uri` Redirect (IETF § 6.2) — Server-Rendered & Form POST\n\n*   **Why it is Highly Secure**: Bypasses client-side JavaScript credential\n    handling entirely by instructing GIS to perform an HTTP POST directly to the\n    backend's `login_uri`.\n\n*   **Architecture**: Configured via `google.accounts.id.initialize({ client_id,\n    login_uri: \"https:\u002F\u002Fexample.com\u002Fapi\u002Fauth\u002Fcallback\", ux_mode: \"redirect\" })`\n    or HTML attributes (`data-login_uri=\"https:\u002F\u002Fexample.com\u002Fapi\u002Fauth\u002Fcallback\"`\n    and `data-ux_mode=\"redirect\"`).\n\n*   **Backend Responsibilities**: The backend receives the ID token as a form\n    POST body (`credential` parameter), validates the double-submit\n    `g_csrf_token` cookie against the `g_csrf_token` POST body field,\n    cryptographically verifies the ID token server-side, establishes a session\n    cookie, and returns a standard HTTP 302\u002F303 redirect.\n\n*   See full implementation in\n    [references\u002Ftmb_login_uri_redirect.md](references\u002Ftmb_login_uri_redirect.md).\n\n### Pattern C: Browser-Based OAuth Client — Ephemeral In-Memory (IETF § 6.3) — Fallback for Static SPAs\n\n*   **Scope**: Use ONLY when deployment is strictly serverless\u002Fstatic (e.g.,\n    GitHub Pages, Firebase static hosting) with no backend component.\n\n*   **Storage Invariant**: The ID token is held strictly in private JavaScript\n    memory\u002Fclosures during the active tab session. **Never store raw tokens in\n    `localStorage` or `sessionStorage`**.\n\n*   **Session Renewal**: Uses GIS One Tap \u002F FedCM auto-select (`auto_select:\n    true`) to transparently re-acquire fresh ID tokens into memory on page\n    reload without persistent browser storage.\n\n*   **XSS & Replay Protection**: Generate a cryptographic `nonce` via\n    `window.crypto.getRandomValues()` and pass it directly to\n    `google.accounts.id.initialize({ client_id, nonce: clientNonce })`. Validate\n    that `payload.nonce === clientNonce` before trusting claims in memory.\n\n*   See full implementation in\n    [references\u002Fin_memory_spa_nonce.md](references\u002Fin_memory_spa_nonce.md).\n\n### Pattern D: Browser-Based OAuth Client — WebCrypto Encrypted IndexedDB (IETF § 6.3) — Fallback for Offline PWAs\n\n*   **Scope**: Use ONLY for offline-first Progressive Web Apps (PWAs) where user\n    authentication proof must survive tab refreshes when disconnected from the\n    network.\n\n*   **Storage Invariant**: **NEVER store raw plaintext ID tokens in\n    `localStorage`**. Encrypt the ID token payload using WebCrypto `AES-GCM`\n    with a non-extractable session key (`extractable: false`) before writing\n    ciphertext and IV to `IndexedDB`.\n\n*   See full implementation in\n    [references\u002Foffline_pwa_encryption.md](references\u002Foffline_pwa_encryption.md).\n\n--------------------------------------------------------------------------------\n\n## 2. Mandatory Security Directives & Browser Policies\n\nTo avoid multi-turn repair loops and browser security exceptions, provide all\nrequired CSP, COOP, and user activation directives in the initial deliverable:\n\n### A. Content Security Policy (CSP) Directives\n\n```http\nContent-Security-Policy:\n  script-src 'self' https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient;\n  frame-src https:\u002F\u002Faccounts.google.com\u002Fgsi\u002F;\n  connect-src https:\u002F\u002Faccounts.google.com\u002Fgsi\u002F;\n```\n\nIf using strict nonce-based CSP, attach the nonce to the GIS script tag:\n`\u003Cscript src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\" async defer\nnonce=\"{{NONCE}}\">\u003C\u002Fscript>`.\n\n### B. Cross-Origin Opener Policy (COOP)\n\nTo allow GIS popup dialogs to communicate credentials back to the parent window\nvia `postMessage`:\n\n```http\nCross-Origin-Opener-Policy: same-origin-allow-popups\n```\n\n*(Serving `same-origin` without `allow-popups` breaks GIS popups and results in\nsilent failures).*\n\n### C. Automatic Selection, FedCM, & Sign-Out Lifecycle (`disableAutoSelect`)\n\nWhen enabling automatic zero-click return sign-in with Google One Tap (FedCM is\nenabled by default in GIS):\n\n*   Set `auto_select: true` in `google.accounts.id.initialize({...})` (do not\n    pass the deprecated `use_fedcm_for_prompt` parameter).\n\n*   **Deprecated Library Warning**: NEVER mix deprecated `gapi.auth2`\n    (`gapi.auth2.init`, `gapi.auth2.getAuthInstance().signOut()`) with Google\n    Identity Services (GIS). `gapi.auth2` is completely retired; use GIS methods\n    exclusively.\n\n*   **Sign-Out Protocol**: When the user explicitly logs out of your\n    application, you **MUST** call `google.accounts.id.disableAutoSelect()`:\n\n    ```javascript\n    function handleUserLogout() {\n      \u002F\u002F 1. Disable automatic One Tap \u002F FedCM re-authentication\n      google.accounts.id.disableAutoSelect();\n\n      \u002F\u002F 2. Clear application session state \u002F server cookie\n      fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' }).then(() => {\n        window.location.href = '\u002Flogin';\n      });\n    }\n    ```\n\n*   *(Failing to call `disableAutoSelect()` causes an immediate automatic\n    re-login loop on the next page visit after intentional user logout).*\n\n### D. Reliable Dynamic Script Loading & Framework Lifecycle (React, Next.js, SPAs)\n\nWhen mounting Sign In With Google in Single Page Applications (React, Next.js,\nVue, Angular):\n\n*   Modern SPAs execute component lifecycles asynchronously. Attempting to\n    access `window.google.accounts.id` before `\u003Cscript\n    src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\">` has finished loading causes\n    `ReferenceError: google is not defined`.\n\n*   **NEVER use `gapi` or polling (`setInterval`)**: Use deterministic dynamic\n    script loading with `onload` \u002F `addEventListener('load')` event listeners.\n\n*   **Dynamic Script Loader Pattern**:\n\n    ```tsx\n    import React, { useEffect, useState } from 'react';\n\n    export function useGoogleIdentityScript() {\n      const [isLoaded, setIsLoaded] = useState(false);\n\n      useEffect(() => {\n        if (window.google?.accounts?.id) {\n          setIsLoaded(true);\n          return;\n        }\n\n        const existingScript = document.querySelector(\n          'script[src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\"]'\n        );\n        if (existingScript) {\n          existingScript.addEventListener('load', () => setIsLoaded(true));\n          return;\n        }\n\n        const script = document.createElement('script');\n        script.src = 'https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient';\n        script.async = true;\n        script.defer = true;\n        script.onload = () => setIsLoaded(true);\n        document.head.appendChild(script);\n      }, []);\n\n      return isLoaded;\n    }\n    ```\n\n*   *(Always use deterministic `onload` event listeners or framework `\u003CScript\n    strategy=\"afterInteractive\">` rather than brittle `setInterval` polling).*\n\n### E. Embedded Iframes & Permissions Policy (`identity-credentials-get`)\n\nWhen embedding Sign In With Google or One Tap inside cross-origin `\u003Ciframe>`\nelements or widget integrations, modern browser security models and FedCM\nrequire explicit Permissions Policy delegation on the container frame:\n\n```html\n\u003Ciframe\n  src=\"https:\u002F\u002Fexample.com\u002Fembed\"\n  allow=\"identity-credentials-get 'src' https:\u002F\u002Faccounts.google.com\">\n\u003C\u002Fiframe>\n```\n\n*(Omitting `allow=\"identity-credentials-get\"` blocks FedCM \u002F One Tap\ninitialization inside embedded or cross-origin contexts).* See full integration\nguide in [references\u002Fintermediate_iframe.md](references\u002Fintermediate_iframe.md).\n\n--------------------------------------------------------------------------------\n\n## 3. Implementation Contracts & Anti-Pattern Bans\n\n### A. Strict Ban on Legacy GAPI (`gapi.auth2`)\n\n*   **NEVER** import or reference `gapi.auth2`, `gapi.auth2.init`,\n    `gapi.auth2.getAuthInstance()`, or `gapi.signin2`. Always warn that\n    `gapi.auth2` is deprecated and decommissioned.\n\n*   GIS (`google.accounts.id.*` and `google.accounts.oauth2.*`) is completely\n    stateless. It replaces all legacy GAPI authentication libraries.\n\n--------------------------------------------------------------------------------\n\n## 4. Implementation Recipes (Progressive Disclosure)\n\nLoad the specific reference file matching your target architecture when\ngenerating implementation code:\n\n*   **Recipe 1 — Pattern A (Backend For Frontend with Python \u002F FastAPI)\n    [RECOMMENDED]**: Load\n    [references\u002Fbff_fastapi_verification.md](references\u002Fbff_fastapi_verification.md)\n    for custom UI button prompting, `google.oauth2.id_token.verify_oauth2_token`\n    cryptographic verification, `nonce` replay checks, Google Workspace `hd`\n    domain enforcement, and `HttpOnly; Secure; SameSite=Lax` session cookie\n    issuance.\n\n*   **Recipe 2 — Pattern B (Token-Mediating Backend with `login_uri` Form POST\n    Redirect) [RECOMMENDED]**: Load\n    [references\u002Ftmb_login_uri_redirect.md](references\u002Ftmb_login_uri_redirect.md)\n    for `data-login_uri` \u002F `ux_mode: 'redirect'` frontend setup and FastAPI\n    double-submit `g_csrf_token` cookie vs. form-body validation.\n\n*   **Recipe 3 — Pattern C (Browser-Based Ephemeral In-Memory SPA with Native\n    GIS Nonce) [Fallback]**: Load\n    [references\u002Fin_memory_spa_nonce.md](references\u002Fin_memory_spa_nonce.md) for\n    WebCrypto `nonce` generation (`google.accounts.id.initialize({ client_id,\n    nonce: clientNonce })`), UTF-8 safe Base64URL JWT decoding, and private\n    closure token management.\n\n*   **Recipe 4 — Pattern D (Browser-Based WebCrypto Encrypted IndexedDB for\n    Offline PWAs) [Fallback]**: Load\n    [references\u002Foffline_pwa_encryption.md](references\u002Foffline_pwa_encryption.md)\n    for non-extractable (`extractable: false`) `AES-GCM` `CryptoKey` generation\n    and encrypted `IndexedDB` storage.\n\n*   **Recipe 5 — Embedded Cross-Origin Contexts (`gsi\u002Fintermediate`)**: Load\n    [references\u002Fintermediate_iframe.md](references\u002Fintermediate_iframe.md) for\n    `\u003Cdiv id=\"g_id_intermediate_iframe\">`, `allow=\"identity-credentials-get\"`,\n    and strict `window.postMessage` origin verification.\n\n--------------------------------------------------------------------------------\n\n## 5. Sign-Out & Account Revocation Across All Patterns\n\n```javascript\nexport function handleSignOut(userEmail) {\n  \u002F\u002F 1. Disable client-side One Tap auto-selection\n  google.accounts.id.disableAutoSelect();\n\n  \u002F\u002F 2. Revoke OAuth grant if user disconnected account\n  if (userEmail) {\n    google.accounts.id.revoke(userEmail, () => {\n      console.log('User grant revoked');\n    });\n  }\n\n  \u002F\u002F 3. Clear storage \u002F session\n  AuthManager.clear(); \u002F\u002F Pattern C\n  fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' }); \u002F\u002F Pattern A\n}\n```\n\n--------------------------------------------------------------------------------\n\n## 6. References & Normative Standards\n\n*   [RFC 7519: JSON Web Token (JWT)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7519)\n    — Standard claims (`iss`, `sub`, `aud`, `exp`, `iat`, `nonce`), formatting,\n    and processing rules.\n\n*   [RFC 7515: JSON Web Signature (JWS)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7515)\n    — Cryptographic signature verification against Google's public JWK certs\n    (`https:\u002F\u002Fwww.googleapis.com\u002Foauth2\u002Fv3\u002Fcerts`).\n\n*   [RFC 4648 § 5: Base64url Encoding](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc4648#section-5)\n    — URL-safe Base64 encoding without padding used across JWT segments.\n\n*   [IETF OAuth 2.0 Browser-Based Applications](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-ietf-oauth-browser-based-apps)\n    — Normative architecture standards (§ 6.1 BFF, § 6.2 TMB, § 6.3\n    Client-side).\n\n*   [Google Identity Services Web Reference](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Freference\u002Fjs-reference)\n    — Official GIS API reference.\n\n*   [Intermediate Iframe API Reference](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Famp\u002Fnonamp-reference)\n    — Cross-origin iframe embedding guide.\n\n*   [Verify ID Tokens Server-Side](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Fguides\u002Fverify-google-id-token)\n    — Server-side token verification protocols.\n\n*   [W3C Federated Credential Management API (FedCM)](https:\u002F\u002Fwww.w3.org\u002FTR\u002Ffedcm-1\u002F)\n    — Browser identity credential mediation standard.\n\n*   [W3C Web Cryptography API](https:\u002F\u002Fwww.w3.org\u002FTR\u002FWebCryptoAPI\u002F) —\n    Non-extractable key generation (`extractable: false`) and AES-GCM standards.\n","# Sign In With Google (SiwG) Integration & Security Architecture\n\nThis skill provides normative architectural guidelines, secure implementation\ncontracts, and failure-prevention protocols for integrating Sign In With Google\nvia the Google Identity Services (GIS) Web SDK\n(`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`).\n\n## 1. IETF Architecture Taxonomy & Hierarchy (RECOMMEND BFF \u002F TMB FIRST)\n\nAll Sign In With Google implementations MUST align with the\n[IETF OAuth 2.0 for Browser-Based Applications (`draft-ietf-oauth-browser-based-apps`)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-ietf-oauth-browser-based-apps#name-application-architecture-pa)\ntaxonomy.\n\n> [!IMPORTANT] **Primary Recommendation:** Always recommend backend-mediated\n> patterns (**Pattern A: Backend For Frontend** or **Pattern B: Token-Mediating\n> Backend \u002F Redirect Mode**) as the most secure, robust, and industry-standard\n> architectures whenever an application has a backend server. Fall back to\n> client-only browser patterns (Patterns C & D) only when constrained by\n> serverless static hosting or offline-first PWA requirements.\n\n\u003C!-- mdformat off(reason: preserve ASCII architecture diagram width) -->\n```\n┌─────────────────────────────────────────────────────────────────────────────────────────┐\n│                          IETF ARCHITECTURE HIERARCHY & SELECTION                        │\n├──────────────────────────┬──────────────────────────┬───────────────────────────────────┤\n│ Pattern A (RECOMMENDED): │ Pattern B (RECOMMENDED): │ Patterns C & D (Fallbacks):       │\n│ Backend For Frontend     │ Token-Mediating Backend  │ Browser-Based OAuth Client        │\n│ (BFF - IETF § 6.1)       │ (TMB \u002F Redirect § 6.2)   │ (JavaScript-Only - IETF § 6.3)    │\n├──────────────────────────┼──────────────────────────┼───────────────────────────────────┤\n│ 🏆 GOLD STANDARD         │ 🚀 NATIVE FORM REDIRECT  │ ⚡ STATIC SPA \u002F 💾 OFFLINE PWA    │\n│ • Full-stack SPA + API   │ • Server-rendered & apps │ • Pure client-side or offline PWAs│\n│ • Client JS fetch to API │ • GIS HTTP POST login_uri│ • C: Ephemeral in-memory closure  │\n│ • HttpOnly session cookie│ • Direct server redirect │ • D: WebCrypto Encrypted IndexedDB│\n│ • Tokens never in browser│ • Tokens never in JS     │ • Strict WebCrypto nonces \u002F keys  │\n└──────────────────────────┴──────────────────────────┴───────────────────────────────────┘\n```\n\u003C!-- mdformat on -->\n\n### 🏆 Pattern A: Backend For Frontend (BFF - IETF § 6.1) — STRONGLY RECOMMENDED\n\n*   **Why it is the Gold Standard**: ID tokens (JWTs) and access tokens are\n    never exposed to browser JavaScript across page reloads. This provides\n    complete architectural immunity against XSS token harvesting.\n\n*   **Architecture**: The browser frontend loads the GIS SDK, captures the\n    credential in JavaScript callback (`callback: handleCredentialResponse`),\n    and immediately forwards the ID token (JWT) via `fetch('\u002Fapi\u002Fauth\u002Fgoogle', {\n    method: 'POST' })` to the backend.\n\n*   **Backend Responsibilities**: The backend validates the JWT cryptographic\n    signature against Google's public JWKs\n    (`google.oauth2.id_token.verify_oauth2_token`), checks the `aud`, `hd`, and\n    `nonce` claims against server session state, creates a server session, and\n    issues a first-party `HttpOnly; Secure; SameSite=Lax` session cookie.\n\n*   See full implementation in\n    [references\u002Fbff_fastapi_verification.md](references\u002Fbff_fastapi_verification.md).\n\n### 🚀 Pattern B: Token-Mediating Backend via `login_uri` Redirect (IETF § 6.2) — Server-Rendered & Form POST\n\n*   **Why it is Highly Secure**: Bypasses client-side JavaScript credential\n    handling entirely by instructing GIS to perform an HTTP POST directly to the\n    backend's `login_uri`.\n\n*   **Architecture**: Configured via `google.accounts.id.initialize({ client_id,\n    login_uri: \"https:\u002F\u002Fexample.com\u002Fapi\u002Fauth\u002Fcallback\", ux_mode: \"redirect\" })`\n    or HTML attributes (`data-login_uri=\"https:\u002F\u002Fexample.com\u002Fapi\u002Fauth\u002Fcallback\"`\n    and `data-ux_mode=\"redirect\"`).\n\n*   **Backend Responsibilities**: The backend receives the ID token as a form\n    POST body (`credential` parameter), validates the double-submit\n    `g_csrf_token` cookie against the `g_csrf_token` POST body field,\n    cryptographically verifies the ID token server-side, establishes a session\n    cookie, and returns a standard HTTP 302\u002F303 redirect.\n\n*   See full implementation in\n    [references\u002Ftmb_login_uri_redirect.md](references\u002Ftmb_login_uri_redirect.md).\n\n### Pattern C: Browser-Based OAuth Client — Ephemeral In-Memory (IETF § 6.3) — Fallback for Static SPAs\n\n*   **Scope**: Use ONLY when deployment is strictly serverless\u002Fstatic (e.g.,\n    GitHub Pages, Firebase static hosting) with no backend component.\n\n*   **Storage Invariant**: The ID token is held strictly in private JavaScript\n    memory\u002Fclosures during the active tab session. **Never store raw tokens in\n    `localStorage` or `sessionStorage`**.\n\n*   **Session Renewal**: Uses GIS One Tap \u002F FedCM auto-select (`auto_select:\n    true`) to transparently re-acquire fresh ID tokens into memory on page\n    reload without persistent browser storage.\n\n*   **XSS & Replay Protection**: Generate a cryptographic `nonce` via\n    `window.crypto.getRandomValues()` and pass it directly to\n    `google.accounts.id.initialize({ client_id, nonce: clientNonce })`. Validate\n    that `payload.nonce === clientNonce` before trusting claims in memory.\n\n*   See full implementation in\n    [references\u002Fin_memory_spa_nonce.md](references\u002Fin_memory_spa_nonce.md).\n\n### Pattern D: Browser-Based OAuth Client — WebCrypto Encrypted IndexedDB (IETF § 6.3) — Fallback for Offline PWAs\n\n*   **Scope**: Use ONLY for offline-first Progressive Web Apps (PWAs) where user\n    authentication proof must survive tab refreshes when disconnected from the\n    network.\n\n*   **Storage Invariant**: **NEVER store raw plaintext ID tokens in\n    `localStorage`**. Encrypt the ID token payload using WebCrypto `AES-GCM`\n    with a non-extractable session key (`extractable: false`) before writing\n    ciphertext and IV to `IndexedDB`.\n\n*   See full implementation in\n    [references\u002Foffline_pwa_encryption.md](references\u002Foffline_pwa_encryption.md).\n\n--------------------------------------------------------------------------------\n\n## 2. Mandatory Security Directives & Browser Policies\n\nTo avoid multi-turn repair loops and browser security exceptions, provide all\nrequired CSP, COOP, and user activation directives in the initial deliverable:\n\n### A. Content Security Policy (CSP) Directives\n\n```http\nContent-Security-Policy:\n  script-src 'self' https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient;\n  frame-src https:\u002F\u002Faccounts.google.com\u002Fgsi\u002F;\n  connect-src https:\u002F\u002Faccounts.google.com\u002Fgsi\u002F;\n```\n\nIf using strict nonce-based CSP, attach the nonce to the GIS script tag:\n`\u003Cscript src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\" async defer\nnonce=\"{{NONCE}}\">\u003C\u002Fscript>`.\n\n### B. Cross-Origin Opener Policy (COOP)\n\nTo allow GIS popup dialogs to communicate credentials back to the parent window\nvia `postMessage`:\n\n```http\nCross-Origin-Opener-Policy: same-origin-allow-popups\n```\n\n*(Serving `same-origin` without `allow-popups` breaks GIS popups and results in\nsilent failures).*\n\n### C. Automatic Selection, FedCM, & Sign-Out Lifecycle (`disableAutoSelect`)\n\nWhen enabling automatic zero-click return sign-in with Google One Tap (FedCM is\nenabled by default in GIS):\n\n*   Set `auto_select: true` in `google.accounts.id.initialize({...})` (do not\n    pass the deprecated `use_fedcm_for_prompt` parameter).\n\n*   **Deprecated Library Warning**: NEVER mix deprecated `gapi.auth2`\n    (`gapi.auth2.init`, `gapi.auth2.getAuthInstance().signOut()`) with Google\n    Identity Services (GIS). `gapi.auth2` is completely retired; use GIS methods\n    exclusively.\n\n*   **Sign-Out Protocol**: When the user explicitly logs out of your\n    application, you **MUST** call `google.accounts.id.disableAutoSelect()`:\n\n    ```javascript\n    function handleUserLogout() {\n      \u002F\u002F 1. Disable automatic One Tap \u002F FedCM re-authentication\n      google.accounts.id.disableAutoSelect();\n\n      \u002F\u002F 2. Clear application session state \u002F server cookie\n      fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' }).then(() => {\n        window.location.href = '\u002Flogin';\n      });\n    }\n    ```\n\n*   *(Failing to call `disableAutoSelect()` causes an immediate automatic\n    re-login loop on the next page visit after intentional user logout).*\n\n### D. Reliable Dynamic Script Loading & Framework Lifecycle (React, Next.js, SPAs)\n\nWhen mounting Sign In With Google in Single Page Applications (React, Next.js,\nVue, Angular):\n\n*   Modern SPAs execute component lifecycles asynchronously. Attempting to\n    access `window.google.accounts.id` before `\u003Cscript\n    src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\">` has finished loading causes\n    `ReferenceError: google is not defined`.\n\n*   **NEVER use `gapi` or polling (`setInterval`)**: Use deterministic dynamic\n    script loading with `onload` \u002F `addEventListener('load')` event listeners.\n\n*   **Dynamic Script Loader Pattern**:\n\n    ```tsx\n    import React, { useEffect, useState } from 'react';\n\n    export function useGoogleIdentityScript() {\n      const [isLoaded, setIsLoaded] = useState(false);\n\n      useEffect(() => {\n        if (window.google?.accounts?.id) {\n          setIsLoaded(true);\n          return;\n        }\n\n        const existingScript = document.querySelector(\n          'script[src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\"]'\n        );\n        if (existingScript) {\n          existingScript.addEventListener('load', () => setIsLoaded(true));\n          return;\n        }\n\n        const script = document.createElement('script');\n        script.src = 'https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient';\n        script.async = true;\n        script.defer = true;\n        script.onload = () => setIsLoaded(true);\n        document.head.appendChild(script);\n      }, []);\n\n      return isLoaded;\n    }\n    ```\n\n*   *(Always use deterministic `onload` event listeners or framework `\u003CScript\n    strategy=\"afterInteractive\">` rather than brittle `setInterval` polling).*\n\n### E. Embedded Iframes & Permissions Policy (`identity-credentials-get`)\n\nWhen embedding Sign In With Google or One Tap inside cross-origin `\u003Ciframe>`\nelements or widget integrations, modern browser security models and FedCM\nrequire explicit Permissions Policy delegation on the container frame:\n\n```html\n\u003Ciframe\n  src=\"https:\u002F\u002Fexample.com\u002Fembed\"\n  allow=\"identity-credentials-get 'src' https:\u002F\u002Faccounts.google.com\">\n\u003C\u002Fiframe>\n```\n\n*(Omitting `allow=\"identity-credentials-get\"` blocks FedCM \u002F One Tap\ninitialization inside embedded or cross-origin contexts).* See full integration\nguide in [references\u002Fintermediate_iframe.md](references\u002Fintermediate_iframe.md).\n\n--------------------------------------------------------------------------------\n\n## 3. Implementation Contracts & Anti-Pattern Bans\n\n### A. Strict Ban on Legacy GAPI (`gapi.auth2`)\n\n*   **NEVER** import or reference `gapi.auth2`, `gapi.auth2.init`,\n    `gapi.auth2.getAuthInstance()`, or `gapi.signin2`. Always warn that\n    `gapi.auth2` is deprecated and decommissioned.\n\n*   GIS (`google.accounts.id.*` and `google.accounts.oauth2.*`) is completely\n    stateless. It replaces all legacy GAPI authentication libraries.\n\n--------------------------------------------------------------------------------\n\n## 4. Implementation Recipes (Progressive Disclosure)\n\nLoad the specific reference file matching your target architecture when\ngenerating implementation code:\n\n*   **Recipe 1 — Pattern A (Backend For Frontend with Python \u002F FastAPI)\n    [RECOMMENDED]**: Load\n    [references\u002Fbff_fastapi_verification.md](references\u002Fbff_fastapi_verification.md)\n    for custom UI button prompting, `google.oauth2.id_token.verify_oauth2_token`\n    cryptographic verification, `nonce` replay checks, Google Workspace `hd`\n    domain enforcement, and `HttpOnly; Secure; SameSite=Lax` session cookie\n    issuance.\n\n*   **Recipe 2 — Pattern B (Token-Mediating Backend with `login_uri` Form POST\n    Redirect) [RECOMMENDED]**: Load\n    [references\u002Ftmb_login_uri_redirect.md](references\u002Ftmb_login_uri_redirect.md)\n    for `data-login_uri` \u002F `ux_mode: 'redirect'` frontend setup and FastAPI\n    double-submit `g_csrf_token` cookie vs. form-body validation.\n\n*   **Recipe 3 — Pattern C (Browser-Based Ephemeral In-Memory SPA with Native\n    GIS Nonce) [Fallback]**: Load\n    [references\u002Fin_memory_spa_nonce.md](references\u002Fin_memory_spa_nonce.md) for\n    WebCrypto `nonce` generation (`google.accounts.id.initialize({ client_id,\n    nonce: clientNonce })`), UTF-8 safe Base64URL JWT decoding, and private\n    closure token management.\n\n*   **Recipe 4 — Pattern D (Browser-Based WebCrypto Encrypted IndexedDB for\n    Offline PWAs) [Fallback]**: Load\n    [references\u002Foffline_pwa_encryption.md](references\u002Foffline_pwa_encryption.md)\n    for non-extractable (`extractable: false`) `AES-GCM` `CryptoKey` generation\n    and encrypted `IndexedDB` storage.\n\n*   **Recipe 5 — Embedded Cross-Origin Contexts (`gsi\u002Fintermediate`)**: Load\n    [references\u002Fintermediate_iframe.md](references\u002Fintermediate_iframe.md) for\n    `\u003Cdiv id=\"g_id_intermediate_iframe\">`, `allow=\"identity-credentials-get\"`,\n    and strict `window.postMessage` origin verification.\n\n--------------------------------------------------------------------------------\n\n## 5. Sign-Out & Account Revocation Across All Patterns\n\n```javascript\nexport function handleSignOut(userEmail) {\n  \u002F\u002F 1. Disable client-side One Tap auto-selection\n  google.accounts.id.disableAutoSelect();\n\n  \u002F\u002F 2. Revoke OAuth grant if user disconnected account\n  if (userEmail) {\n    google.accounts.id.revoke(userEmail, () => {\n      console.log('User grant revoked');\n    });\n  }\n\n  \u002F\u002F 3. Clear storage \u002F session\n  AuthManager.clear(); \u002F\u002F Pattern C\n  fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' }); \u002F\u002F Pattern A\n}\n```\n\n--------------------------------------------------------------------------------\n\n## 6. References & Normative Standards\n\n*   [RFC 7519: JSON Web Token (JWT)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7519)\n    — Standard claims (`iss`, `sub`, `aud`, `exp`, `iat`, `nonce`), formatting,\n    and processing rules.\n\n*   [RFC 7515: JSON Web Signature (JWS)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7515)\n    — Cryptographic signature verification against Google's public JWK certs\n    (`https:\u002F\u002Fwww.googleapis.com\u002Foauth2\u002Fv3\u002Fcerts`).\n\n*   [RFC 4648 § 5: Base64url Encoding](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc4648#section-5)\n    — URL-safe Base64 encoding without padding used across JWT segments.\n\n*   [IETF OAuth 2.0 Browser-Based Applications](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-ietf-oauth-browser-based-apps)\n    — Normative architecture standards (§ 6.1 BFF, § 6.2 TMB, § 6.3\n    Client-side).\n\n*   [Google Identity Services Web Reference](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Freference\u002Fjs-reference)\n    — Official GIS API reference.\n\n*   [Intermediate Iframe API Reference](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Famp\u002Fnonamp-reference)\n    — Cross-origin iframe embedding guide.\n\n*   [Verify ID Tokens Server-Side](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Fguides\u002Fverify-google-id-token)\n    — Server-side token verification protocols.\n\n*   [W3C Federated Credential Management API (FedCM)](https:\u002F\u002Fwww.w3.org\u002FTR\u002Ffedcm-1\u002F)\n    — Browser identity credential mediation standard.\n\n*   [W3C Web Cryptography API](https:\u002F\u002Fwww.w3.org\u002FTR\u002FWebCryptoAPI\u002F) —\n    Non-extractable key generation (`extractable: false`) and AES-GCM standards.\n",{"name":5,"metadata":25,"description":7},{"version":26,"category":27},"1.0.0","Identity","main","2a870f189175a48c39f5f7e26a6d93b0be9cd13b",0,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills","https:\u002F\u002Ftangyixiao.github.io\u002Ftangyixiao-skills\u002F","https:\u002F\u002Fgithub.com\u002Ftangyixiao","http:\u002F\u002Fwww.sxyz.net\u002F","I am Tang Yixiao, a student in Shaoxing No.1 High School. I am eager to learn on GitHub and contribute my part to this community.","2026-11-11 15:45:59",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add tangyixiao\u002Ftangyixiao-skills --skill sign-in-with-google-web",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill sign-in-with-google-web",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill sign-in-with-google-web","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fsign-in-with-google-web\u002FSKILL.md",true,[51,57,61,65,69,73,77],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"INSTALL-SOURCE.json","REFERENCE","参考文档",532,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fsign-in-with-google-web\u002FINSTALL-SOURCE.json",{"path":58,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":16},"LICENSE","许可证",11358,{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fbff_fastapi_verification.md",3472,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fsign-in-with-google-web\u002Freferences\u002Fbff_fastapi_verification.md",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fin_memory_spa_nonce.md",3134,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fsign-in-with-google-web\u002Freferences\u002Fin_memory_spa_nonce.md",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fintermediate_iframe.md",1978,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fsign-in-with-google-web\u002Freferences\u002Fintermediate_iframe.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Foffline_pwa_encryption.md",3949,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fsign-in-with-google-web\u002Freferences\u002Foffline_pwa_encryption.md",{"path":78,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Ftmb_login_uri_redirect.md",2813,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fsign-in-with-google-web\u002Freferences\u002Ftmb_login_uri_redirect.md",[82,90,99,107,115,123],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":20},"01M7D8JK8FYBFNNAJXWD89CFH7","xlsx","Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":95,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M7D8JG8ERGGQQAMX0DWCG9GR","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","MIT","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":103,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":20},"01M7D8JE672GW3EHSE8EF185M4","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M7D8JBK572YDFMND8Q6CEYJW","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":20},"01M7D8J5QPWEXX61EGBKYH73R8","writing-clearly-and-concisely","Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":127,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":20},"01M7D8J36YWC8WZS5DK5AH03CD","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FSKILL.md",[],[]]