[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EEXWE9N8QYZXSZCASVRQ43":3,"skill-same:01M6EEXWE9N8QYZXSZCASVRQ43":47},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M6EEXWE9N8QYZXSZCASVRQ43","env-manager",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fenv-manager\u002FSKILL.md",[],[18,19],"env manager","env","2026-11-10 10:12:30",false,"# Environment Manager\n\n## Overview\n\nThis skill helps manage environment variables and secrets across multiple environments (development, staging, production). It detects missing variables, identifies mismatches, audits for exposed secrets, and helps safely rotate credentials without downtime.\n\n## Instructions\n\n### Auditing Environment Variables\n\n1. **Find all env var references in code:**\n   ```bash\n   grep -rn \"process\\.env\\.\" src\u002F --include=\"*.ts\" --include=\"*.js\" | \\\n     sed 's\u002F.*process\\.env\\.\\([A-Z_]*\\).*\u002F\\1\u002F' | sort -u\n   ```\n   For Python:\n   ```bash\n   grep -rn \"os\\.environ\\|os\\.getenv\" src\u002F --include=\"*.py\" | \\\n     sed 's\u002F.*os\\.\\(environ\\[\"\\|getenv(\"\\)\\([A-Z_]*\\).*\u002F\\2\u002F' | sort -u\n   ```\n\n2. **Compare against what's defined:**\n   ```bash\n   # From .env.example or .env\n   grep -v '^#' .env.example | grep '=' | cut -d'=' -f1 | sort -u\n   ```\n\n3. **Report:**\n   - Variables referenced in code but missing from `.env.example` → ⚠️ undocumented\n   - Variables in `.env.example` but never referenced in code → ℹ️ possibly stale\n   - Variables with no default and no validation → ? app will crash if missing\n\n### Comparing Environments\n\n1. Get variable lists from each environment:\n   - **Local:** Parse `.env` or `.env.local`\n   - **CI\u002FCD:** Check platform config (GitHub Actions secrets, GitLab CI variables)\n   - **Hosting:** Check platform env vars (Vercel, Railway, Heroku config)\n   - **Secrets manager:** Query Doppler, AWS SSM, or Vault\n\n2. Build a comparison matrix:\n   ```\n   Variable              | dev | staging | prod | Notes\n   DATABASE_URL          | ✓   | ✓       | ✓    | Different per env ✓\n   STRIPE_SECRET_KEY     | ✓   | ✓       | ✗    | ⚠️ Missing in prod!\n   REDIS_URL             | ✗   | ✓       | ✓    | ℹ️ Not needed locally\n   NEXT_PUBLIC_API_URL   | ✓   | ✓       | ✓    | Verify values differ\n   ```\n\n3. Flag issues:\n   - Variable present in staging but missing in production → likely deployment bug\n   - Same secret value across dev and prod → security risk\n   - Public-prefixed variables with secret values → will be exposed to client\n\n### Secret Rotation\n\n1. Identify the secret to rotate (API key, database password, JWT secret)\n2. Check where it's used:\n   ```bash\n   grep -rn \"THE_VAR_NAME\" . --include=\"*.ts\" --include=\"*.js\" --include=\"*.yml\" --include=\"*.yaml\" --include=\"Dockerfile\"\n   ```\n3. Generate rotation plan:\n   - For API keys: Create new key → update all environments → verify → revoke old key\n   - For database passwords: Update password → update connection strings → restart services\n   - For JWT secrets: Implement dual-key validation → deploy → set new primary → remove old\n4. Verify no hardcoded values exist (should all reference env vars)\n\n### Setting Up a New Environment\n\n1. Start from `.env.example` as the template\n2. Categorize each variable:\n   - **Shared config** (feature flags, API URLs) → copy and adjust for the new env\n   - **Secrets** (API keys, passwords) → generate new ones, never copy from another env\n   - **Infrastructure** (database URLs, Redis URLs) → get from the new env's infra\n3. Validate the new environment:\n   ```bash\n   # Check app starts without missing var errors\n   node -e \"require('dotenv').config(); console.log('Loaded', Object.keys(process.env).length, 'vars')\"\n   ```\n\n## Examples\n\n### Example 1: Audit for Missing Variables\n\n**User prompt:**\n```\nWe keep getting \"undefined\" errors in staging. Can you audit our env vars?\n```\n\n**Agent output:**\n```\nScanned src\u002F for environment variable references. Found 34 unique variables.\n\n? Missing from .env.example (undocumented):\n  OPENAI_API_KEY        — referenced in src\u002Flib\u002Fai.ts:12\n  WEBHOOK_SECRET        — referenced in src\u002Fapi\u002Fwebhooks.ts:8\n  RATE_LIMIT_MAX        — referenced in src\u002Fmiddleware\u002FrateLimit.ts:3\n\n⚠️ Referenced but no validation\u002Fdefault:\n  SMTP_HOST             — used in src\u002Flib\u002Femail.ts:5, crashes if undefined\n  CACHE_TTL             — used in src\u002Flib\u002Fcache.ts:2, parseInt(undefined) = NaN\n\nℹ️ In .env.example but never referenced in code:\n  LEGACY_API_URL        — possibly from a removed feature\n  DEBUG_MODE            — no references found\n\nRecommendation: Add the 3 undocumented vars to .env.example, add default\nvalues for SMTP_HOST and CACHE_TTL, and remove the 2 stale entries.\n```\n\n### Example 2: Sync Staging with Production\n\n**User prompt:**\n```\nWe're about to launch. Compare staging and production env vars to make sure nothing is missing.\n```\n\n**Agent output:**\n```\nCompared 41 variables across staging and production:\n\n? Missing in production (3):\n  STRIPE_WEBHOOK_SECRET  — payments will fail without this\n  SENTRY_DSN             — no error tracking in prod\n  FEATURE_FLAG_API_KEY   — feature flags will default to off\n\n⚠️ Same value in both environments (2):\n  JWT_SECRET             — using identical secret is a security risk\n  DATABASE_URL           — pointing to same DB! This should differ.\n\n✓ Correctly different (28 vars)\nℹ️ Staging-only (8 vars) — debug\u002Ftest vars, expected\n\nAction items:\n1. Set STRIPE_WEBHOOK_SECRET in prod (get from Stripe Dashboard → Webhooks)\n2. Set SENTRY_DSN in prod (get from Sentry → Project Settings → Client Keys)\n3. Generate a new JWT_SECRET for prod: openssl rand -base64 32\n4. Verify DATABASE_URL points to the production database, not staging\n```\n\n## Guidelines\n\n- Never print or log actual secret values — show only variable names and metadata\n- When comparing environments, flag identical secrets as a security concern\n- Always check for `NEXT_PUBLIC_` or `VITE_` prefixed vars that contain actual secrets\n- Recommend `.env.example` as the source of truth, committed to git (without values)\n- For rotation, always plan for zero-downtime: new key → deploy → verify → revoke old\n- Check CI\u002FCD pipeline configs too — secrets there often go stale after renames\n- Suggest validation libraries (envalid, zod) to catch missing vars at startup, not runtime\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Fenv-manager",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill env-manager",{"tool":39,"command":40},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill env-manager",{"tool":42,"command":43},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill env-manager","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fenv-manager\u002FSKILL.md",true,[],[48,57,66,75,81,87],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":20},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[54,55,56],"model","model hierarchy","model hierarchy skill",{"skillNo":58,"name":59,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":20},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[63,64,65],"MCP","zoom","zoom mcp",{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":20},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[72,73,74,64],"sdk","zoom apps sdk","apps",{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":20},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[77],{"skillNo":82,"name":83,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":20},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[83],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":20},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[89]]