[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F887KY80TN0FR8MDB7ZPC4":3,"skill-same:01M6F887KY80TN0FR8MDB7ZPC4":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6F887KY80TN0FR8MDB7ZPC4","mistral-webhooks-events",null,"Implement event handling patterns for Mistral AI integrations.\nUse when building async workflows, implementing queues,\nor handling long-running Mistral AI operations.\nTrigger with phrases like \"mistral events\", \"mistral async\",\n\"mistral queue\", \"mistral background jobs\", \"mistral webhook\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1981,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fmistral-pack\u002Fskills\u002Fmistral-webhooks-events\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"Mistral","mistral webhooks events","webhooks","events","background jobs","running","when","queues","for","implementing","event","long","trigger","io","webhook","implement","patterns","async","use","edit","write","read","integrations","Bash","workflows","2026-11-10 10:12:30",false,"---\nname: mistral-webhooks-events\ndescription: |\n  Implement event handling patterns for Mistral AI integrations.\n  Use when building async workflows, implementing queues,\n  or handling long-running Mistral AI operations.\n  Trigger with phrases like \"mistral events\", \"mistral async\",\n  \"mistral queue\", \"mistral background jobs\", \"mistral webhook\".\nallowed-tools: Read, Write, Edit, Bash(curl:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Mistral AI Events & Async Patterns\n\n## Overview\nImplement async patterns and event handling for Mistral AI integrations. Note: Mistral AI does not have native webhooks, so this skill covers async patterns and event-driven architectures.\n\n## Prerequisites\n- Mistral AI SDK installed\n- Queue system (Redis, SQS, etc.) for async processing\n- Event emitter or pub\u002Fsub for notifications\n- Background job processor (BullMQ, etc.)\n\n## Instructions\n\n### Step 1: Event-Driven Chat Architecture\n\n```typescript\nimport { EventEmitter } from 'events';\nimport Mistral from '@mistralai\u002Fmistralai';\n\n\u002F\u002F Custom event types\ninterface MistralEvents {\n  'chat:start': { requestId: string; model: string; timestamp: Date };\n  'chat:chunk': { requestId: string; content: string; index: number };\n  'chat:complete': { requestId: string; fullResponse: string; usage: any };\n  'chat:error': { requestId: string; error: Error };\n}\n\nclass MistralEventEmitter extends EventEmitter {\n  private client: Mistral;\n\n  constructor() {\n    super();\n    this.client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY! });\n  }\n\n  async chat(requestId: string, messages: any[], model = 'mistral-small-latest') {\n    this.emit('chat:start', { requestId, model, timestamp: new Date() });\n\n    try {\n      const stream = await this.client.chat.stream({ model, messages });\n\n      let fullResponse = '';\n      let index = 0;\n\n      for await (const event of stream) {\n        const content = event.data?.choices?.[0]?.delta?.content;\n        if (content) {\n          fullResponse += content;\n          this.emit('chat:chunk', { requestId, content, index: index++ });\n        }\n      }\n\n      const usage = { totalTokens: fullResponse.length \u002F 4 }; \u002F\u002F Estimate\n      this.emit('chat:complete', { requestId, fullResponse, usage });\n\n      return fullResponse;\n    } catch (error) {\n      this.emit('chat:error', { requestId, error: error as Error });\n      throw error;\n    }\n  }\n}\n\n\u002F\u002F Usage\nconst mistral = new MistralEventEmitter();\n\nmistral.on('chat:start', ({ requestId, model }) => {\n  console.log(`[${requestId}] Starting chat with ${model}`);\n});\n\nmistral.on('chat:chunk', ({ requestId, content }) => {\n  process.stdout.write(content);\n});\n\nmistral.on('chat:complete', ({ requestId, usage }) => {\n  console.log(`\\n[${requestId}] Complete. Tokens: ${usage.totalTokens}`);\n});\n\nmistral.on('chat:error', ({ requestId, error }) => {\n  console.error(`[${requestId}] Error:`, error.message);\n});\n\nawait mistral.chat('req-123', [{ role: 'user', content: 'Hello!' }]);\n```\n\n### Step 2: Background Job Processing with BullMQ\n\n```typescript\nimport { Queue, Worker, Job } from 'bullmq';\nimport Mistral from '@mistralai\u002Fmistralai';\nimport Redis from 'ioredis';\n\nconst connection = new Redis(process.env.REDIS_URL);\n\n\u002F\u002F Define job types\ninterface ChatJob {\n  id: string;\n  messages: Array\u003C{ role: string; content: string }>;\n  model: string;\n  callback?: string; \u002F\u002F Webhook URL to call on completion\n}\n\n\u002F\u002F Create queue\nconst chatQueue = new Queue\u003CChatJob>('mistral-chat', { connection });\n\n\u002F\u002F Create worker\nconst chatWorker = new Worker\u003CChatJob>(\n  'mistral-chat',\n  async (job: Job\u003CChatJob>) => {\n    const client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY! });\n\n    const response = await client.chat.complete({\n      model: job.data.model,\n      messages: job.data.messages,\n    });\n\n    const result = {\n      jobId: job.id,\n      requestId: job.data.id,\n      content: response.choices?.[0]?.message?.content,\n      usage: response.usage,\n      completedAt: new Date().toISOString(),\n    };\n\n    \u002F\u002F Call webhook if provided\n    if (job.data.callback) {\n      await fetch(job.data.callback, {\n        method: 'POST',\n        headers: { 'Content-Type': 'application\u002Fjson' },\n        body: JSON.stringify(result),\n      });\n    }\n\n    return result;\n  },\n  {\n    connection,\n    concurrency: 5,\n    limiter: {\n      max: 10,\n      duration: 1000, \u002F\u002F Max 10 jobs per second\n    },\n  }\n);\n\n\u002F\u002F Event handlers\nchatWorker.on('completed', (job, result) => {\n  console.log(`Job ${job.id} completed:`, result);\n});\n\nchatWorker.on('failed', (job, err) => {\n  console.error(`Job ${job?.id} failed:`, err.message);\n});\n\n\u002F\u002F API endpoint to queue jobs\nexport async function POST(request: Request) {\n  const body = await request.json();\n\n  const job = await chatQueue.add('chat', {\n    id: crypto.randomUUID(),\n    messages: body.messages,\n    model: body.model || 'mistral-small-latest',\n    callback: body.callback,\n  }, {\n    attempts: 3,\n    backoff: { type: 'exponential', delay: 1000 },\n  });\n\n  return Response.json({\n    jobId: job.id,\n    status: 'queued',\n    statusUrl: `\u002Fapi\u002Fjobs\u002F${job.id}`,\n  });\n}\n```\n\n### Step 3: Webhook Notification System\n\n```typescript\nimport crypto from 'crypto';\n\ninterface WebhookPayload {\n  event: string;\n  timestamp: string;\n  data: any;\n}\n\nclass WebhookNotifier {\n  private secret: string;\n\n  constructor(secret: string) {\n    this.secret = secret;\n  }\n\n  private sign(payload: string): string {\n    return crypto\n      .createHmac('sha256', this.secret)\n      .update(payload)\n      .digest('hex');\n  }\n\n  async notify(url: string, event: string, data: any): Promise\u003Cboolean> {\n    const payload: WebhookPayload = {\n      event,\n      timestamp: new Date().toISOString(),\n      data,\n    };\n\n    const body = JSON.stringify(payload);\n    const signature = this.sign(body);\n\n    try {\n      const response = await fetch(url, {\n        method: 'POST',\n        headers: {\n          'Content-Type': 'application\u002Fjson',\n          'X-Webhook-Signature': signature,\n          'X-Webhook-Timestamp': payload.timestamp,\n        },\n        body,\n      });\n\n      return response.ok;\n    } catch (error) {\n      console.error('Webhook failed:', error);\n      return false;\n    }\n  }\n}\n\n\u002F\u002F Usage\nconst notifier = new WebhookNotifier(process.env.WEBHOOK_SECRET!);\n\n\u002F\u002F After Mistral completion\nawait notifier.notify(\n  'https:\u002F\u002Fyourapp.com\u002Fwebhooks\u002Fmistral',\n  'chat.completed',\n  {\n    requestId: 'req-123',\n    content: response.choices?.[0]?.message?.content,\n    usage: response.usage,\n  }\n);\n```\n\n### Step 4: Server-Sent Events (SSE) for Real-Time Updates\n\n```typescript\n\u002F\u002F api\u002Fchat\u002Fstream\u002Froute.ts\nimport Mistral from '@mistralai\u002Fmistralai';\n\nexport async function POST(request: Request) {\n  const { messages } = await request.json();\n\n  const client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY! });\n\n  const stream = await client.chat.stream({\n    model: 'mistral-small-latest',\n    messages,\n  });\n\n  const encoder = new TextEncoder();\n\n  const readable = new ReadableStream({\n    async start(controller) {\n      \u002F\u002F Send initial event\n      controller.enqueue(encoder.encode(`event: start\\ndata: {\"status\":\"started\"}\\n\\n`));\n\n      try {\n        let tokenCount = 0;\n        for await (const event of stream) {\n          const content = event.data?.choices?.[0]?.delta?.content;\n          if (content) {\n            tokenCount++;\n            controller.enqueue(\n              encoder.encode(`event: chunk\\ndata: ${JSON.stringify({ content, tokenCount })}\\n\\n`)\n            );\n          }\n        }\n\n        \u002F\u002F Send completion event\n        controller.enqueue(\n          encoder.encode(`event: complete\\ndata: ${JSON.stringify({ totalTokens: tokenCount })}\\n\\n`)\n        );\n      } catch (error: any) {\n        controller.enqueue(\n          encoder.encode(`event: error\\ndata: ${JSON.stringify({ error: error.message })}\\n\\n`)\n        );\n      }\n\n      controller.close();\n    },\n  });\n\n  return new Response(readable, {\n    headers: {\n      'Content-Type': 'text\u002Fevent-stream',\n      'Cache-Control': 'no-cache',\n      'Connection': 'keep-alive',\n    },\n  });\n}\n```\n\n### Step 5: Client-Side SSE Consumption\n\n```typescript\n\u002F\u002F Client-side JavaScript\nfunction streamChat(messages: any[]): EventSource {\n  const eventSource = new EventSource('\u002Fapi\u002Fchat\u002Fstream', {\n    \u002F\u002F Note: EventSource doesn't support POST directly\n    \u002F\u002F Use fetch with ReadableStream instead, or use a library\n  });\n\n  eventSource.addEventListener('start', (e) => {\n    console.log('Stream started');\n  });\n\n  eventSource.addEventListener('chunk', (e) => {\n    const { content } = JSON.parse(e.data);\n    process.stdout.write(content);\n  });\n\n  eventSource.addEventListener('complete', (e) => {\n    const { totalTokens } = JSON.parse(e.data);\n    console.log(`\\nComplete. Tokens: ${totalTokens}`);\n    eventSource.close();\n  });\n\n  eventSource.addEventListener('error', (e) => {\n    console.error('Stream error:', e);\n    eventSource.close();\n  });\n\n  return eventSource;\n}\n```\n\n## Output\n- Event-driven Mistral AI integration\n- Background job processing\n- Webhook notification system\n- Real-time streaming with SSE\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Job stuck in queue | Worker crashed | Implement job timeout and retry |\n| Webhook failed | Network\u002Fauth issue | Retry with exponential backoff |\n| SSE disconnected | Client timeout | Implement reconnection logic |\n| Event backpressure | Too many events | Implement buffering |\n\n## Examples\n\n### Python Async Pattern\n```python\nimport asyncio\nfrom mistralai import Mistral\n\nasync def process_batch(prompts: list[str]):\n    client = Mistral(api_key=os.environ.get(\"MISTRAL_API_KEY\"))\n\n    async def process_one(prompt: str):\n        response = await client.chat.complete_async(\n            model=\"mistral-small-latest\",\n            messages=[{\"role\": \"user\", \"content\": prompt}]\n        )\n        return response.choices[0].message.content\n\n    results = await asyncio.gather(*[process_one(p) for p in prompts])\n    return results\n```\n\n## Resources\n- [BullMQ Documentation](https:\u002F\u002Fdocs.bullmq.io\u002F)\n- [Server-Sent Events MDN](https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FServer-sent_events)\n- [Mistral AI Streaming](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Fcompletion\u002F#streaming)\n\n## Next Steps\nFor performance optimization, see `mistral-performance-tuning`.\n","# Mistral AI Events & Async Patterns\n\n## Overview\nImplement async patterns and event handling for Mistral AI integrations. Note: Mistral AI does not have native webhooks, so this skill covers async patterns and event-driven architectures.\n\n## Prerequisites\n- Mistral AI SDK installed\n- Queue system (Redis, SQS, etc.) for async processing\n- Event emitter or pub\u002Fsub for notifications\n- Background job processor (BullMQ, etc.)\n\n## Instructions\n\n### Step 1: Event-Driven Chat Architecture\n\n```typescript\nimport { EventEmitter } from 'events';\nimport Mistral from '@mistralai\u002Fmistralai';\n\n\u002F\u002F Custom event types\ninterface MistralEvents {\n  'chat:start': { requestId: string; model: string; timestamp: Date };\n  'chat:chunk': { requestId: string; content: string; index: number };\n  'chat:complete': { requestId: string; fullResponse: string; usage: any };\n  'chat:error': { requestId: string; error: Error };\n}\n\nclass MistralEventEmitter extends EventEmitter {\n  private client: Mistral;\n\n  constructor() {\n    super();\n    this.client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY! });\n  }\n\n  async chat(requestId: string, messages: any[], model = 'mistral-small-latest') {\n    this.emit('chat:start', { requestId, model, timestamp: new Date() });\n\n    try {\n      const stream = await this.client.chat.stream({ model, messages });\n\n      let fullResponse = '';\n      let index = 0;\n\n      for await (const event of stream) {\n        const content = event.data?.choices?.[0]?.delta?.content;\n        if (content) {\n          fullResponse += content;\n          this.emit('chat:chunk', { requestId, content, index: index++ });\n        }\n      }\n\n      const usage = { totalTokens: fullResponse.length \u002F 4 }; \u002F\u002F Estimate\n      this.emit('chat:complete', { requestId, fullResponse, usage });\n\n      return fullResponse;\n    } catch (error) {\n      this.emit('chat:error', { requestId, error: error as Error });\n      throw error;\n    }\n  }\n}\n\n\u002F\u002F Usage\nconst mistral = new MistralEventEmitter();\n\nmistral.on('chat:start', ({ requestId, model }) => {\n  console.log(`[${requestId}] Starting chat with ${model}`);\n});\n\nmistral.on('chat:chunk', ({ requestId, content }) => {\n  process.stdout.write(content);\n});\n\nmistral.on('chat:complete', ({ requestId, usage }) => {\n  console.log(`\\n[${requestId}] Complete. Tokens: ${usage.totalTokens}`);\n});\n\nmistral.on('chat:error', ({ requestId, error }) => {\n  console.error(`[${requestId}] Error:`, error.message);\n});\n\nawait mistral.chat('req-123', [{ role: 'user', content: 'Hello!' }]);\n```\n\n### Step 2: Background Job Processing with BullMQ\n\n```typescript\nimport { Queue, Worker, Job } from 'bullmq';\nimport Mistral from '@mistralai\u002Fmistralai';\nimport Redis from 'ioredis';\n\nconst connection = new Redis(process.env.REDIS_URL);\n\n\u002F\u002F Define job types\ninterface ChatJob {\n  id: string;\n  messages: Array\u003C{ role: string; content: string }>;\n  model: string;\n  callback?: string; \u002F\u002F Webhook URL to call on completion\n}\n\n\u002F\u002F Create queue\nconst chatQueue = new Queue\u003CChatJob>('mistral-chat', { connection });\n\n\u002F\u002F Create worker\nconst chatWorker = new Worker\u003CChatJob>(\n  'mistral-chat',\n  async (job: Job\u003CChatJob>) => {\n    const client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY! });\n\n    const response = await client.chat.complete({\n      model: job.data.model,\n      messages: job.data.messages,\n    });\n\n    const result = {\n      jobId: job.id,\n      requestId: job.data.id,\n      content: response.choices?.[0]?.message?.content,\n      usage: response.usage,\n      completedAt: new Date().toISOString(),\n    };\n\n    \u002F\u002F Call webhook if provided\n    if (job.data.callback) {\n      await fetch(job.data.callback, {\n        method: 'POST',\n        headers: { 'Content-Type': 'application\u002Fjson' },\n        body: JSON.stringify(result),\n      });\n    }\n\n    return result;\n  },\n  {\n    connection,\n    concurrency: 5,\n    limiter: {\n      max: 10,\n      duration: 1000, \u002F\u002F Max 10 jobs per second\n    },\n  }\n);\n\n\u002F\u002F Event handlers\nchatWorker.on('completed', (job, result) => {\n  console.log(`Job ${job.id} completed:`, result);\n});\n\nchatWorker.on('failed', (job, err) => {\n  console.error(`Job ${job?.id} failed:`, err.message);\n});\n\n\u002F\u002F API endpoint to queue jobs\nexport async function POST(request: Request) {\n  const body = await request.json();\n\n  const job = await chatQueue.add('chat', {\n    id: crypto.randomUUID(),\n    messages: body.messages,\n    model: body.model || 'mistral-small-latest',\n    callback: body.callback,\n  }, {\n    attempts: 3,\n    backoff: { type: 'exponential', delay: 1000 },\n  });\n\n  return Response.json({\n    jobId: job.id,\n    status: 'queued',\n    statusUrl: `\u002Fapi\u002Fjobs\u002F${job.id}`,\n  });\n}\n```\n\n### Step 3: Webhook Notification System\n\n```typescript\nimport crypto from 'crypto';\n\ninterface WebhookPayload {\n  event: string;\n  timestamp: string;\n  data: any;\n}\n\nclass WebhookNotifier {\n  private secret: string;\n\n  constructor(secret: string) {\n    this.secret = secret;\n  }\n\n  private sign(payload: string): string {\n    return crypto\n      .createHmac('sha256', this.secret)\n      .update(payload)\n      .digest('hex');\n  }\n\n  async notify(url: string, event: string, data: any): Promise\u003Cboolean> {\n    const payload: WebhookPayload = {\n      event,\n      timestamp: new Date().toISOString(),\n      data,\n    };\n\n    const body = JSON.stringify(payload);\n    const signature = this.sign(body);\n\n    try {\n      const response = await fetch(url, {\n        method: 'POST',\n        headers: {\n          'Content-Type': 'application\u002Fjson',\n          'X-Webhook-Signature': signature,\n          'X-Webhook-Timestamp': payload.timestamp,\n        },\n        body,\n      });\n\n      return response.ok;\n    } catch (error) {\n      console.error('Webhook failed:', error);\n      return false;\n    }\n  }\n}\n\n\u002F\u002F Usage\nconst notifier = new WebhookNotifier(process.env.WEBHOOK_SECRET!);\n\n\u002F\u002F After Mistral completion\nawait notifier.notify(\n  'https:\u002F\u002Fyourapp.com\u002Fwebhooks\u002Fmistral',\n  'chat.completed',\n  {\n    requestId: 'req-123',\n    content: response.choices?.[0]?.message?.content,\n    usage: response.usage,\n  }\n);\n```\n\n### Step 4: Server-Sent Events (SSE) for Real-Time Updates\n\n```typescript\n\u002F\u002F api\u002Fchat\u002Fstream\u002Froute.ts\nimport Mistral from '@mistralai\u002Fmistralai';\n\nexport async function POST(request: Request) {\n  const { messages } = await request.json();\n\n  const client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY! });\n\n  const stream = await client.chat.stream({\n    model: 'mistral-small-latest',\n    messages,\n  });\n\n  const encoder = new TextEncoder();\n\n  const readable = new ReadableStream({\n    async start(controller) {\n      \u002F\u002F Send initial event\n      controller.enqueue(encoder.encode(`event: start\\ndata: {\"status\":\"started\"}\\n\\n`));\n\n      try {\n        let tokenCount = 0;\n        for await (const event of stream) {\n          const content = event.data?.choices?.[0]?.delta?.content;\n          if (content) {\n            tokenCount++;\n            controller.enqueue(\n              encoder.encode(`event: chunk\\ndata: ${JSON.stringify({ content, tokenCount })}\\n\\n`)\n            );\n          }\n        }\n\n        \u002F\u002F Send completion event\n        controller.enqueue(\n          encoder.encode(`event: complete\\ndata: ${JSON.stringify({ totalTokens: tokenCount })}\\n\\n`)\n        );\n      } catch (error: any) {\n        controller.enqueue(\n          encoder.encode(`event: error\\ndata: ${JSON.stringify({ error: error.message })}\\n\\n`)\n        );\n      }\n\n      controller.close();\n    },\n  });\n\n  return new Response(readable, {\n    headers: {\n      'Content-Type': 'text\u002Fevent-stream',\n      'Cache-Control': 'no-cache',\n      'Connection': 'keep-alive',\n    },\n  });\n}\n```\n\n### Step 5: Client-Side SSE Consumption\n\n```typescript\n\u002F\u002F Client-side JavaScript\nfunction streamChat(messages: any[]): EventSource {\n  const eventSource = new EventSource('\u002Fapi\u002Fchat\u002Fstream', {\n    \u002F\u002F Note: EventSource doesn't support POST directly\n    \u002F\u002F Use fetch with ReadableStream instead, or use a library\n  });\n\n  eventSource.addEventListener('start', (e) => {\n    console.log('Stream started');\n  });\n\n  eventSource.addEventListener('chunk', (e) => {\n    const { content } = JSON.parse(e.data);\n    process.stdout.write(content);\n  });\n\n  eventSource.addEventListener('complete', (e) => {\n    const { totalTokens } = JSON.parse(e.data);\n    console.log(`\\nComplete. Tokens: ${totalTokens}`);\n    eventSource.close();\n  });\n\n  eventSource.addEventListener('error', (e) => {\n    console.error('Stream error:', e);\n    eventSource.close();\n  });\n\n  return eventSource;\n}\n```\n\n## Output\n- Event-driven Mistral AI integration\n- Background job processing\n- Webhook notification system\n- Real-time streaming with SSE\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Job stuck in queue | Worker crashed | Implement job timeout and retry |\n| Webhook failed | Network\u002Fauth issue | Retry with exponential backoff |\n| SSE disconnected | Client timeout | Implement reconnection logic |\n| Event backpressure | Too many events | Implement buffering |\n\n## Examples\n\n### Python Async Pattern\n```python\nimport asyncio\nfrom mistralai import Mistral\n\nasync def process_batch(prompts: list[str]):\n    client = Mistral(api_key=os.environ.get(\"MISTRAL_API_KEY\"))\n\n    async def process_one(prompt: str):\n        response = await client.chat.complete_async(\n            model=\"mistral-small-latest\",\n            messages=[{\"role\": \"user\", \"content\": prompt}]\n        )\n        return response.choices[0].message.content\n\n    results = await asyncio.gather(*[process_one(p) for p in prompts])\n    return results\n```\n\n## Resources\n- [BullMQ Documentation](https:\u002F\u002Fdocs.bullmq.io\u002F)\n- [Server-Sent Events MDN](https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FServer-sent_events)\n- [Mistral AI Streaming](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Fcompletion\u002F#streaming)\n\n## Next Steps\nFor performance optimization, see `mistral-performance-tuning`.\n",{"name":5,"author":49,"license":15,"version":50,"description":51,"allowed-tools":52},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Implement event handling patterns for Mistral AI integrations.\nUse when building async workflows, implementing queues,\nor handling long-running Mistral AI operations.\nTrigger with phrases like \"mistral events\", \"mistral async\",\n\"mistral queue\", \"mistral background jobs\", \"mistral webhook\".\n","Read, Write, Edit, Bash(curl:*)","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fmistral-pack\u002Fskills\u002Fmistral-webhooks-events",231,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-12 03:15:57",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill mistral-webhooks-events",{"tool":68,"command":69},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill mistral-webhooks-events",{"tool":71,"command":72},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill mistral-webhooks-events","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fmistral-pack\u002Fskills\u002Fmistral-webhooks-events\u002FSKILL.md",true,[],[77,116,141,167,192,214],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":82,"sourceHtmlUrl":83,"categories":84,"keywords":90,"publishedAt":44},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[85],{"categoryNo":86,"categoryName":87,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,37,109,110,111,112,113,27,114,115],"web artifacts builder","web","artifacts","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tools","Tailwind","html","single-file","simple","ui components","multi","jsx","suite",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":120,"sourceHtmlUrl":121,"categories":122,"keywords":127,"publishedAt":44},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[123,126],{"categoryNo":124,"categoryName":125,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":86,"categoryName":87,"taxonomyType":88,"taxonomyTypeDesc":89},[128,129,130,96,131,132,92,133,134,135,106,136,137,138,139,140,27],"testing","webapp testing","webapp","screenshots","playwright","debugging","toolkit","browser","logs","applications","behavior","local","with",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":145,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":44},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[149,150,151,152,153,154,155,156,37,157,158,159,160,161,162,163,140,164,165,166,27,25],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":171,"sourceHtmlUrl":172,"categories":173,"keywords":177,"publishedAt":44},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[174],{"categoryNo":175,"categoryName":176,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000023","Skill与智能体开发",[178,179,43,180,181,182,183,184,41,185,186,187,188,189,140,27,190,25,191],"skill creator","creator","create","update","capabilities","knowledge","tool","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":193,"name":194,"nameZh":6,"description":195,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":196,"sourceHtmlUrl":197,"categories":198,"keywords":200,"publishedAt":44},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[199],{"categoryNo":175,"categoryName":176,"taxonomyType":88,"taxonomyTypeDesc":89},[194,201,202,203,204,205,206,135,207,208,37,209,210,211,212,27,213],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source",{"skillNo":215,"name":216,"nameZh":6,"description":217,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":218,"sourceHtmlUrl":219,"categories":220,"keywords":227,"publishedAt":44},"01M6FDHPXE10J3XGTCH5HBHS1M","slack-gif-creator","Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like \"make me a GIF of X doing Y for Slack.\"","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fenterprise-communication\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fenterprise-communication\u002Fslack-gif-creator\u002FSKILL.md",[221,224],{"categoryNo":222,"categoryName":223,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000005","邮件与沟通",{"categoryNo":225,"categoryName":226,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000016","图像与多媒体",[228,229,230,179,231,107,232,233,183,37,234,189,235,236,237,27,238,25],"slack gif creator","slack","gif","validation","constraints","Animation","me","make","Utilities","concepts","request"]