Agent skill

ai-handler

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

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill ai-handler-reeseastor-indie-kit --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/ai-llm/ai-handler-reeseastor-indie-kit/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Replicate AI Handler Skill This skill provides a production-ready pattern for integrating Replicate AI models. It handles long-running predictions using Inngest background jobs, stores results in S3, manages user credits, and updates database state. ## Architecture 1. **Trigger**: User requests a generation via API (e.g., `/api/app/ai-images`). 2. **Validation**: Check/deduct user credits. 3. **State**: Create a database record with `status: "processing"`. 4. **Queue**: Trigger an Inngest function to handle the Replicate API call. 5. **Processing**: - Call Replicate API. - Wait for completion (polling or webhook). - Download result and upload to S3 (server-side). 6. **Completion**: Update database record with S3 URL and `status: "completed"`. 7. **Failure**: Refund credits if failed (optional) and update status to `failed`. ## Prerequisites - `replicate` package installed (`npm install replicate`). - `REPLICATE_API_TOKEN` in `.env`. - S3 and Inngest configured. ## Implementation Steps ### 1. API Route (Trigger) `src/app/api/app/generate/route.ts` ```typescript import withAuthRequired from "@/lib/auth/withAuthRequired"; import { db } from "@/db"; import { generations } from "@/db/

What's inside
Steps it walks through
  1. Architecture
  2. Prerequisites
  3. Implementation Steps
  4. 1. API Route (Trigger)
  5. 2. Inngest Function (Processor)
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the ai-handler skill do?

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

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill ai-handler-reeseastor-indie-kit --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going