From hex-pack
Manages Hex API rate limits with PQueue concurrency queues, exponential backoff on 429s, and idempotency in TypeScript/Node.js.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hex-pack:hex-rate-limitsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
| Endpoint | Per Minute | Per Hour |
| Endpoint | Per Minute | Per Hour |
|---|---|---|
| RunProject | 20 | 60 |
| GetRunStatus | No hard limit | - |
| ListProjects | No hard limit | - |
| CancelRun | No hard limit | - |
import PQueue from 'p-queue';
const hexQueue = new PQueue({
concurrency: 1,
interval: 60000, // Per minute
intervalCap: 15, // Leave buffer (limit is 20)
});
let hourlyCount = 0;
setInterval(() => { hourlyCount = 0; }, 3600000);
async function queuedRun(client: HexClient, projectId: string, params: any) {
if (hourlyCount >= 55) throw new Error('Approaching hourly limit');
return hexQueue.add(async () => {
hourlyCount++;
return client.runProject(projectId, params);
});
}
async function runWithBackoff(client: HexClient, projectId: string, params: any) {
for (let i = 0; i < 3; i++) {
try { return await client.runProject(projectId, params); }
catch (err: any) {
if (!err.message.includes('429')) throw err;
const delay = 30000 * Math.pow(2, i);
console.log(`Rate limited, waiting ${delay / 1000}s`);
await new Promise(r => setTimeout(r, delay));
}
}
}
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin hex-packApplies Hex SDK patterns for TypeScript (retry, polling) and Python (hextoolkit client, Airflow operator) to run data projects reliably.
Implements API rate limiting with sliding windows, token buckets, quotas using Redis and libraries for Node.js, Python/FastAPI, Java. Protects endpoints from excessive requests with headers and 429 responses.
Guides rate limiting implementation using token bucket, sliding window counters, Redis Lua scripts, tiered quotas, middleware, headers, and monitoring to protect APIs from abuse and manage quotas.