[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F6GR24T65H5C7X33SYTJX2":3,"skill-same:01M6F6GR24T65H5C7X33SYTJX2":73},{"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":18,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6F6GR24T65H5C7X33SYTJX2","evernote-rate-limits",null,"Handle Evernote API rate limits effectively.\nUse when implementing rate limit handling, optimizing API usage,\nor troubleshooting rate limit errors.\nTrigger with phrases like \"evernote rate limit\", \"evernote throttling\",\n\"api quota evernote\", \"rate limit exceeded\".","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-rate-limits\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"limits","rate","evernote","evernote rate limits","with","when","api rate","implementing","limit","usage","errors","throttling","trigger","io","quota","use","edit","write","read","grep","troubleshooting","api","2026-11-10 10:12:30",false,"---\nname: evernote-rate-limits\ndescription: |\n  Handle Evernote API rate limits effectively.\n  Use when implementing rate limit handling, optimizing API usage,\n  or troubleshooting rate limit errors.\n  Trigger with phrases like \"evernote rate limit\", \"evernote throttling\",\n  \"api quota evernote\", \"rate limit exceeded\".\nallowed-tools: Read, Write, Edit, Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Evernote Rate Limits\n\n## Overview\n\nEvernote enforces rate limits per API key, per user, per hour. Understanding and handling these limits is essential for production integrations.\n\n## Prerequisites\n\n- Evernote SDK setup\n- Understanding of async\u002Fawait patterns\n- Error handling implementation\n\n## Rate Limit Structure\n\n| Scope | Limit Window | Error |\n|-------|--------------|-------|\n| Per API key | 1 hour | EDAMSystemException |\n| Per user | 1 hour | EDAMSystemException |\n| Combined | Per key + per user | RATE_LIMIT_REACHED |\n\n**Key points:**\n- Limits are NOT publicly documented (intentionally)\n- Hitting the limit returns `rateLimitDuration` (seconds to wait)\n- Limits are generally generous for normal usage\n- Initial sync boost available (24 hours, must be requested)\n\n## Instructions\n\n### Step 1: Rate Limit Handler\n\n```javascript\n\u002F\u002F utils\u002Frate-limiter.js\n\nclass RateLimitHandler {\n  constructor(options = {}) {\n    this.maxRetries = options.maxRetries || 3;\n    this.onRateLimit = options.onRateLimit || (() => {});\n    this.requestQueue = [];\n    this.isProcessing = false;\n    this.minDelay = options.minDelay || 100; \u002F\u002F ms between requests\n  }\n\n  \u002F**\n   * Execute operation with rate limit handling\n   *\u002F\n  async execute(operation) {\n    for (let attempt = 0; attempt \u003C this.maxRetries; attempt++) {\n      try {\n        return await operation();\n      } catch (error) {\n        if (this.isRateLimitError(error)) {\n          const waitTime = error.rateLimitDuration * 1000;\n\n          this.onRateLimit({\n            attempt: attempt + 1,\n            waitTime,\n            willRetry: attempt \u003C this.maxRetries - 1\n          });\n\n          if (attempt \u003C this.maxRetries - 1) {\n            console.log(`Rate limited. Waiting ${error.rateLimitDuration}s...`);\n            await this.sleep(waitTime);\n            continue;\n          }\n        }\n        throw error;\n      }\n    }\n  }\n\n  \u002F**\n   * Queue operations to prevent bursts\n   *\u002F\n  async enqueue(operation) {\n    return new Promise((resolve, reject) => {\n      this.requestQueue.push({ operation, resolve, reject });\n      this.processQueue();\n    });\n  }\n\n  async processQueue() {\n    if (this.isProcessing || this.requestQueue.length === 0) {\n      return;\n    }\n\n    this.isProcessing = true;\n\n    while (this.requestQueue.length > 0) {\n      const { operation, resolve, reject } = this.requestQueue.shift();\n\n      try {\n        const result = await this.execute(operation);\n        resolve(result);\n      } catch (error) {\n        reject(error);\n      }\n\n      \u002F\u002F Minimum delay between requests\n      if (this.requestQueue.length > 0) {\n        await this.sleep(this.minDelay);\n      }\n    }\n\n    this.isProcessing = false;\n  }\n\n  isRateLimitError(error) {\n    return error.errorCode === 19 && error.rateLimitDuration !== undefined;\n  }\n\n  sleep(ms) {\n    return new Promise(resolve => setTimeout(resolve, ms));\n  }\n}\n\nmodule.exports = RateLimitHandler;\n```\n\n### Step 2: Rate-Limited Client Wrapper\n\n```javascript\n\u002F\u002F services\u002Frate-limited-client.js\nconst Evernote = require('evernote');\nconst RateLimitHandler = require('..\u002Futils\u002Frate-limiter');\n\nclass RateLimitedEvernoteClient {\n  constructor(accessToken, options = {}) {\n    this.client = new Evernote.Client({\n      token: accessToken,\n      sandbox: options.sandbox || false\n    });\n\n    this.rateLimiter = new RateLimitHandler({\n      maxRetries: options.maxRetries || 3,\n      minDelay: options.minDelay || 100,\n      onRateLimit: (info) => {\n        console.log(`[Rate Limit] Attempt ${info.attempt}, wait ${info.waitTime}ms`);\n        if (options.onRateLimit) {\n          options.onRateLimit(info);\n        }\n      }\n    });\n\n    this._noteStore = null;\n  }\n\n  get noteStore() {\n    if (!this._noteStore) {\n      const originalStore = this.client.getNoteStore();\n      this._noteStore = this.wrapWithRateLimiting(originalStore);\n    }\n    return this._noteStore;\n  }\n\n  wrapWithRateLimiting(store) {\n    const rateLimiter = this.rateLimiter;\n\n    return new Proxy(store, {\n      get(target, prop) {\n        const original = target[prop];\n\n        if (typeof original !== 'function') {\n          return original;\n        }\n\n        return (...args) => {\n          return rateLimiter.enqueue(() => original.apply(target, args));\n        };\n      }\n    });\n  }\n}\n\nmodule.exports = RateLimitedEvernoteClient;\n```\n\n### Step 3: Batch Operations with Rate Limiting\n\n```javascript\n\u002F\u002F utils\u002Fbatch-processor.js\n\nclass BatchProcessor {\n  constructor(rateLimiter, options = {}) {\n    this.rateLimiter = rateLimiter;\n    this.batchSize = options.batchSize || 10;\n    this.delayBetweenBatches = options.delayBetweenBatches || 1000;\n    this.onProgress = options.onProgress || (() => {});\n  }\n\n  \u002F**\n   * Process items in rate-limited batches\n   *\u002F\n  async processBatch(items, operation) {\n    const results = [];\n    const total = items.length;\n    let processed = 0;\n\n    \u002F\u002F Split into batches\n    const batches = this.chunkArray(items, this.batchSize);\n\n    for (const batch of batches) {\n      const batchResults = await Promise.all(\n        batch.map(item =>\n          this.rateLimiter.enqueue(async () => {\n            try {\n              const result = await operation(item);\n              return { success: true, item, result };\n            } catch (error) {\n              return { success: false, item, error: error.message };\n            }\n          })\n        )\n      );\n\n      results.push(...batchResults);\n      processed += batch.length;\n\n      this.onProgress({\n        processed,\n        total,\n        percentage: Math.round((processed \u002F total) * 100)\n      });\n\n      \u002F\u002F Delay between batches\n      if (processed \u003C total) {\n        await this.sleep(this.delayBetweenBatches);\n      }\n    }\n\n    return {\n      total: results.length,\n      successful: results.filter(r => r.success).length,\n      failed: results.filter(r => !r.success).length,\n      results\n    };\n  }\n\n  chunkArray(array, size) {\n    const chunks = [];\n    for (let i = 0; i \u003C array.length; i += size) {\n      chunks.push(array.slice(i, i + size));\n    }\n    return chunks;\n  }\n\n  sleep(ms) {\n    return new Promise(resolve => setTimeout(resolve, ms));\n  }\n}\n\nmodule.exports = BatchProcessor;\n```\n\n### Step 4: Avoiding Rate Limits\n\n```javascript\n\u002F\u002F Best practices to minimize rate limit hits\n\nclass EvernoteOptimizer {\n  constructor(noteStore) {\n    this.noteStore = noteStore;\n    this.notebookCache = null;\n    this.tagCache = null;\n    this.cacheExpiry = 5 * 60 * 1000; \u002F\u002F 5 minutes\n  }\n\n  \u002F**\n   * BAD: Multiple calls for same data\n   *\u002F\n  async badPattern() {\n    const notebooks = await this.noteStore.listNotebooks(); \u002F\u002F Call 1\n    const notebooks2 = await this.noteStore.listNotebooks(); \u002F\u002F Call 2 (wasteful)\n  }\n\n  \u002F**\n   * GOOD: Cache frequently accessed data\n   *\u002F\n  async getNotebooks(forceRefresh = false) {\n    if (!forceRefresh && this.notebookCache && Date.now() \u003C this.notebookCacheExpiry) {\n      return this.notebookCache;\n    }\n\n    this.notebookCache = await this.noteStore.listNotebooks();\n    this.notebookCacheExpiry = Date.now() + this.cacheExpiry;\n    return this.notebookCache;\n  }\n\n  \u002F**\n   * BAD: Getting full note when only metadata needed\n   *\u002F\n  async badGetNote(guid) {\n    return this.noteStore.getNote(guid, true, true, true, true); \u002F\u002F All data\n  }\n\n  \u002F**\n   * GOOD: Only request what you need\n   *\u002F\n  async efficientGetNote(guid, options = {}) {\n    return this.noteStore.getNote(\n      guid,\n      options.withContent || false,\n      options.withResources || false,\n      options.withRecognition || false,\n      options.withAlternateData || false\n    );\n  }\n\n  \u002F**\n   * BAD: Polling for changes\n   *\u002F\n  async badPolling() {\n    while (true) {\n      const state = await this.noteStore.getSyncState();\n      await sleep(1000); \u002F\u002F Constant polling = rate limit suicide\n    }\n  }\n\n  \u002F**\n   * GOOD: Use webhooks + intelligent sync\n   *\u002F\n  async intelligentSync(lastUpdateCount) {\n    const state = await this.noteStore.getSyncState();\n\n    if (state.updateCount === lastUpdateCount) {\n      return { hasChanges: false };\n    }\n\n    \u002F\u002F Only sync if changes detected\n    const chunks = await this.noteStore.getFilteredSyncChunk(\n      lastUpdateCount,\n      100,\n      {\n        includeNotes: true,\n        includeNotebooks: true,\n        includeTags: true\n      }\n    );\n\n    return {\n      hasChanges: true,\n      updateCount: state.updateCount,\n      chunks\n    };\n  }\n\n  \u002F**\n   * BAD: Getting resources individually\n   *\u002F\n  async badResourceFetch(noteGuid) {\n    const note = await this.noteStore.getNote(noteGuid, true, false, false, false);\n    \u002F\u002F Then making separate calls for each resource\n    for (const resource of note.resources || []) {\n      await this.noteStore.getResource(resource.guid, true, false, false, false);\n    }\n  }\n\n  \u002F**\n   * GOOD: Get resources with note\n   *\u002F\n  async efficientResourceFetch(noteGuid) {\n    return this.noteStore.getNote(\n      noteGuid,\n      true,  \u002F\u002F withContent\n      true,  \u002F\u002F withResourcesData - get all resources in one call\n      false, \u002F\u002F withResourcesRecognition\n      false  \u002F\u002F withResourcesAlternateData\n    );\n  }\n}\n```\n\n### Step 5: Rate Limit Monitoring\n\n```javascript\n\u002F\u002F utils\u002Frate-monitor.js\n\nclass RateLimitMonitor {\n  constructor() {\n    this.history = [];\n    this.windowSize = 60 * 60 * 1000; \u002F\u002F 1 hour\n  }\n\n  recordRequest() {\n    const now = Date.now();\n    this.history.push(now);\n    this.pruneOldEntries(now);\n  }\n\n  recordRateLimit(rateLimitDuration) {\n    this.history.push({\n      timestamp: Date.now(),\n      rateLimited: true,\n      duration: rateLimitDuration\n    });\n  }\n\n  pruneOldEntries(now) {\n    const cutoff = now - this.windowSize;\n    this.history = this.history.filter(entry => {\n      const timestamp = typeof entry === 'number' ? entry : entry.timestamp;\n      return timestamp > cutoff;\n    });\n  }\n\n  getStats() {\n    const now = Date.now();\n    this.pruneOldEntries(now);\n\n    const requests = this.history.filter(e => typeof e === 'number');\n    const rateLimits = this.history.filter(e => e.rateLimited);\n\n    return {\n      requestsInLastHour: requests.length,\n      rateLimitsHit: rateLimits.length,\n      averageRequestsPerMinute: (requests.length \u002F 60).toFixed(2),\n      lastRateLimit: rateLimits.length > 0 ?\n        new Date(rateLimits[rateLimits.length - 1].timestamp) : null\n    };\n  }\n\n  shouldThrottle() {\n    const stats = this.getStats();\n    \u002F\u002F Conservative threshold - throttle if approaching limits\n    return stats.requestsInLastHour > 500 || stats.rateLimitsHit > 0;\n  }\n}\n\nmodule.exports = RateLimitMonitor;\n```\n\n### Step 6: Usage Example\n\n```javascript\n\u002F\u002F example.js\nconst RateLimitedEvernoteClient = require('.\u002Fservices\u002Frate-limited-client');\nconst BatchProcessor = require('.\u002Futils\u002Fbatch-processor');\nconst RateLimitMonitor = require('.\u002Futils\u002Frate-monitor');\n\nasync function main() {\n  const monitor = new RateLimitMonitor();\n\n  const client = new RateLimitedEvernoteClient(\n    process.env.EVERNOTE_ACCESS_TOKEN,\n    {\n      sandbox: true,\n      maxRetries: 3,\n      minDelay: 200,\n      onRateLimit: (info) => {\n        monitor.recordRateLimit(info.waitTime \u002F 1000);\n        console.log('Rate limit stats:', monitor.getStats());\n      }\n    }\n  );\n\n  const noteStore = client.noteStore;\n\n  \u002F\u002F All operations are automatically rate-limited\n  const notebooks = await noteStore.listNotebooks();\n  console.log('Notebooks:', notebooks.length);\n\n  \u002F\u002F Batch process with progress\n  const processor = new BatchProcessor(client.rateLimiter, {\n    batchSize: 5,\n    delayBetweenBatches: 500,\n    onProgress: (progress) => {\n      console.log(`Progress: ${progress.percentage}%`);\n    }\n  });\n\n  \u002F\u002F Example: Process multiple notes\n  const noteGuids = ['guid1', 'guid2', 'guid3'];\n  const results = await processor.processBatch(\n    noteGuids,\n    guid => noteStore.getNote(guid, false, false, false, false)\n  );\n\n  console.log('Batch results:', results);\n  console.log('Final stats:', monitor.getStats());\n}\n\nmain().catch(console.error);\n```\n\n## Output\n\n- Automatic retry with exponential backoff\n- Request queuing to prevent bursts\n- Batch processing with progress tracking\n- Rate limit monitoring and statistics\n- Optimized API usage patterns\n\n## Best Practices Summary\n\n| Do | Don't |\n|----|-------|\n| Cache frequently accessed data | Make duplicate API calls |\n| Request only needed data | Use withResourcesData when not needed |\n| Use webhooks for change detection | Poll getSyncState repeatedly |\n| Batch operations with delays | Fire many requests simultaneously |\n| Handle rateLimitDuration | Retry immediately after rate limit |\n\n## Error Handling\n\n| Scenario | Response |\n|----------|----------|\n| First rate limit | Wait rateLimitDuration, retry |\n| Repeated rate limits | Increase base delay, reduce batch size |\n| Rate limit + other error | Handle other error first |\n| Rate limit on initial sync | Request rate limit boost |\n\n## Resources\n\n- [Rate Limits Overview](https:\u002F\u002Fdev.evernote.com\u002Fdoc\u002Farticles\u002Frate_limits.php)\n- [Best Practices](https:\u002F\u002Fdev.evernote.com\u002Fdoc\u002Farticles\u002Frate_limits_best_practices.php)\n- [Webhooks](https:\u002F\u002Fdev.evernote.com\u002Fdoc\u002Farticles\u002Fwebhooks.php)\n\n## Next Steps\n\nFor security considerations, see `evernote-security-basics`.\n","# Evernote Rate Limits\n\n## Overview\n\nEvernote enforces rate limits per API key, per user, per hour. Understanding and handling these limits is essential for production integrations.\n\n## Prerequisites\n\n- Evernote SDK setup\n- Understanding of async\u002Fawait patterns\n- Error handling implementation\n\n## Rate Limit Structure\n\n| Scope | Limit Window | Error |\n|-------|--------------|-------|\n| Per API key | 1 hour | EDAMSystemException |\n| Per user | 1 hour | EDAMSystemException |\n| Combined | Per key + per user | RATE_LIMIT_REACHED |\n\n**Key points:**\n- Limits are NOT publicly documented (intentionally)\n- Hitting the limit returns `rateLimitDuration` (seconds to wait)\n- Limits are generally generous for normal usage\n- Initial sync boost available (24 hours, must be requested)\n\n## Instructions\n\n### Step 1: Rate Limit Handler\n\n```javascript\n\u002F\u002F utils\u002Frate-limiter.js\n\nclass RateLimitHandler {\n  constructor(options = {}) {\n    this.maxRetries = options.maxRetries || 3;\n    this.onRateLimit = options.onRateLimit || (() => {});\n    this.requestQueue = [];\n    this.isProcessing = false;\n    this.minDelay = options.minDelay || 100; \u002F\u002F ms between requests\n  }\n\n  \u002F**\n   * Execute operation with rate limit handling\n   *\u002F\n  async execute(operation) {\n    for (let attempt = 0; attempt \u003C this.maxRetries; attempt++) {\n      try {\n        return await operation();\n      } catch (error) {\n        if (this.isRateLimitError(error)) {\n          const waitTime = error.rateLimitDuration * 1000;\n\n          this.onRateLimit({\n            attempt: attempt + 1,\n            waitTime,\n            willRetry: attempt \u003C this.maxRetries - 1\n          });\n\n          if (attempt \u003C this.maxRetries - 1) {\n            console.log(`Rate limited. Waiting ${error.rateLimitDuration}s...`);\n            await this.sleep(waitTime);\n            continue;\n          }\n        }\n        throw error;\n      }\n    }\n  }\n\n  \u002F**\n   * Queue operations to prevent bursts\n   *\u002F\n  async enqueue(operation) {\n    return new Promise((resolve, reject) => {\n      this.requestQueue.push({ operation, resolve, reject });\n      this.processQueue();\n    });\n  }\n\n  async processQueue() {\n    if (this.isProcessing || this.requestQueue.length === 0) {\n      return;\n    }\n\n    this.isProcessing = true;\n\n    while (this.requestQueue.length > 0) {\n      const { operation, resolve, reject } = this.requestQueue.shift();\n\n      try {\n        const result = await this.execute(operation);\n        resolve(result);\n      } catch (error) {\n        reject(error);\n      }\n\n      \u002F\u002F Minimum delay between requests\n      if (this.requestQueue.length > 0) {\n        await this.sleep(this.minDelay);\n      }\n    }\n\n    this.isProcessing = false;\n  }\n\n  isRateLimitError(error) {\n    return error.errorCode === 19 && error.rateLimitDuration !== undefined;\n  }\n\n  sleep(ms) {\n    return new Promise(resolve => setTimeout(resolve, ms));\n  }\n}\n\nmodule.exports = RateLimitHandler;\n```\n\n### Step 2: Rate-Limited Client Wrapper\n\n```javascript\n\u002F\u002F services\u002Frate-limited-client.js\nconst Evernote = require('evernote');\nconst RateLimitHandler = require('..\u002Futils\u002Frate-limiter');\n\nclass RateLimitedEvernoteClient {\n  constructor(accessToken, options = {}) {\n    this.client = new Evernote.Client({\n      token: accessToken,\n      sandbox: options.sandbox || false\n    });\n\n    this.rateLimiter = new RateLimitHandler({\n      maxRetries: options.maxRetries || 3,\n      minDelay: options.minDelay || 100,\n      onRateLimit: (info) => {\n        console.log(`[Rate Limit] Attempt ${info.attempt}, wait ${info.waitTime}ms`);\n        if (options.onRateLimit) {\n          options.onRateLimit(info);\n        }\n      }\n    });\n\n    this._noteStore = null;\n  }\n\n  get noteStore() {\n    if (!this._noteStore) {\n      const originalStore = this.client.getNoteStore();\n      this._noteStore = this.wrapWithRateLimiting(originalStore);\n    }\n    return this._noteStore;\n  }\n\n  wrapWithRateLimiting(store) {\n    const rateLimiter = this.rateLimiter;\n\n    return new Proxy(store, {\n      get(target, prop) {\n        const original = target[prop];\n\n        if (typeof original !== 'function') {\n          return original;\n        }\n\n        return (...args) => {\n          return rateLimiter.enqueue(() => original.apply(target, args));\n        };\n      }\n    });\n  }\n}\n\nmodule.exports = RateLimitedEvernoteClient;\n```\n\n### Step 3: Batch Operations with Rate Limiting\n\n```javascript\n\u002F\u002F utils\u002Fbatch-processor.js\n\nclass BatchProcessor {\n  constructor(rateLimiter, options = {}) {\n    this.rateLimiter = rateLimiter;\n    this.batchSize = options.batchSize || 10;\n    this.delayBetweenBatches = options.delayBetweenBatches || 1000;\n    this.onProgress = options.onProgress || (() => {});\n  }\n\n  \u002F**\n   * Process items in rate-limited batches\n   *\u002F\n  async processBatch(items, operation) {\n    const results = [];\n    const total = items.length;\n    let processed = 0;\n\n    \u002F\u002F Split into batches\n    const batches = this.chunkArray(items, this.batchSize);\n\n    for (const batch of batches) {\n      const batchResults = await Promise.all(\n        batch.map(item =>\n          this.rateLimiter.enqueue(async () => {\n            try {\n              const result = await operation(item);\n              return { success: true, item, result };\n            } catch (error) {\n              return { success: false, item, error: error.message };\n            }\n          })\n        )\n      );\n\n      results.push(...batchResults);\n      processed += batch.length;\n\n      this.onProgress({\n        processed,\n        total,\n        percentage: Math.round((processed \u002F total) * 100)\n      });\n\n      \u002F\u002F Delay between batches\n      if (processed \u003C total) {\n        await this.sleep(this.delayBetweenBatches);\n      }\n    }\n\n    return {\n      total: results.length,\n      successful: results.filter(r => r.success).length,\n      failed: results.filter(r => !r.success).length,\n      results\n    };\n  }\n\n  chunkArray(array, size) {\n    const chunks = [];\n    for (let i = 0; i \u003C array.length; i += size) {\n      chunks.push(array.slice(i, i + size));\n    }\n    return chunks;\n  }\n\n  sleep(ms) {\n    return new Promise(resolve => setTimeout(resolve, ms));\n  }\n}\n\nmodule.exports = BatchProcessor;\n```\n\n### Step 4: Avoiding Rate Limits\n\n```javascript\n\u002F\u002F Best practices to minimize rate limit hits\n\nclass EvernoteOptimizer {\n  constructor(noteStore) {\n    this.noteStore = noteStore;\n    this.notebookCache = null;\n    this.tagCache = null;\n    this.cacheExpiry = 5 * 60 * 1000; \u002F\u002F 5 minutes\n  }\n\n  \u002F**\n   * BAD: Multiple calls for same data\n   *\u002F\n  async badPattern() {\n    const notebooks = await this.noteStore.listNotebooks(); \u002F\u002F Call 1\n    const notebooks2 = await this.noteStore.listNotebooks(); \u002F\u002F Call 2 (wasteful)\n  }\n\n  \u002F**\n   * GOOD: Cache frequently accessed data\n   *\u002F\n  async getNotebooks(forceRefresh = false) {\n    if (!forceRefresh && this.notebookCache && Date.now() \u003C this.notebookCacheExpiry) {\n      return this.notebookCache;\n    }\n\n    this.notebookCache = await this.noteStore.listNotebooks();\n    this.notebookCacheExpiry = Date.now() + this.cacheExpiry;\n    return this.notebookCache;\n  }\n\n  \u002F**\n   * BAD: Getting full note when only metadata needed\n   *\u002F\n  async badGetNote(guid) {\n    return this.noteStore.getNote(guid, true, true, true, true); \u002F\u002F All data\n  }\n\n  \u002F**\n   * GOOD: Only request what you need\n   *\u002F\n  async efficientGetNote(guid, options = {}) {\n    return this.noteStore.getNote(\n      guid,\n      options.withContent || false,\n      options.withResources || false,\n      options.withRecognition || false,\n      options.withAlternateData || false\n    );\n  }\n\n  \u002F**\n   * BAD: Polling for changes\n   *\u002F\n  async badPolling() {\n    while (true) {\n      const state = await this.noteStore.getSyncState();\n      await sleep(1000); \u002F\u002F Constant polling = rate limit suicide\n    }\n  }\n\n  \u002F**\n   * GOOD: Use webhooks + intelligent sync\n   *\u002F\n  async intelligentSync(lastUpdateCount) {\n    const state = await this.noteStore.getSyncState();\n\n    if (state.updateCount === lastUpdateCount) {\n      return { hasChanges: false };\n    }\n\n    \u002F\u002F Only sync if changes detected\n    const chunks = await this.noteStore.getFilteredSyncChunk(\n      lastUpdateCount,\n      100,\n      {\n        includeNotes: true,\n        includeNotebooks: true,\n        includeTags: true\n      }\n    );\n\n    return {\n      hasChanges: true,\n      updateCount: state.updateCount,\n      chunks\n    };\n  }\n\n  \u002F**\n   * BAD: Getting resources individually\n   *\u002F\n  async badResourceFetch(noteGuid) {\n    const note = await this.noteStore.getNote(noteGuid, true, false, false, false);\n    \u002F\u002F Then making separate calls for each resource\n    for (const resource of note.resources || []) {\n      await this.noteStore.getResource(resource.guid, true, false, false, false);\n    }\n  }\n\n  \u002F**\n   * GOOD: Get resources with note\n   *\u002F\n  async efficientResourceFetch(noteGuid) {\n    return this.noteStore.getNote(\n      noteGuid,\n      true,  \u002F\u002F withContent\n      true,  \u002F\u002F withResourcesData - get all resources in one call\n      false, \u002F\u002F withResourcesRecognition\n      false  \u002F\u002F withResourcesAlternateData\n    );\n  }\n}\n```\n\n### Step 5: Rate Limit Monitoring\n\n```javascript\n\u002F\u002F utils\u002Frate-monitor.js\n\nclass RateLimitMonitor {\n  constructor() {\n    this.history = [];\n    this.windowSize = 60 * 60 * 1000; \u002F\u002F 1 hour\n  }\n\n  recordRequest() {\n    const now = Date.now();\n    this.history.push(now);\n    this.pruneOldEntries(now);\n  }\n\n  recordRateLimit(rateLimitDuration) {\n    this.history.push({\n      timestamp: Date.now(),\n      rateLimited: true,\n      duration: rateLimitDuration\n    });\n  }\n\n  pruneOldEntries(now) {\n    const cutoff = now - this.windowSize;\n    this.history = this.history.filter(entry => {\n      const timestamp = typeof entry === 'number' ? entry : entry.timestamp;\n      return timestamp > cutoff;\n    });\n  }\n\n  getStats() {\n    const now = Date.now();\n    this.pruneOldEntries(now);\n\n    const requests = this.history.filter(e => typeof e === 'number');\n    const rateLimits = this.history.filter(e => e.rateLimited);\n\n    return {\n      requestsInLastHour: requests.length,\n      rateLimitsHit: rateLimits.length,\n      averageRequestsPerMinute: (requests.length \u002F 60).toFixed(2),\n      lastRateLimit: rateLimits.length > 0 ?\n        new Date(rateLimits[rateLimits.length - 1].timestamp) : null\n    };\n  }\n\n  shouldThrottle() {\n    const stats = this.getStats();\n    \u002F\u002F Conservative threshold - throttle if approaching limits\n    return stats.requestsInLastHour > 500 || stats.rateLimitsHit > 0;\n  }\n}\n\nmodule.exports = RateLimitMonitor;\n```\n\n### Step 6: Usage Example\n\n```javascript\n\u002F\u002F example.js\nconst RateLimitedEvernoteClient = require('.\u002Fservices\u002Frate-limited-client');\nconst BatchProcessor = require('.\u002Futils\u002Fbatch-processor');\nconst RateLimitMonitor = require('.\u002Futils\u002Frate-monitor');\n\nasync function main() {\n  const monitor = new RateLimitMonitor();\n\n  const client = new RateLimitedEvernoteClient(\n    process.env.EVERNOTE_ACCESS_TOKEN,\n    {\n      sandbox: true,\n      maxRetries: 3,\n      minDelay: 200,\n      onRateLimit: (info) => {\n        monitor.recordRateLimit(info.waitTime \u002F 1000);\n        console.log('Rate limit stats:', monitor.getStats());\n      }\n    }\n  );\n\n  const noteStore = client.noteStore;\n\n  \u002F\u002F All operations are automatically rate-limited\n  const notebooks = await noteStore.listNotebooks();\n  console.log('Notebooks:', notebooks.length);\n\n  \u002F\u002F Batch process with progress\n  const processor = new BatchProcessor(client.rateLimiter, {\n    batchSize: 5,\n    delayBetweenBatches: 500,\n    onProgress: (progress) => {\n      console.log(`Progress: ${progress.percentage}%`);\n    }\n  });\n\n  \u002F\u002F Example: Process multiple notes\n  const noteGuids = ['guid1', 'guid2', 'guid3'];\n  const results = await processor.processBatch(\n    noteGuids,\n    guid => noteStore.getNote(guid, false, false, false, false)\n  );\n\n  console.log('Batch results:', results);\n  console.log('Final stats:', monitor.getStats());\n}\n\nmain().catch(console.error);\n```\n\n## Output\n\n- Automatic retry with exponential backoff\n- Request queuing to prevent bursts\n- Batch processing with progress tracking\n- Rate limit monitoring and statistics\n- Optimized API usage patterns\n\n## Best Practices Summary\n\n| Do | Don't |\n|----|-------|\n| Cache frequently accessed data | Make duplicate API calls |\n| Request only needed data | Use withResourcesData when not needed |\n| Use webhooks for change detection | Poll getSyncState repeatedly |\n| Batch operations with delays | Fire many requests simultaneously |\n| Handle rateLimitDuration | Retry immediately after rate limit |\n\n## Error Handling\n\n| Scenario | Response |\n|----------|----------|\n| First rate limit | Wait rateLimitDuration, retry |\n| Repeated rate limits | Increase base delay, reduce batch size |\n| Rate limit + other error | Handle other error first |\n| Rate limit on initial sync | Request rate limit boost |\n\n## Resources\n\n- [Rate Limits Overview](https:\u002F\u002Fdev.evernote.com\u002Fdoc\u002Farticles\u002Frate_limits.php)\n- [Best Practices](https:\u002F\u002Fdev.evernote.com\u002Fdoc\u002Farticles\u002Frate_limits_best_practices.php)\n- [Webhooks](https:\u002F\u002Fdev.evernote.com\u002Fdoc\u002Farticles\u002Fwebhooks.php)\n\n## Next Steps\n\nFor security considerations, see `evernote-security-basics`.\n",{"name":5,"author":46,"license":15,"version":47,"description":48,"allowed-tools":49},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Handle Evernote API rate limits effectively.\nUse when implementing rate limit handling, optimizing API usage,\nor troubleshooting rate limit errors.\nTrigger with phrases like \"evernote rate limit\", \"evernote throttling\",\n\"api quota evernote\", \"rate limit exceeded\".\n","Read, Write, Edit, Grep","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fevernote-pack\u002Fskills\u002Fevernote-rate-limits",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":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill evernote-rate-limits",{"tool":65,"command":66},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill evernote-rate-limits",{"tool":68,"command":69},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill evernote-rate-limits","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fevernote-pack\u002Fskills\u002Fevernote-rate-limits\u002FSKILL.md",true,[],[74,107,142,165,191,218],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":87,"publishedAt":106},"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",[82],{"categoryNo":83,"categoryName":84,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",[88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,23,104,105],"theme factory","factory","theme","docs","toolkit","generate","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","you","fonts","2026-11-11 15:11:14",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":117,"publishedAt":41},"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",[114],{"categoryNo":115,"categoryName":116,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000009","前端开发",[118,119,94,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,34,99,135,136,137,138,139,140,141],"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","multi","for","jsx","suite",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":146,"sourceHtmlUrl":147,"categories":148,"keywords":153,"publishedAt":41},"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",[149,152],{"categoryNo":150,"categoryName":151,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":115,"categoryName":116,"taxonomyType":85,"taxonomyTypeDesc":86},[154,155,156,122,157,158,119,159,92,160,132,161,162,163,164,23,139],"testing","webapp testing","webapp","screenshots","playwright","debugging","browser","logs","applications","behavior","local",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":169,"sourceHtmlUrl":170,"categories":171,"keywords":172,"publishedAt":41},"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",[],[173,174,175,176,177,178,179,180,34,181,182,183,184,185,186,187,23,188,189,190,139,24],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":195,"sourceHtmlUrl":196,"categories":197,"keywords":201,"publishedAt":41},"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",[198],{"categoryNo":199,"categoryName":200,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000023","Skill与智能体开发",[202,203,204,205,206,207,208,209,210,211,212,213,214,215,23,139,216,24,217],"skill creator","creator","workflows","create","update","capabilities","knowledge","tool","integrations","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":219,"name":220,"nameZh":6,"description":221,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":222,"sourceHtmlUrl":223,"categories":224,"keywords":226,"publishedAt":41},"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",[225],{"categoryNo":199,"categoryName":200,"taxonomyType":85,"taxonomyTypeDesc":86},[220,227,228,229,230,231,232,160,233,234,34,235,236,237,238,139,239],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source"]