Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Apply production Juicebox SDK patterns. Trigger: "juicebox patterns", "juicebox best practices".
.claude/skills/jeremylongshore-juicebox-sdk-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -5% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 26% | 0% |
Production-ready patterns for the Juicebox AI-powered people search API. Juicebox provides REST endpoints for searching professional profiles and enriching candidate data. The API authenticates via JUICEBOX_API_KEY and returns structured profile objects with LinkedIn URLs as natural dedup keys. A singleton client centralizes rate-limit handling across search and enrich endpoints.
typescriptconst JUICEBOX_BASE = 'https://api.juicebox.work/v1'; let _client: JuiceboxClient | null = null; export function getClient(): JuiceboxClient { if (!_client) { const apiKey = process.env.JUICEBOX_API_KEY; if (!apiKey) throw new Error('JUICEBOX_API_KEY must be set — get it from juicebox.work/settings'); _client = new JuiceboxClient(apiKey); } return _client; } class JuiceboxClient { private headers: Record<string, string>; constructor(apiKey: string) { this.headers = { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }; } async search(query: string, limit = 20): Promise<SearchResponse> { const res = await fetch(`${JUICEBOX_BASE}/search`, { method: 'POST', headers: this.headers, body: JSON.stringify({ query, limit }) }); if (!res.ok) throw new JuiceboxError(res.status, await res.text()); return res.json(); } async enrich(linkedinUrl: string): Promise<Profile> { const res = await fetch(`${JUICEBOX_BASE}/enrich`, { method: 'POST', headers: this.headers, body: JSON.stringify({ linkedin_url: linkedinUrl }) }); if (!res.ok) throw new JuiceboxError(res.status, await res.text()); return res.json(); } }
typescriptexport class JuiceboxError extends Error { constructor(public status: number, message: string) { super(message); this.name = 'JuiceboxError'; } } export async function safeCall<T>(operation: string, fn: () => Promise<T>): Promise<T> { try { return await fn(); } catch (err: any) { if (err instanceof JuiceboxError && err.status === 429) { await new Promise(r => setTimeout(r, 5000)); return fn(); } if (err instanceof JuiceboxError && err.status === 401) throw new JuiceboxError(401, 'Invalid JUICEBOX_API_KEY'); throw new JuiceboxError(err.status ?? 0, `${operation} failed: ${err.message}`); } }
typescriptclass JuiceboxSearchBuilder { private body: Record<string, any> = {}; query(q: string) { this.body.query = q; return this; } limit(n: number) { this.body.limit = Math.min(n, 100); return this; } location(loc: string) { this.body.location = loc; return this; } title(t: string) { this.body.title_filter = t; return this; } company(c: string) { this.body.company_filter = c; return this; } yearsExp(min: number, max: number) { this.body.years_experience = { min, max }; return this; } build() { return this.body; } } // Usage: new JuiceboxSearchBuilder().query('ML engineer').location('San Francisco').yearsExp(3, 8).build();
typescriptinterface Profile { id: string; name: string; title: string; company: string; linkedin_url: string; location: string; skills: string[]; experience_years: number; } interface SearchResponse { profiles: Profile[]; total: number; has_more: boolean; cursor?: string; } interface EnrichResult { profile: Profile; education: Array<{ school: string; degree: string; year: number }>; experience: Array<{ company: string; title: string; start: string; end: string | null }>; }
typescriptexport function mockProfile(overrides: Partial<Profile> = {}): Profile { return { id: 'prof-001', name: 'Jane Smith', title: 'Senior ML Engineer', company: 'Acme Corp', linkedin_url: 'https://linkedin.com/in/janesmith', location: 'San Francisco, CA', skills: ['Python', 'PyTorch', 'MLOps'], experience_years: 6, ...overrides }; } export function mockSearchResponse(count = 3): SearchResponse { return { profiles: Array.from({ length: count }, (_, i) => mockProfile({ id: `prof-${i}` })), total: count, has_more: false }; }
| Pattern | When to Use | Example | |---------|-------------|---------| | safeCall wrapper | All Juicebox API calls | Structured error with operation context | | Retry on 429 | Batch search pipelines | 5s backoff before retry | | LinkedIn dedup | Multi-query search | Set<string> on linkedin_url prevents duplicates | | Cursor pagination | Search results > 100 | Pass cursor from previous response |
Apply patterns in juicebox-core-workflow-a.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-13 | fail→pass | 10,042 | 6,348 | -37% | 1 | 1 | 0% | 1,925 | 2,638 | +37% | 0 | 0 | — |
case-01 | fail→fail | 25,385 | 12,620 | -50% | 1 | 1 | 0% | 4,451 | 3,512 | -21% | 0 | 0 | — |
case-02 | fail→pass | 23,368 | 11,198 | -52% | 1 | 1 | 0% | 3,978 | 3,796 | -5% | 0 | 0 | — |
case-03 | fail→pass | 26,149 | 14,876 | -43% | 1 | 1 | 0% | 4,473 | 3,558 | -20% | 0 | 0 | — |
case-04 | fail→pass | 14,290 | 11,986 | -16% | 1 | 1 | 0% | 1,659 | 2,503 | +51% | 0 | 0 | — |
case-05 | fail→pass | 18,898 | 6,018 | -68% | 1 | 1 | 0% | 2,006 | 2,524 | +26% | 0 | 0 | — |
case-06 | fail→pass | 16,067 | 10,496 | -35% | 1 | 1 | 0% | 2,228 | 2,960 | +33% | 0 | 0 | — |
case-07 | pass→pass | 16,009 | 13,797 | -14% | 1 | 1 | 0% | 3,501 | 3,089 | -12% | 0 | 0 | — |
case-08 | fail→fail | 22,251 | 15,913 | -28% | 1 | 1 | 0% | 3,473 | 3,582 | +3% | 0 | 0 | — |
case-09 | fail→fail | 18,312 | 13,946 | -24% | 1 | 1 | 0% | 2,483 | 3,149 | +27% | 0 | 0 | — |
case-10 | fail→fail | 19,046 | 14,068 | -26% | 1 | 1 | 0% | 2,711 | 3,478 | +28% | 0 | 0 | — |
case-11 | fail→pass | 11,277 | 12,786 | +13% | 1 | 1 | 0% | 2,209 | 2,842 | +29% | 0 | 0 | — |
case-12 | fail→pass | 20,216 | 11,082 | -45% | 1 | 1 | 0% | 3,186 | 3,752 | +18% | 0 | 0 | — |
case-14 | fail→pass | 10,880 | 6,486 | -40% | 1 | 1 | 0% | 1,860 | 2,494 | +34% | 0 | 0 | — |
case-15 | pass→pass | 21,689 | 6,932 | -68% | 1 | 1 | 0% | 2,638 | 2,698 | +2% | 0 | 0 | — |
case-16 | fail→fail | 11,731 | 11,416 | -3% | 1 | 1 | 0% | 2,349 | 2,580 | +10% | 0 | 0 | — |
case-17 | pass→pass | 18,670 | 14,679 | -21% | 1 | 1 | 0% | 2,244 | 3,438 | +53% | 0 | 0 | — |
case-18 | fail→fail | 30,002 | 10,332 | -66% | 1 | 1 | 0% | 4,739 | 3,245 | -32% | 0 | 0 | — |
case-19 | fail→pass | 23,026 | 21,217 | -8% | 1 | 1 | 0% | 3,424 | 3,857 | +13% | 0 | 0 | — |
case-20 | fail→pass | 14,879 | 8,247 | -45% | 1 | 1 | 0% | 1,863 | 1,935 | +4% | 0 | 0 | — |
case-21 | pass→pass | 11,876 | 9,956 | -16% | 1 | 1 | 0% | 2,342 | 3,402 | +45% | 0 | 0 | — |
case-22 | pass→pass | 18,488 | 17,468 | -6% | 1 | 1 | 0% | 2,714 | 3,806 | +40% | 0 | 0 | — |
case-23 | pass→pass | 13,654 | 11,935 | -13% | 1 | 1 | 0% | 1,978 | 2,718 | +37% | 0 | 0 | — |
case-24 | pass→pass | 17,825 | 16,920 | -5% | 1 | 1 | 0% | 3,359 | 3,903 | +16% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +46 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.