aiskillstore/marketplace / skills/aayushbaniya2006/ai-handler
ai-handler
VerifiedIntegrate Replicate AI models with background processing, S3 storage, and credit systems
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.2 KB |
| reference.md | markdown | 822 B |
| skill-report.json | config | 30.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();
}
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |