Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Advanced rate limiting with tiered controls and quota management
Advanced rate limiting with tiered controls and quota management
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
Advanced rate limiting with multiple tiers and quota management.
class RateLimiter { constructor(options = {}) { this.tiers = options.tiers || { free: { requests: 10, window: 60000 }, // 10 req/min basic: { requests: 100, window: 60000 }, pro: { requests: 1000, window: 60000 } }; this.requests = new Map(); } checkLimit(userId, tier = 'free') { const tierConfig = this.tiers[tier]; if (!tierConfig) { return { allowed: false, reason: 'invalid_tier' }; } const now = Date.now(); const userRequests = this.requests.get(userId) || []; // Remove old requests outside window const validRequests = userRequests.filter( timestamp => now - timestamp < tierConfig.window ); // Check if under limit if (validRequests.length >= tierConfig.requests) { const oldestRequest = validRequests[0]; const resetIn = tierConfig.window - (now - oldestRequest); return { allowed: false, reason: 'rate_limit_exceeded', limit: tierConfig.requests, remaining: 0, resetIn: Math.ceil(resetIn / 1000) }; } // Add current request validRequests.push(now); this.requests.set(userId, validRequests); return { allowed: true, limit: tierConfig.requests, remaining: tierConfig.requests - validRequests.length, resetIn: Math.ceil(tierConfig.window / 1000) }; } resetUser(userId) { this.requests.delete(userId); } getStats(userId) { const userRequests = this.requests.get(userId) || []; return { totalRequests: userRequests.length, oldestRequest: userRequests[0] || null, newestRequest: userRequests[userRequests.length - 1] || null }; } } // Export for OpenClaw module.exports = { RateLimiter };
const limiter = new skills.rateLimitPro.RateLimiter({ tiers: { free: { requests: 10, window: 60000 }, pro: { requests: 1000, window: 60000 } } }); const result = limiter.checkLimit('user123', 'free'); if (result.allowed) { // Process request } else { console.log(`Rate limit exceeded. Reset in ${result.resetIn}s`); }
{ "tiers": { "free": { "requests": 10, "window": 60000 }, "basic": { "requests": 100, "window": 60000 }, "pro": { "requests": 1000, "window": 60000 } } }
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.