[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71GPQRN4QYWX9AFPJXVB973":3,"skill-same:01M71GPQRN4QYWX9AFPJXVB973":97},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M71GPQRN4QYWX9AFPJXVB973","gtm-setup",null,"Automates Google Tag Manager API setup including googleapis installation, OAuth credential creation, token management, and prerequisites validation. Use when users need to \"set up GTM API\", \"configure GTM API access\", \"get GTM OAuth credentials\", \"install googleapis\", or encounter authentication errors. Handles complete technical setup from dependency installation through API connection verification.","JSGforever\u002Fskillguard","JSGforever","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85541948?v=4","01M71FQD3E132VMR5F4TAYX3YS","01M71FQD4DYW0XJ4XQ4YQH75Y9",2,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__aimonk2025--gtm-setup\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"gtm setup","setup","gtm","install","token","encounter","dependency","credentials","verification","api","configure","when","access","token management","errors","up","authentication","creation","get","SET","2026-11-10 10:12:30",false,"---\nname: gtm-setup\ndescription: Automates Google Tag Manager API setup including googleapis installation, OAuth credential creation, token management, and prerequisites validation. Use when users need to \"set up GTM API\", \"configure GTM API access\", \"get GTM OAuth credentials\", \"install googleapis\", or encounter authentication errors. Handles complete technical setup from dependency installation through API connection verification.\n---\n\n# GTM Setup - Technical Prerequisites\n\nAutomate the complete GTM API setup process, from installing dependencies to validating API access.\n\n## Workflow\n\n### Phase 1: Prerequisites Check\n\n**Step 1.1: Check Node.js Project**\n```\nVerify package.json exists:\n- If missing → Error: \"This must be run in a Node.js project\"\n- If exists → Continue\n```\n\n**Step 1.2: Check for Existing Setup**\n```\nCheck for existing files:\n- gtm-credentials.json → Already configured\n- gtm-token.json → Already authorized\n- gtm-config.json → Configuration exists\n\nIf all exist:\n  → \"GTM API already configured. Run validation to test connection.\"\n  → Skip to Phase 6 (Validation)\n\nIf partial:\n  → \"Partial setup detected. Continuing from [step]...\"\n```\n\n### Phase 2: Install googleapis\n\n**Step 2.1: Auto-Install Package**\n```\nRun: npm install googleapis --save\n\nMonitor output for:\n✓ Success → Continue\n✗ Error → Display error, suggest manual installation\n```\n\n**Step 2.2: Verify Installation**\n```\nCheck package.json dependencies:\n- \"googleapis\": \"^...\" present → Success\n- Missing → Retry or manual install\n```\n\n### Phase 3: Google Cloud Project Setup\n\n**Step 3.1: Guide Cloud Console Access**\n```\nPresent clickable URLs:\n\nStep 1: Create\u002FSelect Google Cloud Project\n→ https:\u002F\u002Fconsole.cloud.google.com\u002Fprojectcreate\n\nStep 2: Enable Google Tag Manager API\n→ https:\u002F\u002Fconsole.cloud.google.com\u002Fapis\u002Flibrary\u002Ftagmanager.googleapis.com\n\nStep 3: Create OAuth 2.0 Credentials\n→ https:\u002F\u002Fconsole.cloud.google.com\u002Fapis\u002Fcredentials\n\nWait for user confirmation at each step.\n```\n\n**Step 3.2: OAuth Credential Configuration**\n```\nGuide user through credential creation:\n\n1. Click \"Create Credentials\" → \"OAuth client ID\"\n2. Application type: \"Desktop app\"\n3. Name: \"GTM Automation Script\"\n4. Click \"Create\"\n5. Download JSON file\n\nPrompt: \"Download the credentials JSON file and save it in your project root.\"\n```\n\n**Step 3.3: Save Credentials**\n```\nAsk user for downloaded file path:\n→ \"Where did you save the credentials file?\"\n\nOptions:\na) File is in project root → Look for oauth2.keys.json or similar\nb) User provides path → Copy to gtm-credentials.json\nc) User pastes content → Write to gtm-credentials.json\n\nValidate JSON structure:\n- Has \"installed\" or \"web\" key\n- Has \"client_id\", \"client_secret\", \"redirect_uris\"\n\nIf invalid → Error with specific issue\nIf valid → Save as gtm-credentials.json\n```\n\n### Phase 4: GTM Account & Container Configuration\n\n**Step 4.1: Gather GTM Information**\n```\nGuide user to find GTM details:\n\n\"Open Google Tag Manager: https:\u002F\u002Ftagmanager.google.com\"\n\nQ1: What is your GTM Account ID?\n→ Hint: In GTM, go to Admin. Account ID is shown at top (format: 1234567890)\n\nQ2: What is your GTM Container ID?\n→ Hint: In GTM, select container. Container ID shown at top (format: GTM-XXXXXX)\n\nValidate inputs:\n- Account ID: Must be numeric\n- Container ID: Must start with \"GTM-\"\n```\n\n**Step 4.2: Create Configuration File**\n```\nGenerate gtm-config.json:\n\n{\n  \"accountId\": \"[user input]\",\n  \"containerId\": \"[user input]\",\n  \"containerPublicId\": \"[user input]\"\n}\n\nSave to project root.\n```\n\nNote: workspaceId is NOT stored in gtm-config.json. The gtm-implementation skill always resolves the active workspace dynamically via the GTM API. This prevents breakage after you publish a version in the GTM UI, which deletes and recreates the workspace.\n\n### Phase 5: OAuth Authorization\n\n**Step 5.1: Generate Auth URL**\n```\nUsing googleapis library, generate OAuth consent URL.\n\nPresent to user:\n\"\n=== Authorization Required ===\n\nOpen this URL in your browser to authorize access:\n\n[Long Google OAuth URL]\n\nThis will:\n1. Ask you to sign in to Google\n2. Show permissions requested (Read\u002FWrite GTM access)\n3. Redirect to a localhost URL with an authorization code\n\nAfter authorizing, you'll see a page that says:\n'The authentication flow has completed. You may close this window.'\n\nCopy the FULL URL from your browser address bar.\n\"\n```\n\n**Step 5.2: Exchange Code for Token**\n```\nPrompt: \"Paste the full redirect URL here:\"\n\nExtract authorization code from URL:\n- URL format: http:\u002F\u002Flocalhost\u002F?code=XXXX&scope=...\n- Parse 'code' parameter\n\nExchange code for access\u002Frefresh tokens using OAuth2 client.\n\nSave tokens to gtm-token.json:\n{\n  \"access_token\": \"...\",\n  \"refresh_token\": \"...\",\n  \"scope\": \"...\",\n  \"token_type\": \"Bearer\",\n  \"expiry_date\": 1234567890\n}\n\nSuccess message:\n\"✓ Authorization complete! Tokens saved to gtm-token.json\"\n```\n\n### Phase 6: Validation & Testing\n\n**Step 6.1: Test API Connection**\n```\nUsing saved credentials and token, make test API call:\n\nGET \u002Ftagmanager\u002Fv2\u002Faccounts\u002F{accountId}\u002Fcontainers\u002F{containerId}\n\nExpected responses:\n✓ 200 OK → Success! Container details returned\n✗ 401 Unauthorized → Token invalid, re-authorize\n✗ 403 Forbidden → Missing permissions, check API enable\n✗ 404 Not Found → Wrong account\u002Fcontainer ID\n✗ Other → Display error details\n```\n\n**Step 6.2: Verify Permissions**\n```\nCheck API response for required permissions:\n\nRequired GTM API scopes:\n- tagmanager.edit.containers\n- tagmanager.readonly\n\nIf missing scopes:\n→ Error: \"Insufficient permissions. Re-authorize with correct scopes.\"\n→ Restart Phase 5\n```\n\n**Step 6.3: Final Confirmation**\n```\nDisplay success summary:\n\n\"\n=== GTM API Setup Complete ===\n\n✓ googleapis installed\n✓ OAuth credentials configured (gtm-credentials.json)\n✓ Access token obtained (gtm-token.json)\n✓ GTM configuration saved (gtm-config.json)\n✓ API connection validated\n\nAccount: [accountId]\nContainer: [containerPublicId]\n\nFiles created:\n- gtm-credentials.json (OAuth credentials)\n- gtm-token.json (Access token - DO NOT commit to git)\n- gtm-config.json (GTM account\u002Fcontainer info)\n\nNext steps:\n→ Add gtm-token.json to .gitignore\n→ Invoke gtm-implementation skill to implement tracking\n\nReady to implement tracking? Invoke gtm-implementation skill.\n\"\n```\n\n## Scripts\n\nUse the following scripts for automated steps:\n\n### scripts\u002Finstall-googleapis.js\n```javascript\n\u002F\u002F Auto-install googleapis package\nconst { execSync } = require('child_process');\n\ntry {\n  console.log('Installing googleapis...');\n  execSync('npm install googleapis --save', { stdio: 'inherit' });\n  console.log('✓ googleapis installed successfully');\n} catch (error) {\n  console.error('✗ Installation failed:', error.message);\n  process.exit(1);\n}\n```\n\n### scripts\u002Fvalidate-prerequisites.js\n```javascript\n\u002F\u002F Validate existing setup files\nconst fs = require('fs');\nconst path = require('path');\n\nconst files = {\n  'package.json': { required: true, description: 'Node.js project' },\n  'gtm-credentials.json': { required: false, description: 'OAuth credentials' },\n  'gtm-token.json': { required: false, description: 'Access token' },\n  'gtm-config.json': { required: false, description: 'GTM configuration' }\n};\n\nconsole.log('Validating prerequisites...\\n');\n\nlet allValid = true;\nlet setupStatus = {\n  credentials: false,\n  token: false,\n  config: false\n};\n\nfor (const [filename, config] of Object.entries(files)) {\n  const exists = fs.existsSync(path.join(process.cwd(), filename));\n\n  if (filename === 'gtm-credentials.json' && exists) setupStatus.credentials = true;\n  if (filename === 'gtm-token.json' && exists) setupStatus.token = true;\n  if (filename === 'gtm-config.json' && exists) setupStatus.config = true;\n\n  const status = exists ? '✓' : (config.required ? '✗' : '○');\n  console.log(`${status} ${filename} - ${config.description}`);\n\n  if (config.required && !exists) {\n    allValid = false;\n  }\n}\n\nconsole.log('\\nSetup status:');\nif (setupStatus.credentials && setupStatus.token && setupStatus.config) {\n  console.log('✓ Complete setup detected');\n  console.log('→ Run test-connection.js to validate');\n} else if (setupStatus.credentials || setupStatus.token || setupStatus.config) {\n  console.log('○ Partial setup detected');\n  if (!setupStatus.credentials) console.log('  Missing: OAuth credentials');\n  if (!setupStatus.token) console.log('  Missing: Access token');\n  if (!setupStatus.config) console.log('  Missing: GTM configuration');\n} else {\n  console.log('○ No setup detected');\n  console.log('→ Start from Phase 3 (Google Cloud setup)');\n}\n\nprocess.exit(allValid ? 0 : 1);\n```\n\n### scripts\u002Foauth-authorize.js\n```javascript\n\u002F\u002F OAuth authorization flow\nconst { google } = require('googleapis');\nconst fs = require('fs');\nconst path = require('path');\nconst readline = require('readline');\n\nconst SCOPES = ['https:\u002F\u002Fwww.googleapis.com\u002Fauth\u002Ftagmanager.edit.containers'];\nconst TOKEN_PATH = path.join(process.cwd(), 'gtm-token.json');\nconst CREDENTIALS_PATH = path.join(process.cwd(), 'gtm-credentials.json');\n\n\u002F\u002F Load credentials\nconst credentials = JSON.parse(fs.readFileSync(CREDENTIALS_PATH, 'utf8'));\nconst { client_secret, client_id, redirect_uris } = credentials.installed || credentials.web;\n\nconst oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);\n\n\u002F\u002F Generate auth URL\nconst authUrl = oAuth2Client.generateAuthUrl({\n  access_type: 'offline',\n  scope: SCOPES,\n});\n\nconsole.log('\\n=== GTM API Authorization ===\\n');\nconsole.log('Open this URL in your browser to authorize:\\n');\nconsole.log(authUrl);\nconsole.log('\\nAfter authorization, copy the full redirect URL from your browser.\\n');\n\nconst rl = readline.createInterface({\n  input: process.stdin,\n  output: process.stdout,\n});\n\nrl.question('Paste the redirect URL here: ', (redirectUrl) => {\n  rl.close();\n\n  \u002F\u002F Extract code from URL\n  const url = new URL(redirectUrl);\n  const code = url.searchParams.get('code');\n\n  if (!code) {\n    console.error('✗ No authorization code found in URL');\n    process.exit(1);\n  }\n\n  \u002F\u002F Exchange code for token\n  oAuth2Client.getToken(code, (err, token) => {\n    if (err) {\n      console.error('✗ Error retrieving access token:', err);\n      process.exit(1);\n    }\n\n    \u002F\u002F Save token\n    fs.writeFileSync(TOKEN_PATH, JSON.stringify(token, null, 2));\n    console.log('\\n✓ Token saved to', TOKEN_PATH);\n    console.log('\\n=== Authorization Complete ===\\n');\n    console.log('You can now use the GTM API.');\n    console.log('\\nIMPORTANT: Add gtm-token.json to .gitignore\\n');\n  });\n});\n```\n\n### scripts\u002Ftest-connection.js\n```javascript\n\u002F\u002F Test GTM API connection\nconst { google } = require('googleapis');\nconst fs = require('fs');\nconst path = require('path');\n\nconst TOKEN_PATH = path.join(process.cwd(), 'gtm-token.json');\nconst CREDENTIALS_PATH = path.join(process.cwd(), 'gtm-credentials.json');\nconst CONFIG_PATH = path.join(process.cwd(), 'gtm-config.json');\n\n\u002F\u002F Check files exist\nif (!fs.existsSync(CREDENTIALS_PATH)) {\n  console.error('✗ gtm-credentials.json not found');\n  process.exit(1);\n}\n\nif (!fs.existsSync(TOKEN_PATH)) {\n  console.error('✗ gtm-token.json not found. Run oauth-authorize.js first.');\n  process.exit(1);\n}\n\nif (!fs.existsSync(CONFIG_PATH)) {\n  console.error('✗ gtm-config.json not found');\n  process.exit(1);\n}\n\n\u002F\u002F Load files\nconst credentials = JSON.parse(fs.readFileSync(CREDENTIALS_PATH, 'utf8'));\nconst token = JSON.parse(fs.readFileSync(TOKEN_PATH, 'utf8'));\nconst config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf8'));\n\nconst { client_secret, client_id, redirect_uris } = credentials.installed || credentials.web;\n\n\u002F\u002F Create OAuth client\nconst oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);\noAuth2Client.setCredentials(token);\n\n\u002F\u002F Create GTM client\nconst tagmanager = google.tagmanager({ version: 'v2', auth: oAuth2Client });\n\nconsole.log('\\n=== Testing GTM API Connection ===\\n');\nconsole.log(`Account ID: ${config.accountId}`);\nconsole.log(`Container ID: ${config.containerPublicId}\\n`);\n\n\u002F\u002F Test API call\nconst path_url = `accounts\u002F${config.accountId}\u002Fcontainers\u002F${config.containerId}`;\n\ntagmanager.accounts.containers.get({ path: path_url })\n  .then(response => {\n    console.log('✓ Connection successful!\\n');\n    console.log('Container details:');\n    console.log(`  Name: ${response.data.name}`);\n    console.log(`  Public ID: ${response.data.publicId}`);\n    console.log(`  Usage Context: ${response.data.usageContext.join(', ')}\\n`);\n    console.log('=== Setup Verified ===\\n');\n    console.log('Ready to use GTM API!\\n');\n  })\n  .catch(error => {\n    console.error('✗ Connection failed\\n');\n\n    if (error.code === 401) {\n      console.error('Error: Unauthorized (401)');\n      console.error('→ Token may be expired. Run oauth-authorize.js again.\\n');\n    } else if (error.code === 403) {\n      console.error('Error: Forbidden (403)');\n      console.error('→ Check that GTM API is enabled in Google Cloud Console.\\n');\n    } else if (error.code === 404) {\n      console.error('Error: Not Found (404)');\n      console.error('→ Check account ID and container ID in gtm-config.json.\\n');\n    } else {\n      console.error('Error:', error.message, '\\n');\n    }\n\n    process.exit(1);\n  });\n```\n\n## References\n\n- `references\u002Fgoogle-cloud-setup.md` - Detailed Google Cloud Console setup guide with screenshots\n\n## Important Guidelines\n\n### Security Best Practices\n\n1. **Never commit tokens**:\n   - Add `gtm-token.json` to `.gitignore`\n   - Tokens contain sensitive access credentials\n\n2. **Credentials file security**:\n   - `gtm-credentials.json` can be committed (contains no secrets for Desktop app type)\n   - But recommend adding to `.gitignore` for extra security\n\n3. **Token refresh**:\n   - Tokens expire after 1 hour\n   - Refresh token (included) allows automatic renewal\n   - googleapis handles refresh automatically\n\n### Common Issues\n\n**Issue**: \"googleapis not found\"\n→ Solution: Run `npm install googleapis --save`\n\n**Issue**: \"Invalid redirect URI\"\n→ Solution: Ensure OAuth client type is \"Desktop app\", not \"Web application\"\n\n**Issue**: \"403 Forbidden\"\n→ Solution: Enable GTM API in Google Cloud Console\n\n**Issue**: \"404 Not Found\"\n→ Solution: Verify account ID and container ID are correct\n\n**Issue**: \"Token expired\"\n→ Solution: Run oauth-authorize.js again to get new token\n\n**Issue**: \"Workspace not found\" \u002F skill creates a new workspace unexpectedly\n→ Cause: GTM deletes workspaces after publishing. A stored workspace ID becomes stale.\n→ Solution: The skill now resolves workspace dynamically. No action needed.\n\n### Testing\n\nAfter setup, verify with:\n```bash\nnode scripts\u002Ftest-connection.js\n```\n\nExpected output:\n```\n✓ Connection successful!\n\nContainer details:\n  Name: My Website\n  Public ID: GTM-XXXXXX\n  Usage Context: web\n\n=== Setup Verified ===\n```\n\n## Execution Checklist\n\n- [ ] package.json exists (Node.js project)\n- [ ] googleapis installed\n- [ ] Google Cloud project created\n- [ ] GTM API enabled\n- [ ] OAuth credentials created and downloaded\n- [ ] gtm-credentials.json saved\n- [ ] GTM account ID obtained\n- [ ] GTM container ID obtained\n- [ ] gtm-config.json created\n- [ ] OAuth authorization completed\n- [ ] gtm-token.json saved\n- [ ] API connection tested successfully\n- [ ] gtm-token.json added to .gitignore\n\n## Supporting Files\n\n- `examples\u002Fsample.md` - Example setup session showing each phase output and files created\n\n## Output Files\n\n- **gtm-credentials.json** - OAuth 2.0 client credentials\n- **gtm-token.json** - Access token and refresh token (SENSITIVE)\n- **gtm-config.json** - GTM account and container configuration\n\n## Handoff\n\nAfter successful setup:\n```\n✓ GTM API configured and validated\n\nNext step: Invoke gtm-implementation skill to:\n- Implement dataLayer events in your code\n- Create GTM variables, triggers, and tags via API\n\nReady to implement? Invoke gtm-implementation skill.\n```\n\n## Common Questions\n\n**Q: Can I use the same credentials for multiple projects?**\nA: Yes. Copy gtm-credentials.json to other projects. Each project needs its own token (gtm-token.json).\n\n**Q: What if I have multiple GTM containers?**\nA: Run setup for each container separately. Create different gtm-config.json files or use different project directories.\n\n**Q: Do I need a Google Cloud billing account?**\nA: No. GTM API is free to use. No billing account required.\n\n**Q: Can I revoke access later?**\nA: Yes. Go to https:\u002F\u002Fmyaccount.google.com\u002Fpermissions and revoke access to \"GTM Automation Script\".\n\n**Q: What scopes does this request?**\nA: `tagmanager.edit.containers` - Read and write access to GTM containers. This allows creating\u002Fupdating variables, triggers, tags.\n","# GTM Setup - Technical Prerequisites\n\nAutomate the complete GTM API setup process, from installing dependencies to validating API access.\n\n## Workflow\n\n### Phase 1: Prerequisites Check\n\n**Step 1.1: Check Node.js Project**\n```\nVerify package.json exists:\n- If missing → Error: \"This must be run in a Node.js project\"\n- If exists → Continue\n```\n\n**Step 1.2: Check for Existing Setup**\n```\nCheck for existing files:\n- gtm-credentials.json → Already configured\n- gtm-token.json → Already authorized\n- gtm-config.json → Configuration exists\n\nIf all exist:\n  → \"GTM API already configured. Run validation to test connection.\"\n  → Skip to Phase 6 (Validation)\n\nIf partial:\n  → \"Partial setup detected. Continuing from [step]...\"\n```\n\n### Phase 2: Install googleapis\n\n**Step 2.1: Auto-Install Package**\n```\nRun: npm install googleapis --save\n\nMonitor output for:\n✓ Success → Continue\n✗ Error → Display error, suggest manual installation\n```\n\n**Step 2.2: Verify Installation**\n```\nCheck package.json dependencies:\n- \"googleapis\": \"^...\" present → Success\n- Missing → Retry or manual install\n```\n\n### Phase 3: Google Cloud Project Setup\n\n**Step 3.1: Guide Cloud Console Access**\n```\nPresent clickable URLs:\n\nStep 1: Create\u002FSelect Google Cloud Project\n→ https:\u002F\u002Fconsole.cloud.google.com\u002Fprojectcreate\n\nStep 2: Enable Google Tag Manager API\n→ https:\u002F\u002Fconsole.cloud.google.com\u002Fapis\u002Flibrary\u002Ftagmanager.googleapis.com\n\nStep 3: Create OAuth 2.0 Credentials\n→ https:\u002F\u002Fconsole.cloud.google.com\u002Fapis\u002Fcredentials\n\nWait for user confirmation at each step.\n```\n\n**Step 3.2: OAuth Credential Configuration**\n```\nGuide user through credential creation:\n\n1. Click \"Create Credentials\" → \"OAuth client ID\"\n2. Application type: \"Desktop app\"\n3. Name: \"GTM Automation Script\"\n4. Click \"Create\"\n5. Download JSON file\n\nPrompt: \"Download the credentials JSON file and save it in your project root.\"\n```\n\n**Step 3.3: Save Credentials**\n```\nAsk user for downloaded file path:\n→ \"Where did you save the credentials file?\"\n\nOptions:\na) File is in project root → Look for oauth2.keys.json or similar\nb) User provides path → Copy to gtm-credentials.json\nc) User pastes content → Write to gtm-credentials.json\n\nValidate JSON structure:\n- Has \"installed\" or \"web\" key\n- Has \"client_id\", \"client_secret\", \"redirect_uris\"\n\nIf invalid → Error with specific issue\nIf valid → Save as gtm-credentials.json\n```\n\n### Phase 4: GTM Account & Container Configuration\n\n**Step 4.1: Gather GTM Information**\n```\nGuide user to find GTM details:\n\n\"Open Google Tag Manager: https:\u002F\u002Ftagmanager.google.com\"\n\nQ1: What is your GTM Account ID?\n→ Hint: In GTM, go to Admin. Account ID is shown at top (format: 1234567890)\n\nQ2: What is your GTM Container ID?\n→ Hint: In GTM, select container. Container ID shown at top (format: GTM-XXXXXX)\n\nValidate inputs:\n- Account ID: Must be numeric\n- Container ID: Must start with \"GTM-\"\n```\n\n**Step 4.2: Create Configuration File**\n```\nGenerate gtm-config.json:\n\n{\n  \"accountId\": \"[user input]\",\n  \"containerId\": \"[user input]\",\n  \"containerPublicId\": \"[user input]\"\n}\n\nSave to project root.\n```\n\nNote: workspaceId is NOT stored in gtm-config.json. The gtm-implementation skill always resolves the active workspace dynamically via the GTM API. This prevents breakage after you publish a version in the GTM UI, which deletes and recreates the workspace.\n\n### Phase 5: OAuth Authorization\n\n**Step 5.1: Generate Auth URL**\n```\nUsing googleapis library, generate OAuth consent URL.\n\nPresent to user:\n\"\n=== Authorization Required ===\n\nOpen this URL in your browser to authorize access:\n\n[Long Google OAuth URL]\n\nThis will:\n1. Ask you to sign in to Google\n2. Show permissions requested (Read\u002FWrite GTM access)\n3. Redirect to a localhost URL with an authorization code\n\nAfter authorizing, you'll see a page that says:\n'The authentication flow has completed. You may close this window.'\n\nCopy the FULL URL from your browser address bar.\n\"\n```\n\n**Step 5.2: Exchange Code for Token**\n```\nPrompt: \"Paste the full redirect URL here:\"\n\nExtract authorization code from URL:\n- URL format: http:\u002F\u002Flocalhost\u002F?code=XXXX&scope=...\n- Parse 'code' parameter\n\nExchange code for access\u002Frefresh tokens using OAuth2 client.\n\nSave tokens to gtm-token.json:\n{\n  \"access_token\": \"...\",\n  \"refresh_token\": \"...\",\n  \"scope\": \"...\",\n  \"token_type\": \"Bearer\",\n  \"expiry_date\": 1234567890\n}\n\nSuccess message:\n\"✓ Authorization complete! Tokens saved to gtm-token.json\"\n```\n\n### Phase 6: Validation & Testing\n\n**Step 6.1: Test API Connection**\n```\nUsing saved credentials and token, make test API call:\n\nGET \u002Ftagmanager\u002Fv2\u002Faccounts\u002F{accountId}\u002Fcontainers\u002F{containerId}\n\nExpected responses:\n✓ 200 OK → Success! Container details returned\n✗ 401 Unauthorized → Token invalid, re-authorize\n✗ 403 Forbidden → Missing permissions, check API enable\n✗ 404 Not Found → Wrong account\u002Fcontainer ID\n✗ Other → Display error details\n```\n\n**Step 6.2: Verify Permissions**\n```\nCheck API response for required permissions:\n\nRequired GTM API scopes:\n- tagmanager.edit.containers\n- tagmanager.readonly\n\nIf missing scopes:\n→ Error: \"Insufficient permissions. Re-authorize with correct scopes.\"\n→ Restart Phase 5\n```\n\n**Step 6.3: Final Confirmation**\n```\nDisplay success summary:\n\n\"\n=== GTM API Setup Complete ===\n\n✓ googleapis installed\n✓ OAuth credentials configured (gtm-credentials.json)\n✓ Access token obtained (gtm-token.json)\n✓ GTM configuration saved (gtm-config.json)\n✓ API connection validated\n\nAccount: [accountId]\nContainer: [containerPublicId]\n\nFiles created:\n- gtm-credentials.json (OAuth credentials)\n- gtm-token.json (Access token - DO NOT commit to git)\n- gtm-config.json (GTM account\u002Fcontainer info)\n\nNext steps:\n→ Add gtm-token.json to .gitignore\n→ Invoke gtm-implementation skill to implement tracking\n\nReady to implement tracking? Invoke gtm-implementation skill.\n\"\n```\n\n## Scripts\n\nUse the following scripts for automated steps:\n\n### scripts\u002Finstall-googleapis.js\n```javascript\n\u002F\u002F Auto-install googleapis package\nconst { execSync } = require('child_process');\n\ntry {\n  console.log('Installing googleapis...');\n  execSync('npm install googleapis --save', { stdio: 'inherit' });\n  console.log('✓ googleapis installed successfully');\n} catch (error) {\n  console.error('✗ Installation failed:', error.message);\n  process.exit(1);\n}\n```\n\n### scripts\u002Fvalidate-prerequisites.js\n```javascript\n\u002F\u002F Validate existing setup files\nconst fs = require('fs');\nconst path = require('path');\n\nconst files = {\n  'package.json': { required: true, description: 'Node.js project' },\n  'gtm-credentials.json': { required: false, description: 'OAuth credentials' },\n  'gtm-token.json': { required: false, description: 'Access token' },\n  'gtm-config.json': { required: false, description: 'GTM configuration' }\n};\n\nconsole.log('Validating prerequisites...\\n');\n\nlet allValid = true;\nlet setupStatus = {\n  credentials: false,\n  token: false,\n  config: false\n};\n\nfor (const [filename, config] of Object.entries(files)) {\n  const exists = fs.existsSync(path.join(process.cwd(), filename));\n\n  if (filename === 'gtm-credentials.json' && exists) setupStatus.credentials = true;\n  if (filename === 'gtm-token.json' && exists) setupStatus.token = true;\n  if (filename === 'gtm-config.json' && exists) setupStatus.config = true;\n\n  const status = exists ? '✓' : (config.required ? '✗' : '○');\n  console.log(`${status} ${filename} - ${config.description}`);\n\n  if (config.required && !exists) {\n    allValid = false;\n  }\n}\n\nconsole.log('\\nSetup status:');\nif (setupStatus.credentials && setupStatus.token && setupStatus.config) {\n  console.log('✓ Complete setup detected');\n  console.log('→ Run test-connection.js to validate');\n} else if (setupStatus.credentials || setupStatus.token || setupStatus.config) {\n  console.log('○ Partial setup detected');\n  if (!setupStatus.credentials) console.log('  Missing: OAuth credentials');\n  if (!setupStatus.token) console.log('  Missing: Access token');\n  if (!setupStatus.config) console.log('  Missing: GTM configuration');\n} else {\n  console.log('○ No setup detected');\n  console.log('→ Start from Phase 3 (Google Cloud setup)');\n}\n\nprocess.exit(allValid ? 0 : 1);\n```\n\n### scripts\u002Foauth-authorize.js\n```javascript\n\u002F\u002F OAuth authorization flow\nconst { google } = require('googleapis');\nconst fs = require('fs');\nconst path = require('path');\nconst readline = require('readline');\n\nconst SCOPES = ['https:\u002F\u002Fwww.googleapis.com\u002Fauth\u002Ftagmanager.edit.containers'];\nconst TOKEN_PATH = path.join(process.cwd(), 'gtm-token.json');\nconst CREDENTIALS_PATH = path.join(process.cwd(), 'gtm-credentials.json');\n\n\u002F\u002F Load credentials\nconst credentials = JSON.parse(fs.readFileSync(CREDENTIALS_PATH, 'utf8'));\nconst { client_secret, client_id, redirect_uris } = credentials.installed || credentials.web;\n\nconst oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);\n\n\u002F\u002F Generate auth URL\nconst authUrl = oAuth2Client.generateAuthUrl({\n  access_type: 'offline',\n  scope: SCOPES,\n});\n\nconsole.log('\\n=== GTM API Authorization ===\\n');\nconsole.log('Open this URL in your browser to authorize:\\n');\nconsole.log(authUrl);\nconsole.log('\\nAfter authorization, copy the full redirect URL from your browser.\\n');\n\nconst rl = readline.createInterface({\n  input: process.stdin,\n  output: process.stdout,\n});\n\nrl.question('Paste the redirect URL here: ', (redirectUrl) => {\n  rl.close();\n\n  \u002F\u002F Extract code from URL\n  const url = new URL(redirectUrl);\n  const code = url.searchParams.get('code');\n\n  if (!code) {\n    console.error('✗ No authorization code found in URL');\n    process.exit(1);\n  }\n\n  \u002F\u002F Exchange code for token\n  oAuth2Client.getToken(code, (err, token) => {\n    if (err) {\n      console.error('✗ Error retrieving access token:', err);\n      process.exit(1);\n    }\n\n    \u002F\u002F Save token\n    fs.writeFileSync(TOKEN_PATH, JSON.stringify(token, null, 2));\n    console.log('\\n✓ Token saved to', TOKEN_PATH);\n    console.log('\\n=== Authorization Complete ===\\n');\n    console.log('You can now use the GTM API.');\n    console.log('\\nIMPORTANT: Add gtm-token.json to .gitignore\\n');\n  });\n});\n```\n\n### scripts\u002Ftest-connection.js\n```javascript\n\u002F\u002F Test GTM API connection\nconst { google } = require('googleapis');\nconst fs = require('fs');\nconst path = require('path');\n\nconst TOKEN_PATH = path.join(process.cwd(), 'gtm-token.json');\nconst CREDENTIALS_PATH = path.join(process.cwd(), 'gtm-credentials.json');\nconst CONFIG_PATH = path.join(process.cwd(), 'gtm-config.json');\n\n\u002F\u002F Check files exist\nif (!fs.existsSync(CREDENTIALS_PATH)) {\n  console.error('✗ gtm-credentials.json not found');\n  process.exit(1);\n}\n\nif (!fs.existsSync(TOKEN_PATH)) {\n  console.error('✗ gtm-token.json not found. Run oauth-authorize.js first.');\n  process.exit(1);\n}\n\nif (!fs.existsSync(CONFIG_PATH)) {\n  console.error('✗ gtm-config.json not found');\n  process.exit(1);\n}\n\n\u002F\u002F Load files\nconst credentials = JSON.parse(fs.readFileSync(CREDENTIALS_PATH, 'utf8'));\nconst token = JSON.parse(fs.readFileSync(TOKEN_PATH, 'utf8'));\nconst config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf8'));\n\nconst { client_secret, client_id, redirect_uris } = credentials.installed || credentials.web;\n\n\u002F\u002F Create OAuth client\nconst oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);\noAuth2Client.setCredentials(token);\n\n\u002F\u002F Create GTM client\nconst tagmanager = google.tagmanager({ version: 'v2', auth: oAuth2Client });\n\nconsole.log('\\n=== Testing GTM API Connection ===\\n');\nconsole.log(`Account ID: ${config.accountId}`);\nconsole.log(`Container ID: ${config.containerPublicId}\\n`);\n\n\u002F\u002F Test API call\nconst path_url = `accounts\u002F${config.accountId}\u002Fcontainers\u002F${config.containerId}`;\n\ntagmanager.accounts.containers.get({ path: path_url })\n  .then(response => {\n    console.log('✓ Connection successful!\\n');\n    console.log('Container details:');\n    console.log(`  Name: ${response.data.name}`);\n    console.log(`  Public ID: ${response.data.publicId}`);\n    console.log(`  Usage Context: ${response.data.usageContext.join(', ')}\\n`);\n    console.log('=== Setup Verified ===\\n');\n    console.log('Ready to use GTM API!\\n');\n  })\n  .catch(error => {\n    console.error('✗ Connection failed\\n');\n\n    if (error.code === 401) {\n      console.error('Error: Unauthorized (401)');\n      console.error('→ Token may be expired. Run oauth-authorize.js again.\\n');\n    } else if (error.code === 403) {\n      console.error('Error: Forbidden (403)');\n      console.error('→ Check that GTM API is enabled in Google Cloud Console.\\n');\n    } else if (error.code === 404) {\n      console.error('Error: Not Found (404)');\n      console.error('→ Check account ID and container ID in gtm-config.json.\\n');\n    } else {\n      console.error('Error:', error.message, '\\n');\n    }\n\n    process.exit(1);\n  });\n```\n\n## References\n\n- `references\u002Fgoogle-cloud-setup.md` - Detailed Google Cloud Console setup guide with screenshots\n\n## Important Guidelines\n\n### Security Best Practices\n\n1. **Never commit tokens**:\n   - Add `gtm-token.json` to `.gitignore`\n   - Tokens contain sensitive access credentials\n\n2. **Credentials file security**:\n   - `gtm-credentials.json` can be committed (contains no secrets for Desktop app type)\n   - But recommend adding to `.gitignore` for extra security\n\n3. **Token refresh**:\n   - Tokens expire after 1 hour\n   - Refresh token (included) allows automatic renewal\n   - googleapis handles refresh automatically\n\n### Common Issues\n\n**Issue**: \"googleapis not found\"\n→ Solution: Run `npm install googleapis --save`\n\n**Issue**: \"Invalid redirect URI\"\n→ Solution: Ensure OAuth client type is \"Desktop app\", not \"Web application\"\n\n**Issue**: \"403 Forbidden\"\n→ Solution: Enable GTM API in Google Cloud Console\n\n**Issue**: \"404 Not Found\"\n→ Solution: Verify account ID and container ID are correct\n\n**Issue**: \"Token expired\"\n→ Solution: Run oauth-authorize.js again to get new token\n\n**Issue**: \"Workspace not found\" \u002F skill creates a new workspace unexpectedly\n→ Cause: GTM deletes workspaces after publishing. A stored workspace ID becomes stale.\n→ Solution: The skill now resolves workspace dynamically. No action needed.\n\n### Testing\n\nAfter setup, verify with:\n```bash\nnode scripts\u002Ftest-connection.js\n```\n\nExpected output:\n```\n✓ Connection successful!\n\nContainer details:\n  Name: My Website\n  Public ID: GTM-XXXXXX\n  Usage Context: web\n\n=== Setup Verified ===\n```\n\n## Execution Checklist\n\n- [ ] package.json exists (Node.js project)\n- [ ] googleapis installed\n- [ ] Google Cloud project created\n- [ ] GTM API enabled\n- [ ] OAuth credentials created and downloaded\n- [ ] gtm-credentials.json saved\n- [ ] GTM account ID obtained\n- [ ] GTM container ID obtained\n- [ ] gtm-config.json created\n- [ ] OAuth authorization completed\n- [ ] gtm-token.json saved\n- [ ] API connection tested successfully\n- [ ] gtm-token.json added to .gitignore\n\n## Supporting Files\n\n- `examples\u002Fsample.md` - Example setup session showing each phase output and files created\n\n## Output Files\n\n- **gtm-credentials.json** - OAuth 2.0 client credentials\n- **gtm-token.json** - Access token and refresh token (SENSITIVE)\n- **gtm-config.json** - GTM account and container configuration\n\n## Handoff\n\nAfter successful setup:\n```\n✓ GTM API configured and validated\n\nNext step: Invoke gtm-implementation skill to:\n- Implement dataLayer events in your code\n- Create GTM variables, triggers, and tags via API\n\nReady to implement? Invoke gtm-implementation skill.\n```\n\n## Common Questions\n\n**Q: Can I use the same credentials for multiple projects?**\nA: Yes. Copy gtm-credentials.json to other projects. Each project needs its own token (gtm-token.json).\n\n**Q: What if I have multiple GTM containers?**\nA: Run setup for each container separately. Create different gtm-config.json files or use different project directories.\n\n**Q: Do I need a Google Cloud billing account?**\nA: No. GTM API is free to use. No billing account required.\n\n**Q: Can I revoke access later?**\nA: Yes. Go to https:\u002F\u002Fmyaccount.google.com\u002Fpermissions and revoke access to \"GTM Automation Script\".\n\n**Q: What scopes does this request?**\nA: `tagmanager.edit.containers` - Read and write access to GTM containers. This allows creating\u002Fupdating variables, triggers, tags.\n",{"name":5,"description":7},"main","f2ec4b3b9133d34eeaf9b38e4b0a97e8e5705a7f","benchmarks\u002Ffinal\u002Fskills\u002Fasset1__aimonk2025--gtm-setup",0,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard","https:\u002F\u002Fgithub.com\u002FJSGforever","2026-08-29 18:27:56",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add JSGforever\u002Fskillguard --skill gtm-setup",{"tool":61,"command":62},"bunx","bunx skills add JSGforever\u002Fskillguard --skill gtm-setup",{"tool":64,"command":65},"pnpm","pnpm dlx skills add JSGforever\u002Fskillguard --skill gtm-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__aimonk2025--gtm-setup\u002FSKILL.md",true,[69,75,79,85,89,93],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"examples\u002Fsample.md","REFERENCE","参考文档",2427,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__aimonk2025--gtm-setup\u002Fexamples\u002Fsample.md",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fgoogle-cloud-setup.md",7701,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__aimonk2025--gtm-setup\u002Freferences\u002Fgoogle-cloud-setup.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Finstall-googleapis.js","SCRIPT","脚本",354,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__aimonk2025--gtm-setup\u002Fscripts\u002Finstall-googleapis.js",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Foauth-authorize.js",2274,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__aimonk2025--gtm-setup\u002Fscripts\u002Foauth-authorize.js",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"scripts\u002Ftest-connection.js",2649,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__aimonk2025--gtm-setup\u002Fscripts\u002Ftest-connection.js",{"path":94,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":95,"sourceHtmlUrl":96},"scripts\u002Fvalidate-prerequisites.js",1808,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__aimonk2025--gtm-setup\u002Fscripts\u002Fvalidate-prerequisites.js",[98,127,143,169,191,212],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":107,"publishedAt":43},"01M71HY2SNXBA9Q00WZDTZQ31Z","skillguard-codex-scanner","Hybrid deterministic+LLM agent-skill security scanner. Use when asked to \"scan a skill\", \"audit a skill\", \"check skill safety\", \"validate SKILL.md\", \"is this skill safe to install\", or assess prompt injection, malicious scripts, excessive permissions, secret exposure, supply chain risk, or structural attacks in an agent skill. Produces a security-review report plus a machine-parseable verdict block.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fsrc\u002Fskillguard\u002Fstatic_scanner\u002Fskillguard-codex-scanner\u002FSKILL.md",[104],{"categoryNo":105,"categoryName":106,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[108,109,110,111,112,113,114,115,116,117,118,119,34,120,121,122,123,124,125,126],"scanner","skillguard codex scanner","skillguard","codex","chain","skill security","security-review","review report","structural","secret","prompt injection","security scanner","review","malicious","permissions","exposure","audit","scripts","safe",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":131,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":139,"publishedAt":43},"01M71HY0SPKTT3S27BC2HPAC5M","data-exfiltrator","Analyzes data files","MIT","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Fsmoke-one-skill\u002Fasset1__cisco-ai-defense--data-exfiltrator\u002FSKILL.md",[134],{"categoryNo":135,"categoryName":136,"taxonomyType":137,"taxonomyTypeDesc":138},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[140,141,142],"data","data exfiltrator","files",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":43},"01M71HXVS9EMN44BGDW215FZ72","real-time-collaboration-engine","Build real-time collaborative editing with WebSockets, OT\u002FCRDT conflict resolution, and presence awareness. Implements cursor tracking, optimistic updates, and offline sync. Use for collaborative editors, whiteboards, video editing. Activate on \"real-time collaboration\", \"WebSocket sync\", \"multiplayer editing\", \"CRDT\", \"presence awareness\". NOT for simple chat, request-response APIs, or single-user apps.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--real-time-collaboration-engine\u002FSKILL.md",[],[150,151,152,153,154,155,156,157,158,159,160,161,35,162,163,164,165,166,167,168],"time","real time collaboration engine","real time collaboration","collaboration","engine","real time","Video","reliability","video editing","performance","conflict resolution","presence","apps","updates","Bash","activate","optimizer","react","streaming",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":178,"publishedAt":43},"01M71HXP6CTY4KFN0QVMMN0V7J","react-performance-optimizer","Optimize React apps for 60fps performance. Implements memoization, virtualization, code splitting, bundle optimization. Use for slow renders, large lists, bundle bloat. Activate on \"React performance\", \"slow render\", \"useMemo\", \"bundle size\", \"virtualization\". NOT for backend optimization, non-React frameworks, or premature optimization.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--react-performance-optimizer\u002FSKILL.md",[175],{"categoryNo":176,"categoryName":177,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",[159,179,166,167,180,181,182,183,184,185,150,186,187,162,164,188,165,168,189,190],"react performance optimizer","react performance","performance optimizer","app","nextjs","expert","re","render","2025","code","router","strategies",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":198,"publishedAt":43},"01M71HXH7QXSQB4QTDZ7SP7YXQ","llm-streaming-response-handler","Build production LLM streaming UIs with Server-Sent Events, real-time token display, cancellation, error recovery. Handles OpenAI\u002FAnthropic\u002FClaude streaming APIs. Use for chatbots, AI assistants, real-time text generation. Activate on \"LLM streaming\", \"SSE\", \"token stream\", \"chat UI\", \"real-time AI\". NOT for batch processing, non-streaming APIs, or WebSocket bidirectional chat.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--llm-streaming-response-handler\u002FSKILL.md",[197],{"categoryNo":176,"categoryName":177,"taxonomyType":20,"taxonomyTypeDesc":21},[199,168,200,201,202,203,159,150,204,205,206,164,165,166,207,167,208,209,210,211],"llm streaming response handler","handler","error","processing","retry","chat ui","error recovery","critical","batch","display","text","server","read",{"skillNo":213,"name":214,"nameZh":6,"description":215,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":216,"categories":217,"keywords":223,"publishedAt":43},"01M71HXCB0E1YRKYW1Y8T0Y106","github-actions-pipeline-builder","Build production CI\u002FCD pipelines with GitHub Actions. Implements matrix builds, caching, deployments, testing, security scanning. Use for automated testing, deployments, release workflows. Activate on \"GitHub Actions\", \"CI\u002FCD\", \"workflow\", \"deployment pipeline\", \"automated testing\". NOT for Jenkins\u002FCircleCI, manual deployments, or non-GitHub repositories.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--github-actions-pipeline-builder\u002FSKILL.md",[218,219,222],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":220,"categoryName":221,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":105,"categoryName":106,"taxonomyType":20,"taxonomyTypeDesc":21},[224,225,226,227,228,229,230,157,184,231,232,233,165,190,234,211,235,236,237,238],"github actions pipeline builder","actions","github actions","pipeline builder","github","builder","pipeline","testing","ci","workflows","run","release","write","edit","git"]