Agent skill

juicebox-sdk-patterns

Apply production Juicebox SDK patterns. Trigger: "juicebox patterns", "juicebox best practices".

Stars 1,803
Forks 241

Install this agent skill to your Project

npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/tree/main/plugins/saas-packs/juicebox-pack/skills/juicebox-sdk-patterns

SKILL.md

Juicebox SDK Patterns

Singleton Client

typescript
let instance: JuiceboxClient | null = null;
export function getClient(): JuiceboxClient {
  if (!instance) instance = new JuiceboxClient({ apiKey: process.env.JUICEBOX_API_KEY });
  return instance;
}

Batch Search with Dedup

typescript
async function batchSearch(queries: string[]): Promise<Profile[]> {
  const seen = new Set<string>();
  const all: Profile[] = [];
  for (const q of queries) {
    const r = await client.search({ query: q, limit: 20 });
    for (const p of r.profiles) {
      if (!seen.has(p.linkedin_url)) { seen.add(p.linkedin_url); all.push(p); }
    }
  }
  return all;
}

Error Wrapper

typescript
async function safeCall<T>(fn: () => Promise<T>): Promise<T | null> {
  try { return await fn(); }
  catch (e: any) {
    if (e.status === 429) { await new Promise(r => setTimeout(r, 5000)); return fn(); }
    return null;
  }
}

Resources

Next Steps

Apply in juicebox-core-workflow-a.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results