Agent skill
hex-rate-limits
Implement Hex rate limiting, backoff, and idempotency patterns. Use when handling rate limit errors, implementing retry logic, or optimizing API request throughput for Hex. Trigger with phrases like "hex rate limit", "hex throttling", "hex 429", "hex retry", "hex backoff".
Install this agent skill to your Project
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/tree/main/plugins/saas-packs/hex-pack/skills/hex-rate-limits
SKILL.md
Hex Rate Limits
Rate Limits
| Endpoint | Per Minute | Per Hour |
|---|---|---|
| RunProject | 20 | 60 |
| GetRunStatus | No hard limit | - |
| ListProjects | No hard limit | - |
| CancelRun | No hard limit | - |
Instructions
Queue-Based Run Triggering
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);
});
}
Backoff on 429
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));
}
}
}
Resources
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
dockerfile-generator
Dockerfile Generator - Auto-activating skill for DevOps Basics. Triggers on: dockerfile generator, dockerfile generator Part of the DevOps Basics skill category.
branch-naming-helper
Branch Naming Helper - Auto-activating skill for DevOps Basics. Triggers on: branch naming helper, branch naming helper Part of the DevOps Basics skill category.
readme-generator
Readme Generator - Auto-activating skill for DevOps Basics. Triggers on: readme generator, readme generator Part of the DevOps Basics skill category.
makefile-generator
Makefile Generator - Auto-activating skill for DevOps Basics. Triggers on: makefile generator, makefile generator Part of the DevOps Basics skill category.
gitignore-generator
Gitignore Generator - Auto-activating skill for DevOps Basics. Triggers on: gitignore generator, gitignore generator Part of the DevOps Basics skill category.
pre-commit-hook-setup
Pre Commit Hook Setup - Auto-activating skill for DevOps Basics. Triggers on: pre commit hook setup, pre commit hook setup Part of the DevOps Basics skill category.
Didn't find tool you were looking for?