Agent skill
hex-performance-tuning
Optimize Hex API performance with caching, batching, and connection pooling. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Hex integrations. Trigger with phrases like "hex performance", "optimize hex", "hex latency", "hex caching", "hex slow", "hex batch".
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-performance-tuning
SKILL.md
Hex Performance Tuning
Latency Benchmarks
| Operation | Typical Duration |
|---|---|
| ListProjects | 200-500ms |
| RunProject (trigger) | 500ms-2s |
| Project execution | 10s-30min (depends on queries) |
| GetRunStatus (poll) | 100-300ms |
Instructions
Cache Project Lists
import { LRUCache } from 'lru-cache';
const projectCache = new LRUCache<string, any>({ max: 50, ttl: 300000 }); // 5 min
async function getCachedProjects(client: HexClient) {
const cached = projectCache.get('projects');
if (cached) return cached;
const projects = await client.listProjects();
projectCache.set('projects', projects);
return projects;
}
Parallel Independent Runs
// Run independent projects in parallel (respecting rate limits)
async function parallelRuns(client: HexClient, configs: Array<{ id: string; params: any }>) {
return Promise.allSettled(
configs.map(c => runWithRetry(client, c.id, c.params))
);
}
Optimize Poll Interval
// Adaptive polling: start fast, slow down
async function adaptivePoll(client: HexClient, projectId: string, runId: string) {
let interval = 2000; // Start at 2s
while (true) {
const status = await client.getRunStatus(projectId, runId);
if (['COMPLETED', 'ERRORED', 'KILLED'].includes(status.status)) return status;
await new Promise(r => setTimeout(r, interval));
interval = Math.min(interval * 1.5, 30000); // Max 30s
}
}
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?