ai-infrastructure-replicate

ai-infrastructure-replicate is a skill for Claude Code, Codex from agents-inc/skills. It costs 39 tokens per session (4,591 once invoked), scanned A, original, MIT.

A TypeScript and Node.js guide for using Replicate, a service that runs machine-learning models on hosted GPUs. It covers model calls, streaming results, background jobs, webhooks, files, versions, deployments, and training.

In plain words
What is it for?
Use it when integrating Replicate into a TypeScript or Node.js project, including synchronous or streaming predictions, file results, webhooks, model versions, deployments, or training.
Why use it?
It helps developers handle model outputs, delayed jobs, cold starts, and webhook security correctly. It also keeps API tokens out of source code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it when integrating Replicate into a TypeScript or Node.js project, including synchronous or streaming predictions, file results, webhooks, model versions, deployments, or training.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agents-inc/skills/ai-infrastructure-replicate
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add agents-inc/skills --skill ai-infrastructure-replicate
Clone the repo
git clone --depth 1 https://github.com/agents-inc/skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-infrastructure-replicate

README.md
[![agentmods](https://agentmods.dev/badge/skills/agents-inc/skills/ai-infrastructure-replicate.svg)](https://agentmods.dev/skills/agents-inc/skills/ai-infrastructure-replicate)
Your own site
<a href="https://agentmods.dev/skills/agents-inc/skills/ai-infrastructure-replicate"><img src="https://agentmods.dev/badge/skills/agents-inc/skills/ai-infrastructure-replicate.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,591 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 505
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
  • medium Excessive Agency · line 498
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.04591
Opus 5 $0.00019 $0.02295
Sonnet 5 $0.00008 $0.00918
Haiku 4.5 $0.00004 $0.00459

Measured 8d ago against content hash a4338c01cb13, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ai-infrastructure-replicate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/ai-infrastructure-replicate/SKILL.md · 532 lines

How it starts

The opening of the file, as written. The whole thing — 532 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Replicate SDK Patterns

Quick Guide: Use the replicate npm package to run open-source ML models on serverless GPUs. Use replicate.run() for synchronous execution that returns output directly, replicate.stream() for SSE-based streaming, or replicate.predictions.create() for async background jobs with webhook notifications. Models are referenced as owner/model (uses latest version) or owner/model:version (pinned). File outputs are FileOutput objects implementing ReadableStream. Cold starts are expected for infrequently-used models -- use deployments with min_instances to keep models warm.


<critical_requirements>

CRITICAL: Before Using This Skill

All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering, import type, named constants)

(You MUST never hardcode API tokens -- always use environment variables via process.env.REPLICATE_API_TOKEN)

(You MUST handle FileOutput objects for models that return files -- do not assume outputs are plain strings or URLs)

(You MUST validate webhooks using validateWebhook() from the replicate package -- never trust unverified webhook payloads)

(You MUST account for cold starts when running infrequently-used models -- use deployments for latency-sensitive applications)

(You MUST specify model versions (owner/model:version) in production to ensure reproducible results -- unversioned references use the latest, which can change)

</critical_requirements>


Auto-detection: Replicate, replicate, replicate.run, replicate.stream, replicate.predictions, replicate.deployments, replicate.trainings, replicate.models, FileOutput, validateWebhook, REPLICATE_API_TOKEN, serverless GPU, cold start, webhook_events_filter

When to use:

  • Running open-source ML models (Llama, Stable Diffusion, Whisper, etc.) without managing GPU infrastructure
  • Generating images, transcribing audio, running LLMs, or any ML inference via API
  • Streaming LLM output in real-time with server-sent events
  • Processing predictions asynchronously with webhook notifications
  • Fine-tuning models with custom training data
  • Running models on dedicated hardware with custom scaling via deployments

Read the full file on GitHub · 532 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 532 lines · 39 tokens per session scan A a4338c01cb13

Subscribe to this mod's changes

ai-infrastructure-replicate is a skill published in the GitHub repository agents-inc/skills (24 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 4,591 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

typescript-strict

Use this skill when writing or reviewing TypeScript code with strict mode in WrongStack. Triggers: user mentions "TypeScript", "strict", "type error", "type safety", "narrowing", "branded type", "discriminated union", "noUncheckedIndexedAccess".

WrongStack/WrongStack · 63 tokens

node-modern

Use this skill when writing, reviewing, or refactoring Node.js >= 22 TypeScript code in WrongStack. Triggers: ESM imports, fetch usage, AbortSignal, node: protocol, Web Streams, or any async patterns.

WrongStack/WrongStack · 52 tokens

pytorch-lightning

Deep learning framework (PyTorch Lightning). Organize PyTorch code into LightningModules, configure Trainers for multi-GPU/TPU, implement data pipelines, callbacks, logging (W&B, TensorBoard), distributed training (DDP, FSDP, DeepSpeed), for scalable neural network training.

foryourhealth111-pixel/Vibe-Skills · 65 tokens

date-threshold-arithmetic

Date comparisons at thresholds fail due to fractional days.

fabioc-aloha/Alex_Skill_Mall · 16 tokens

ts-debug

TypeScript/Node debugging expert. Use when the user needs to debug, profile, or trace TypeScript or Node.js code — e.g. "how do I debug this", "find the memory leak", "why is this slow", "add a breakpoint", "profile this function", "why won't the process exit".

berekvolgyipeter/dotclaude · 68 tokens

security-best-practices

Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not…

foryourhealth111-pixel/Vibe-Skills · 73 tokens