[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F6G7N2X8QFF520XXAD8THV":3,"skill-same:01M6F6G7N2X8QFF520XXAD8THV":80},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6F6G7N2X8QFF520XXAD8THV","evernote-multi-env-setup",null,"Configure multi-environment setup for Evernote integrations.\nUse when setting up dev, staging, and production environments,\nor managing environment-specific configurations.\nTrigger with phrases like \"evernote environments\", \"evernote staging\",\n\"evernote dev setup\", \"multiple environments evernote\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fevernote-pack\u002Fskills\u002Fevernote-multi-env-setup\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"setup","evernote","evernote multi env setup","multi","env setup","env","when","dev setup","for","environments","environment setup","trigger","io","multi-environment","up","use","environment","edit","write","read","integrations","configure","Bash","dev","2026-11-10 10:12:30",false,"---\nname: evernote-multi-env-setup\ndescription: |\n  Configure multi-environment setup for Evernote integrations.\n  Use when setting up dev, staging, and production environments,\n  or managing environment-specific configurations.\n  Trigger with phrases like \"evernote environments\", \"evernote staging\",\n  \"evernote dev setup\", \"multiple environments evernote\".\nallowed-tools: Read, Write, Edit, Bash(npm:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Evernote Multi-Environment Setup\n\n## Overview\n\nConfigure separate development, staging, and production environments for Evernote integrations with proper isolation and configuration management.\n\n## Prerequisites\n\n- Multiple Evernote API keys (sandbox and production)\n- Environment management infrastructure\n- CI\u002FCD pipeline\n\n## Environment Strategy\n\n| Environment | Evernote Mode | Purpose | Users |\n|-------------|---------------|---------|-------|\n| Development | Sandbox | Local development | Developers |\n| Staging | Sandbox | Integration testing | QA team |\n| Production | Production | Live users | Customers |\n\n## Instructions\n\n### Step 1: Environment Configuration Files\n\n```bash\n# Project structure\nproject\u002F\n├── config\u002F\n│   ├── default.js        # Shared defaults\n│   ├── development.js    # Dev overrides\n│   ├── staging.js        # Staging overrides\n│   └── production.js     # Production overrides\n├── .env.development\n├── .env.staging\n├── .env.production\n└── .env.example\n```\n\n```javascript\n\u002F\u002F config\u002Fdefault.js\nmodule.exports = {\n  evernote: {\n    requestTimeout: 30000,\n    connectionTimeout: 10000,\n    maxRetries: 3\n  },\n  cache: {\n    ttl: 300,\n    prefix: 'evernote:'\n  },\n  logging: {\n    redactTokens: true\n  }\n};\n```\n\n```javascript\n\u002F\u002F config\u002Fdevelopment.js\nmodule.exports = {\n  evernote: {\n    sandbox: true,\n    serviceHost: 'sandbox.evernote.com',\n    \u002F\u002F More lenient for debugging\n    requestTimeout: 60000,\n    maxRetries: 1\n  },\n  cache: {\n    ttl: 60, \u002F\u002F Short TTL for development\n    prefix: 'evernote:dev:'\n  },\n  logging: {\n    level: 'debug'\n  }\n};\n```\n\n```javascript\n\u002F\u002F config\u002Fstaging.js\nmodule.exports = {\n  evernote: {\n    sandbox: true, \u002F\u002F Still using sandbox for staging\n    serviceHost: 'sandbox.evernote.com',\n    requestTimeout: 30000,\n    maxRetries: 2\n  },\n  cache: {\n    ttl: 180,\n    prefix: 'evernote:staging:'\n  },\n  logging: {\n    level: 'info'\n  }\n};\n```\n\n```javascript\n\u002F\u002F config\u002Fproduction.js\nmodule.exports = {\n  evernote: {\n    sandbox: false, \u002F\u002F Production mode\n    serviceHost: 'www.evernote.com',\n    requestTimeout: 30000,\n    maxRetries: 3\n  },\n  cache: {\n    ttl: 300,\n    prefix: 'evernote:prod:'\n  },\n  logging: {\n    level: 'warn'\n  }\n};\n```\n\n### Step 2: Environment Variables\n\n```bash\n# .env.example\nNODE_ENV=development\n\n# Evernote\nEVERNOTE_CONSUMER_KEY=\nEVERNOTE_CONSUMER_SECRET=\nEVERNOTE_SANDBOX=true\n\n# App\nAPP_URL=http:\u002F\u002Flocalhost:3000\nSESSION_SECRET=change-this-secret\n\n# Database\nDATABASE_URL=\n\n# Redis\nREDIS_URL=\n```\n\n```bash\n# .env.development\nNODE_ENV=development\nEVERNOTE_CONSUMER_KEY=your-sandbox-key\nEVERNOTE_CONSUMER_SECRET=your-sandbox-secret\nEVERNOTE_SANDBOX=true\nAPP_URL=http:\u002F\u002Flocalhost:3000\nSESSION_SECRET=dev-secret-not-secure\nDATABASE_URL=postgresql:\u002F\u002Flocalhost:5432\u002Fevernote_dev\nREDIS_URL=redis:\u002F\u002Flocalhost:6379\u002F0\n```\n\n```bash\n# .env.staging\nNODE_ENV=staging\nEVERNOTE_CONSUMER_KEY=your-sandbox-key\nEVERNOTE_CONSUMER_SECRET=your-sandbox-secret\nEVERNOTE_SANDBOX=true\nAPP_URL=https:\u002F\u002Fstaging.yourapp.com\n# Secret managed externally (Vault, AWS Secrets, etc.)\n# DATABASE_URL managed externally\n# REDIS_URL managed externally\n```\n\n```bash\n# .env.production\nNODE_ENV=production\n# ALL SECRETS MANAGED EXTERNALLY\nEVERNOTE_SANDBOX=false\nAPP_URL=https:\u002F\u002Fyourapp.com\n```\n\n### Step 3: Configuration Loader\n\n```javascript\n\u002F\u002F config\u002Findex.js\nconst path = require('path');\nconst deepMerge = require('lodash.merge');\n\nclass ConfigLoader {\n  constructor() {\n    this.env = process.env.NODE_ENV || 'development';\n    this.config = this.loadConfig();\n  }\n\n  loadConfig() {\n    \u002F\u002F Load default config\n    const defaultConfig = require('.\u002Fdefault');\n\n    \u002F\u002F Load environment-specific config\n    let envConfig = {};\n    try {\n      envConfig = require(`.\u002F${this.env}`);\n    } catch (error) {\n      console.warn(`No config file for environment: ${this.env}`);\n    }\n\n    \u002F\u002F Merge configs\n    const merged = deepMerge({}, defaultConfig, envConfig);\n\n    \u002F\u002F Override with environment variables\n    return this.applyEnvOverrides(merged);\n  }\n\n  applyEnvOverrides(config) {\n    \u002F\u002F Evernote overrides\n    if (process.env.EVERNOTE_CONSUMER_KEY) {\n      config.evernote.consumerKey = process.env.EVERNOTE_CONSUMER_KEY;\n    }\n    if (process.env.EVERNOTE_CONSUMER_SECRET) {\n      config.evernote.consumerSecret = process.env.EVERNOTE_CONSUMER_SECRET;\n    }\n    if (process.env.EVERNOTE_SANDBOX !== undefined) {\n      config.evernote.sandbox = process.env.EVERNOTE_SANDBOX === 'true';\n    }\n\n    \u002F\u002F App overrides\n    if (process.env.APP_URL) {\n      config.app = config.app || {};\n      config.app.url = process.env.APP_URL;\n    }\n\n    \u002F\u002F Database overrides\n    if (process.env.DATABASE_URL) {\n      config.database = config.database || {};\n      config.database.url = process.env.DATABASE_URL;\n    }\n\n    \u002F\u002F Redis overrides\n    if (process.env.REDIS_URL) {\n      config.redis = config.redis || {};\n      config.redis.url = process.env.REDIS_URL;\n    }\n\n    return config;\n  }\n\n  get(key) {\n    const keys = key.split('.');\n    let value = this.config;\n\n    for (const k of keys) {\n      if (value === undefined) return undefined;\n      value = value[k];\n    }\n\n    return value;\n  }\n\n  getAll() {\n    return this.config;\n  }\n\n  isProduction() {\n    return this.env === 'production';\n  }\n\n  isDevelopment() {\n    return this.env === 'development';\n  }\n\n  isStaging() {\n    return this.env === 'staging';\n  }\n}\n\nmodule.exports = new ConfigLoader();\n```\n\n### Step 4: Environment-Aware Client Factory\n\n```javascript\n\u002F\u002F services\u002Fevernote-factory.js\nconst Evernote = require('evernote');\nconst config = require('..\u002Fconfig');\n\nclass EvernoteClientFactory {\n  static createOAuthClient() {\n    return new Evernote.Client({\n      consumerKey: config.get('evernote.consumerKey'),\n      consumerSecret: config.get('evernote.consumerSecret'),\n      sandbox: config.get('evernote.sandbox'),\n      china: false\n    });\n  }\n\n  static createAuthenticatedClient(accessToken) {\n    return new Evernote.Client({\n      token: accessToken,\n      sandbox: config.get('evernote.sandbox')\n    });\n  }\n\n  static getEnvironmentInfo() {\n    return {\n      environment: process.env.NODE_ENV,\n      sandbox: config.get('evernote.sandbox'),\n      serviceHost: config.get('evernote.sandbox')\n        ? 'sandbox.evernote.com'\n        : 'www.evernote.com'\n    };\n  }\n\n  static validateEnvironment() {\n    const errors = [];\n\n    if (!config.get('evernote.consumerKey')) {\n      errors.push('Missing EVERNOTE_CONSUMER_KEY');\n    }\n\n    if (!config.get('evernote.consumerSecret')) {\n      errors.push('Missing EVERNOTE_CONSUMER_SECRET');\n    }\n\n    if (config.isProduction() && config.get('evernote.sandbox')) {\n      errors.push('Production environment cannot use sandbox mode');\n    }\n\n    return {\n      valid: errors.length === 0,\n      errors\n    };\n  }\n}\n\nmodule.exports = EvernoteClientFactory;\n```\n\n### Step 5: Docker Compose for Local Development\n\n```yaml\n# docker-compose.yml\nversion: '3.8'\n\nservices:\n  app:\n    build:\n      context: .\n      dockerfile: Dockerfile.dev\n    volumes:\n      - .:\u002Fapp\n      - \u002Fapp\u002Fnode_modules\n    ports:\n      - \"3000:3000\"\n    environment:\n      - NODE_ENV=development\n    env_file:\n      - .env.development\n    depends_on:\n      - postgres\n      - redis\n\n  postgres:\n    image: postgres:15-alpine\n    volumes:\n      - postgres_data:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\n    environment:\n      POSTGRES_DB: evernote_dev\n      POSTGRES_USER: postgres\n      POSTGRES_PASSWORD: postgres\n    ports:\n      - \"5432:5432\"\n\n  redis:\n    image: redis:7-alpine\n    ports:\n      - \"6379:6379\"\n\nvolumes:\n  postgres_data:\n```\n\n### Step 6: Environment-Specific Middleware\n\n```javascript\n\u002F\u002F middleware\u002Fenvironment.js\nconst config = require('..\u002Fconfig');\n\nfunction environmentMiddleware(req, res, next) {\n  \u002F\u002F Add environment info to request\n  req.environment = {\n    name: process.env.NODE_ENV,\n    sandbox: config.get('evernote.sandbox'),\n    isProduction: config.isProduction()\n  };\n\n  \u002F\u002F Development-only features\n  if (config.isDevelopment()) {\n    \u002F\u002F Add debug headers\n    res.setHeader('X-Environment', 'development');\n    res.setHeader('X-Evernote-Mode', 'sandbox');\n  }\n\n  \u002F\u002F Production safety checks\n  if (config.isProduction()) {\n    \u002F\u002F Ensure HTTPS\n    if (req.protocol !== 'https') {\n      return res.redirect(301, `https:\u002F\u002F${req.hostname}${req.url}`);\n    }\n  }\n\n  next();\n}\n\nfunction requireProduction(req, res, next) {\n  if (!config.isProduction()) {\n    return res.status(403).json({\n      error: 'This endpoint is only available in production'\n    });\n  }\n  next();\n}\n\nfunction blockInProduction(req, res, next) {\n  if (config.isProduction()) {\n    return res.status(403).json({\n      error: 'This endpoint is not available in production'\n    });\n  }\n  next();\n}\n\nmodule.exports = {\n  environmentMiddleware,\n  requireProduction,\n  blockInProduction\n};\n```\n\n### Step 7: CI\u002FCD Environment Configuration\n\n```yaml\n# .github\u002Fworkflows\u002Fdeploy.yml\nname: Deploy\n\non:\n  push:\n    branches: [main, develop]\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n          - branch: develop\n            environment: staging\n            evernote_sandbox: 'true'\n          - branch: main\n            environment: production\n            evernote_sandbox: 'false'\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Set environment\n        if: github.ref == format('refs\u002Fheads\u002F{0}', matrix.branch)\n        run: echo \"DEPLOY_ENV=${{ matrix.environment }}\" >> $GITHUB_ENV\n\n      - name: Deploy to ${{ matrix.environment }}\n        if: env.DEPLOY_ENV != ''\n        uses: .\u002F.github\u002Factions\u002Fdeploy\n        with:\n          environment: ${{ matrix.environment }}\n        env:\n          EVERNOTE_CONSUMER_KEY: ${{ secrets[format('EVERNOTE_CONSUMER_KEY_{0}', matrix.environment)] }}\n          EVERNOTE_CONSUMER_SECRET: ${{ secrets[format('EVERNOTE_CONSUMER_SECRET_{0}', matrix.environment)] }}\n          EVERNOTE_SANDBOX: ${{ matrix.evernote_sandbox }}\n```\n\n### Step 8: Environment Health Check\n\n```javascript\n\u002F\u002F routes\u002Fhealth.js\nconst config = require('..\u002Fconfig');\nconst EvernoteClientFactory = require('..\u002Fservices\u002Fevernote-factory');\n\nrouter.get('\u002Fhealth\u002Fenvironment', async (req, res) => {\n  const envInfo = EvernoteClientFactory.getEnvironmentInfo();\n  const validation = EvernoteClientFactory.validateEnvironment();\n\n  res.json({\n    status: validation.valid ? 'ok' : 'error',\n    environment: {\n      ...envInfo,\n      nodeEnv: process.env.NODE_ENV,\n      version: process.env.APP_VERSION || 'unknown'\n    },\n    validation,\n    checks: {\n      database: await checkDatabase(),\n      redis: await checkRedis(),\n      evernote: await checkEvernoteConnectivity()\n    }\n  });\n});\n\nasync function checkEvernoteConnectivity() {\n  try {\n    \u002F\u002F Simple connectivity check - doesn't require auth\n    const https = require('https');\n    const host = config.get('evernote.sandbox')\n      ? 'sandbox.evernote.com'\n      : 'www.evernote.com';\n\n    return new Promise((resolve) => {\n      const req = https.get(`https:\u002F\u002F${host}`, { timeout: 5000 }, (res) => {\n        resolve({ status: 'ok', host });\n      });\n\n      req.on('error', () => {\n        resolve({ status: 'error', host, message: 'Connection failed' });\n      });\n\n      req.on('timeout', () => {\n        req.destroy();\n        resolve({ status: 'error', host, message: 'Timeout' });\n      });\n    });\n  } catch (error) {\n    return { status: 'error', message: error.message };\n  }\n}\n```\n\n## Output\n\n- Environment-specific configuration files\n- Configuration loader with environment variable support\n- Environment-aware client factory\n- Docker Compose for local development\n- CI\u002FCD environment configuration\n- Health check endpoints\n\n## Environment Checklist\n\n```markdown\n## Per-Environment Checklist\n\n### Development\n- [ ] Sandbox credentials configured\n- [ ] Local database running\n- [ ] Redis cache running\n- [ ] Debug logging enabled\n\n### Staging\n- [ ] Sandbox credentials (separate from dev)\n- [ ] Staging database provisioned\n- [ ] Staging Redis provisioned\n- [ ] Monitoring configured\n\n### Production\n- [ ] Production API key approved\n- [ ] Secrets in secure storage\n- [ ] Production database provisioned\n- [ ] Production Redis provisioned\n- [ ] Monitoring and alerting\n- [ ] Backup procedures\n```\n\n## Resources\n\n- [12 Factor App - Config](https:\u002F\u002F12factor.net\u002Fconfig)\n- [Evernote Sandbox](https:\u002F\u002Fsandbox.evernote.com)\n- [Docker Compose](https:\u002F\u002Fdocs.docker.com\u002Fcompose\u002F)\n\n## Next Steps\n\nFor observability setup, see `evernote-observability`.\n","# Evernote Multi-Environment Setup\n\n## Overview\n\nConfigure separate development, staging, and production environments for Evernote integrations with proper isolation and configuration management.\n\n## Prerequisites\n\n- Multiple Evernote API keys (sandbox and production)\n- Environment management infrastructure\n- CI\u002FCD pipeline\n\n## Environment Strategy\n\n| Environment | Evernote Mode | Purpose | Users |\n|-------------|---------------|---------|-------|\n| Development | Sandbox | Local development | Developers |\n| Staging | Sandbox | Integration testing | QA team |\n| Production | Production | Live users | Customers |\n\n## Instructions\n\n### Step 1: Environment Configuration Files\n\n```bash\n# Project structure\nproject\u002F\n├── config\u002F\n│   ├── default.js        # Shared defaults\n│   ├── development.js    # Dev overrides\n│   ├── staging.js        # Staging overrides\n│   └── production.js     # Production overrides\n├── .env.development\n├── .env.staging\n├── .env.production\n└── .env.example\n```\n\n```javascript\n\u002F\u002F config\u002Fdefault.js\nmodule.exports = {\n  evernote: {\n    requestTimeout: 30000,\n    connectionTimeout: 10000,\n    maxRetries: 3\n  },\n  cache: {\n    ttl: 300,\n    prefix: 'evernote:'\n  },\n  logging: {\n    redactTokens: true\n  }\n};\n```\n\n```javascript\n\u002F\u002F config\u002Fdevelopment.js\nmodule.exports = {\n  evernote: {\n    sandbox: true,\n    serviceHost: 'sandbox.evernote.com',\n    \u002F\u002F More lenient for debugging\n    requestTimeout: 60000,\n    maxRetries: 1\n  },\n  cache: {\n    ttl: 60, \u002F\u002F Short TTL for development\n    prefix: 'evernote:dev:'\n  },\n  logging: {\n    level: 'debug'\n  }\n};\n```\n\n```javascript\n\u002F\u002F config\u002Fstaging.js\nmodule.exports = {\n  evernote: {\n    sandbox: true, \u002F\u002F Still using sandbox for staging\n    serviceHost: 'sandbox.evernote.com',\n    requestTimeout: 30000,\n    maxRetries: 2\n  },\n  cache: {\n    ttl: 180,\n    prefix: 'evernote:staging:'\n  },\n  logging: {\n    level: 'info'\n  }\n};\n```\n\n```javascript\n\u002F\u002F config\u002Fproduction.js\nmodule.exports = {\n  evernote: {\n    sandbox: false, \u002F\u002F Production mode\n    serviceHost: 'www.evernote.com',\n    requestTimeout: 30000,\n    maxRetries: 3\n  },\n  cache: {\n    ttl: 300,\n    prefix: 'evernote:prod:'\n  },\n  logging: {\n    level: 'warn'\n  }\n};\n```\n\n### Step 2: Environment Variables\n\n```bash\n# .env.example\nNODE_ENV=development\n\n# Evernote\nEVERNOTE_CONSUMER_KEY=\nEVERNOTE_CONSUMER_SECRET=\nEVERNOTE_SANDBOX=true\n\n# App\nAPP_URL=http:\u002F\u002Flocalhost:3000\nSESSION_SECRET=change-this-secret\n\n# Database\nDATABASE_URL=\n\n# Redis\nREDIS_URL=\n```\n\n```bash\n# .env.development\nNODE_ENV=development\nEVERNOTE_CONSUMER_KEY=your-sandbox-key\nEVERNOTE_CONSUMER_SECRET=your-sandbox-secret\nEVERNOTE_SANDBOX=true\nAPP_URL=http:\u002F\u002Flocalhost:3000\nSESSION_SECRET=dev-secret-not-secure\nDATABASE_URL=postgresql:\u002F\u002Flocalhost:5432\u002Fevernote_dev\nREDIS_URL=redis:\u002F\u002Flocalhost:6379\u002F0\n```\n\n```bash\n# .env.staging\nNODE_ENV=staging\nEVERNOTE_CONSUMER_KEY=your-sandbox-key\nEVERNOTE_CONSUMER_SECRET=your-sandbox-secret\nEVERNOTE_SANDBOX=true\nAPP_URL=https:\u002F\u002Fstaging.yourapp.com\n# Secret managed externally (Vault, AWS Secrets, etc.)\n# DATABASE_URL managed externally\n# REDIS_URL managed externally\n```\n\n```bash\n# .env.production\nNODE_ENV=production\n# ALL SECRETS MANAGED EXTERNALLY\nEVERNOTE_SANDBOX=false\nAPP_URL=https:\u002F\u002Fyourapp.com\n```\n\n### Step 3: Configuration Loader\n\n```javascript\n\u002F\u002F config\u002Findex.js\nconst path = require('path');\nconst deepMerge = require('lodash.merge');\n\nclass ConfigLoader {\n  constructor() {\n    this.env = process.env.NODE_ENV || 'development';\n    this.config = this.loadConfig();\n  }\n\n  loadConfig() {\n    \u002F\u002F Load default config\n    const defaultConfig = require('.\u002Fdefault');\n\n    \u002F\u002F Load environment-specific config\n    let envConfig = {};\n    try {\n      envConfig = require(`.\u002F${this.env}`);\n    } catch (error) {\n      console.warn(`No config file for environment: ${this.env}`);\n    }\n\n    \u002F\u002F Merge configs\n    const merged = deepMerge({}, defaultConfig, envConfig);\n\n    \u002F\u002F Override with environment variables\n    return this.applyEnvOverrides(merged);\n  }\n\n  applyEnvOverrides(config) {\n    \u002F\u002F Evernote overrides\n    if (process.env.EVERNOTE_CONSUMER_KEY) {\n      config.evernote.consumerKey = process.env.EVERNOTE_CONSUMER_KEY;\n    }\n    if (process.env.EVERNOTE_CONSUMER_SECRET) {\n      config.evernote.consumerSecret = process.env.EVERNOTE_CONSUMER_SECRET;\n    }\n    if (process.env.EVERNOTE_SANDBOX !== undefined) {\n      config.evernote.sandbox = process.env.EVERNOTE_SANDBOX === 'true';\n    }\n\n    \u002F\u002F App overrides\n    if (process.env.APP_URL) {\n      config.app = config.app || {};\n      config.app.url = process.env.APP_URL;\n    }\n\n    \u002F\u002F Database overrides\n    if (process.env.DATABASE_URL) {\n      config.database = config.database || {};\n      config.database.url = process.env.DATABASE_URL;\n    }\n\n    \u002F\u002F Redis overrides\n    if (process.env.REDIS_URL) {\n      config.redis = config.redis || {};\n      config.redis.url = process.env.REDIS_URL;\n    }\n\n    return config;\n  }\n\n  get(key) {\n    const keys = key.split('.');\n    let value = this.config;\n\n    for (const k of keys) {\n      if (value === undefined) return undefined;\n      value = value[k];\n    }\n\n    return value;\n  }\n\n  getAll() {\n    return this.config;\n  }\n\n  isProduction() {\n    return this.env === 'production';\n  }\n\n  isDevelopment() {\n    return this.env === 'development';\n  }\n\n  isStaging() {\n    return this.env === 'staging';\n  }\n}\n\nmodule.exports = new ConfigLoader();\n```\n\n### Step 4: Environment-Aware Client Factory\n\n```javascript\n\u002F\u002F services\u002Fevernote-factory.js\nconst Evernote = require('evernote');\nconst config = require('..\u002Fconfig');\n\nclass EvernoteClientFactory {\n  static createOAuthClient() {\n    return new Evernote.Client({\n      consumerKey: config.get('evernote.consumerKey'),\n      consumerSecret: config.get('evernote.consumerSecret'),\n      sandbox: config.get('evernote.sandbox'),\n      china: false\n    });\n  }\n\n  static createAuthenticatedClient(accessToken) {\n    return new Evernote.Client({\n      token: accessToken,\n      sandbox: config.get('evernote.sandbox')\n    });\n  }\n\n  static getEnvironmentInfo() {\n    return {\n      environment: process.env.NODE_ENV,\n      sandbox: config.get('evernote.sandbox'),\n      serviceHost: config.get('evernote.sandbox')\n        ? 'sandbox.evernote.com'\n        : 'www.evernote.com'\n    };\n  }\n\n  static validateEnvironment() {\n    const errors = [];\n\n    if (!config.get('evernote.consumerKey')) {\n      errors.push('Missing EVERNOTE_CONSUMER_KEY');\n    }\n\n    if (!config.get('evernote.consumerSecret')) {\n      errors.push('Missing EVERNOTE_CONSUMER_SECRET');\n    }\n\n    if (config.isProduction() && config.get('evernote.sandbox')) {\n      errors.push('Production environment cannot use sandbox mode');\n    }\n\n    return {\n      valid: errors.length === 0,\n      errors\n    };\n  }\n}\n\nmodule.exports = EvernoteClientFactory;\n```\n\n### Step 5: Docker Compose for Local Development\n\n```yaml\n# docker-compose.yml\nversion: '3.8'\n\nservices:\n  app:\n    build:\n      context: .\n      dockerfile: Dockerfile.dev\n    volumes:\n      - .:\u002Fapp\n      - \u002Fapp\u002Fnode_modules\n    ports:\n      - \"3000:3000\"\n    environment:\n      - NODE_ENV=development\n    env_file:\n      - .env.development\n    depends_on:\n      - postgres\n      - redis\n\n  postgres:\n    image: postgres:15-alpine\n    volumes:\n      - postgres_data:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\n    environment:\n      POSTGRES_DB: evernote_dev\n      POSTGRES_USER: postgres\n      POSTGRES_PASSWORD: postgres\n    ports:\n      - \"5432:5432\"\n\n  redis:\n    image: redis:7-alpine\n    ports:\n      - \"6379:6379\"\n\nvolumes:\n  postgres_data:\n```\n\n### Step 6: Environment-Specific Middleware\n\n```javascript\n\u002F\u002F middleware\u002Fenvironment.js\nconst config = require('..\u002Fconfig');\n\nfunction environmentMiddleware(req, res, next) {\n  \u002F\u002F Add environment info to request\n  req.environment = {\n    name: process.env.NODE_ENV,\n    sandbox: config.get('evernote.sandbox'),\n    isProduction: config.isProduction()\n  };\n\n  \u002F\u002F Development-only features\n  if (config.isDevelopment()) {\n    \u002F\u002F Add debug headers\n    res.setHeader('X-Environment', 'development');\n    res.setHeader('X-Evernote-Mode', 'sandbox');\n  }\n\n  \u002F\u002F Production safety checks\n  if (config.isProduction()) {\n    \u002F\u002F Ensure HTTPS\n    if (req.protocol !== 'https') {\n      return res.redirect(301, `https:\u002F\u002F${req.hostname}${req.url}`);\n    }\n  }\n\n  next();\n}\n\nfunction requireProduction(req, res, next) {\n  if (!config.isProduction()) {\n    return res.status(403).json({\n      error: 'This endpoint is only available in production'\n    });\n  }\n  next();\n}\n\nfunction blockInProduction(req, res, next) {\n  if (config.isProduction()) {\n    return res.status(403).json({\n      error: 'This endpoint is not available in production'\n    });\n  }\n  next();\n}\n\nmodule.exports = {\n  environmentMiddleware,\n  requireProduction,\n  blockInProduction\n};\n```\n\n### Step 7: CI\u002FCD Environment Configuration\n\n```yaml\n# .github\u002Fworkflows\u002Fdeploy.yml\nname: Deploy\n\non:\n  push:\n    branches: [main, develop]\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n          - branch: develop\n            environment: staging\n            evernote_sandbox: 'true'\n          - branch: main\n            environment: production\n            evernote_sandbox: 'false'\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Set environment\n        if: github.ref == format('refs\u002Fheads\u002F{0}', matrix.branch)\n        run: echo \"DEPLOY_ENV=${{ matrix.environment }}\" >> $GITHUB_ENV\n\n      - name: Deploy to ${{ matrix.environment }}\n        if: env.DEPLOY_ENV != ''\n        uses: .\u002F.github\u002Factions\u002Fdeploy\n        with:\n          environment: ${{ matrix.environment }}\n        env:\n          EVERNOTE_CONSUMER_KEY: ${{ secrets[format('EVERNOTE_CONSUMER_KEY_{0}', matrix.environment)] }}\n          EVERNOTE_CONSUMER_SECRET: ${{ secrets[format('EVERNOTE_CONSUMER_SECRET_{0}', matrix.environment)] }}\n          EVERNOTE_SANDBOX: ${{ matrix.evernote_sandbox }}\n```\n\n### Step 8: Environment Health Check\n\n```javascript\n\u002F\u002F routes\u002Fhealth.js\nconst config = require('..\u002Fconfig');\nconst EvernoteClientFactory = require('..\u002Fservices\u002Fevernote-factory');\n\nrouter.get('\u002Fhealth\u002Fenvironment', async (req, res) => {\n  const envInfo = EvernoteClientFactory.getEnvironmentInfo();\n  const validation = EvernoteClientFactory.validateEnvironment();\n\n  res.json({\n    status: validation.valid ? 'ok' : 'error',\n    environment: {\n      ...envInfo,\n      nodeEnv: process.env.NODE_ENV,\n      version: process.env.APP_VERSION || 'unknown'\n    },\n    validation,\n    checks: {\n      database: await checkDatabase(),\n      redis: await checkRedis(),\n      evernote: await checkEvernoteConnectivity()\n    }\n  });\n});\n\nasync function checkEvernoteConnectivity() {\n  try {\n    \u002F\u002F Simple connectivity check - doesn't require auth\n    const https = require('https');\n    const host = config.get('evernote.sandbox')\n      ? 'sandbox.evernote.com'\n      : 'www.evernote.com';\n\n    return new Promise((resolve) => {\n      const req = https.get(`https:\u002F\u002F${host}`, { timeout: 5000 }, (res) => {\n        resolve({ status: 'ok', host });\n      });\n\n      req.on('error', () => {\n        resolve({ status: 'error', host, message: 'Connection failed' });\n      });\n\n      req.on('timeout', () => {\n        req.destroy();\n        resolve({ status: 'error', host, message: 'Timeout' });\n      });\n    });\n  } catch (error) {\n    return { status: 'error', message: error.message };\n  }\n}\n```\n\n## Output\n\n- Environment-specific configuration files\n- Configuration loader with environment variable support\n- Environment-aware client factory\n- Docker Compose for local development\n- CI\u002FCD environment configuration\n- Health check endpoints\n\n## Environment Checklist\n\n```markdown\n## Per-Environment Checklist\n\n### Development\n- [ ] Sandbox credentials configured\n- [ ] Local database running\n- [ ] Redis cache running\n- [ ] Debug logging enabled\n\n### Staging\n- [ ] Sandbox credentials (separate from dev)\n- [ ] Staging database provisioned\n- [ ] Staging Redis provisioned\n- [ ] Monitoring configured\n\n### Production\n- [ ] Production API key approved\n- [ ] Secrets in secure storage\n- [ ] Production database provisioned\n- [ ] Production Redis provisioned\n- [ ] Monitoring and alerting\n- [ ] Backup procedures\n```\n\n## Resources\n\n- [12 Factor App - Config](https:\u002F\u002F12factor.net\u002Fconfig)\n- [Evernote Sandbox](https:\u002F\u002Fsandbox.evernote.com)\n- [Docker Compose](https:\u002F\u002Fdocs.docker.com\u002Fcompose\u002F)\n\n## Next Steps\n\nFor observability setup, see `evernote-observability`.\n",{"name":5,"author":53,"license":15,"version":54,"description":55,"allowed-tools":56},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Configure multi-environment setup for Evernote integrations.\nUse when setting up dev, staging, and production environments,\nor managing environment-specific configurations.\nTrigger with phrases like \"evernote environments\", \"evernote staging\",\n\"evernote dev setup\", \"multiple environments evernote\".\n","Read, Write, Edit, Bash(npm:*), Grep","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fevernote-pack\u002Fskills\u002Fevernote-multi-env-setup",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill evernote-multi-env-setup",{"tool":72,"command":73},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill evernote-multi-env-setup",{"tool":75,"command":76},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill evernote-multi-env-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fevernote-pack\u002Fskills\u002Fevernote-multi-env-setup\u002FSKILL.md",true,[],[81,113,146,169,195,221],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":92,"publishedAt":112},"01M6FCR7G5A005P364Z6ZWCJDP","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FSKILL.md",[89],{"categoryNo":90,"categoryName":91,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",[93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"theme factory","factory","theme","docs","toolkit","generate","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","with","you","fonts","2026-11-11 15:11:14",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":123,"publishedAt":48},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[120],{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[124,125,99,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,39,104,141,142,143,27,32,144,145],"web artifacts builder","web","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tools","Tailwind","single-file","simple","ui components","jsx","suite",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":150,"sourceHtmlUrl":151,"categories":152,"keywords":157,"publishedAt":48},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[153,156],{"categoryNo":154,"categoryName":155,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},[158,159,160,128,161,162,125,163,97,164,138,165,166,167,168,109,32],"testing","webapp testing","webapp","screenshots","playwright","debugging","browser","logs","applications","behavior","local",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":173,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":48},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[177,178,179,180,181,182,183,184,39,185,186,187,188,189,190,191,109,192,193,194,32,30],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":199,"sourceHtmlUrl":200,"categories":201,"keywords":205,"publishedAt":48},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[202],{"categoryNo":203,"categoryName":204,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[206,207,208,209,210,211,212,213,44,214,215,216,217,218,109,32,219,30,220],"skill creator","creator","workflows","create","update","capabilities","knowledge","tool","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":222,"name":223,"nameZh":6,"description":224,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":225,"sourceHtmlUrl":226,"categories":227,"keywords":229,"publishedAt":48},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[228],{"categoryNo":203,"categoryName":204,"taxonomyType":21,"taxonomyTypeDesc":22},[223,230,231,232,233,234,235,164,236,237,39,238,239,240,241,32,242],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source"]