From juicebox-pack
Optimizes Juicebox API performance with caching, batch enrichment, rate limit handling, and connection pooling.
How this skill is triggered — by the user, by Claude, or both
Slash command
/juicebox-pack:juicebox-performance-tuningThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Juicebox's AI analysis API handles dataset uploads, analysis queue wait times, and result pagination. Large dataset uploads (100K+ rows) can block the analysis pipeline, while queue contention during peak hours increases wait times. Result sets from broad queries return thousands of profiles requiring efficient pagination. Caching search results, batching enrichment calls, and managing upload c...
Juicebox's AI analysis API handles dataset uploads, analysis queue wait times, and result pagination. Large dataset uploads (100K+ rows) can block the analysis pipeline, while queue contention during peak hours increases wait times. Result sets from broad queries return thousands of profiles requiring efficient pagination. Caching search results, batching enrichment calls, and managing upload chunking reduces end-to-end analysis time by 40-60% and keeps interactive searches responsive.
const cache = new Map<string, { data: any; expiry: number }>();
const TTL = { search: 300_000, profile: 600_000, analysis: 900_000 };
async function cached(key: string, ttlKey: keyof typeof TTL, fn: () => Promise<any>) {
const entry = cache.get(key);
if (entry && entry.expiry > Date.now()) return entry.data;
const data = await fn();
cache.set(key, { data, expiry: Date.now() + TTL[ttlKey] });
return data;
}
// Analysis results are expensive — cache 15 min. Searches expire at 5 min.
async function enrichBatch(client: any, profileIds: string[], batchSize = 50) {
const results = [];
for (let i = 0; i < profileIds.length; i += batchSize) {
const batch = profileIds.slice(i, i + batchSize);
const res = await client.enrichBatch({ profile_ids: batch, fields: ['skills_map', 'contact'] });
results.push(...res.profiles);
if (i + batchSize < profileIds.length) await new Promise(r => setTimeout(r, 300));
}
return results;
}
import { Agent } from 'https';
const agent = new Agent({ keepAlive: true, maxSockets: 8, maxFreeSockets: 4, timeout: 60_000 });
// Longer timeout for dataset uploads and analysis queue responses
async function withRateLimit(fn: () => Promise<any>): Promise<any> {
try { return await fn(); }
catch (err: any) {
if (err.status === 429) {
const backoff = parseInt(err.headers?.['retry-after'] || '10') * 1000;
await new Promise(r => setTimeout(r, backoff));
return fn();
}
throw err;
}
}
const metrics = { searches: 0, enrichments: 0, cacheHits: 0, queueWaitMs: 0, errors: 0 };
function track(op: 'search' | 'enrich', startMs: number, cached: boolean) {
metrics[op === 'search' ? 'searches' : 'enrichments']++;
metrics.queueWaitMs += Date.now() - startMs;
if (cached) metrics.cacheHits++;
}
| Issue | Cause | Fix |
|---|---|---|
| Analysis queue timeout | Peak hour contention | Schedule large analyses off-peak, increase client timeout |
| 429 on bulk enrichment | Too many concurrent enrichment calls | Batch to 50 profiles with 300ms interval |
| Upload failure on large dataset | Payload exceeds limit or connection drop | Chunk into 10K-row segments, retry failed chunks |
| Slow broad search | Unfiltered query returning thousands of results | Add location/skills/title filters, set limit=20 |
See juicebox-reference-architecture.
2plugins reuse this skill
First indexed Jul 18, 2026
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin juicebox-packDiagnoses and fixes Juicebox API errors including authentication, rate limiting, quota exhaustion, dataset format issues, and analysis timeouts.
Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.