Skip to content

aiskillstore/marketplace / skills/aayushbaniya2006/ai-handler

ai-handler

Verified

Integrate Replicate AI models with background processing, S3 storage, and credit systems

FileKindSize
SKILL.mdskill md5.2 KB
reference.mdmarkdown822 B
skill-report.jsonconfig30.2 KB

reference.md

View on GitHub
# AI Handler Reference

## Dependencies
- `replicate`
- `inngest` (for background processing)
- `src/lib/s3/uploadFromServer` (for persistence)

## Database Schema (Example)
```typescript
// src/db/schema/generations.ts
export const generations = pgTable("generations", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  userId: text("userId").notNull(),
  prompt: text("prompt"),
  status: text("status").default("pending"), // pending, processing, completed, failed
  url: text("url"), // S3 URL
  createdAt: timestamp("createdAt").defaultNow(),
});
```

## Replicate Polling Pattern
Use `step.sleep` loops for simple polling of long-running predictions.

```typescript
while (status !== "succeeded" && status !== "failed") {
  await step.sleep("poll", "2s");
  status = await checkStatus();
}
```
slack-gif-creatoranthropics/skillsKnowledge 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."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall