jeremylongshore/claude-code-plugins-plus-skills
juicebox-pack
plugins/saas-packs/juicebox-pack/skills/juicebox-webhooks-events/SKILL.md
January 22, 2026
Select agents to install to:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/juicebox-pack/skills/juicebox-webhooks-events/SKILL.md -a claude-code --skill juicebox-webhooks-eventsInstallation paths:
.claude/skills/juicebox-webhooks-events/# Juicebox Webhooks & Events
## Overview
Implement webhook handlers for real-time Juicebox events and notifications.
## Prerequisites
- Juicebox account with webhooks enabled
- HTTPS endpoint for webhook delivery
- Request signature verification capability
## Instructions
### Step 1: Register Webhook Endpoint
```typescript
// First, configure in Juicebox dashboard or via API
import { JuiceboxClient } from '@juicebox/sdk';
const client = new JuiceboxClient({
apiKey: process.env.JUICEBOX_API_KEY!
});
await client.webhooks.create({
url: 'https://your-app.com/webhooks/juicebox',
events: [
'search.completed',
'profile.enriched',
'export.ready',
'quota.warning'
],
secret: process.env.JUICEBOX_WEBHOOK_SECRET
});
```
### Step 2: Implement Webhook Handler
```typescript
// routes/webhooks.ts
import { Router } from 'express';
import crypto from 'crypto';
const router = Router();
// Verify webhook signature
function verifySignature(payload: string, signature: string, secret: string): boolean {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(`sha256=${expected}`)
);
}
router.post('/webhooks/juicebox', express.raw({ type: 'application/json' }), async (req, res) => {
const signature = req.headers['x-juicebox-signature'] as string;
const payload = req.body.toString();
// Verify signature
if (!verifySignature(payload, signature, process.env.JUICEBOX_WEBHOOK_SECRET!)) {
return res.status(401).json({ error: 'Invalid signature' });
}
const event = JSON.parse(payload);
// Acknowledge receipt immediately
res.status(200).json({ received: true });
// Process event asynchronously
await processWebhookEvent(event);
});
export default router;
```
### Step 3: Process Different Event Types
```typescript
// services/webhook-processor.ts
interface WebhookEvent {
id: string;
type: string;
timestamp