Hex performance tuning
425 plugins, 2,810 skills, 200 agents for Claude Code. Open-source marketplace at tonsofskills.com with the ccpi CLI package manager.
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill hex-performance-tuningAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
'Optimize Hex API performance with caching, batching, and connection pooling.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.1 KB, as published. Nobody here has run it
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
}
}