replicate-images

replicate-images is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 84 tokens per session (3,306 once invoked), scanned A, original, MIT.

A guide to generating and editing images through the Replicate API, a service that lets applications run image-generation models. It covers model-specific prompt writing and image-generation settings.

In plain words
What is it for?
Use it to build Replicate image-generation requests, edit images, combine references, add readable text, or write prompts for different model families.
Why use it?
It helps you choose suitable image dimensions, resolution, seeds, formats, references, and inpainting approaches when an image model does not follow instructions reliably.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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.

agentmods
npx agentmods add skills/ericrisco/rsc-harness/replicate-images
Any agent
npx skills add ericrisco/rsc-harness --skill replicate-images
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

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 replicate-images

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/replicate-images.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/replicate-images)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/replicate-images"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/replicate-images.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,306 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00084 $0.03306
Opus 5 $0.00042 $0.01653
Sonnet 5 $0.00017 $0.00661
Haiku 4.5 $0.00008 $0.00331

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

Security

Grade A, and why

replicate-images 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/replicate-images/SKILL.md · 242 lines

How it starts

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

Replicate image generation & prompt craft

This skill is the image layer on top of Replicate: how to call an image model from code and how to write a prompt that the specific model family actually obeys. Two competencies braided together — mechanics (run path, output handling, levers, image inputs) and prompt shape per family (Gemini/Nano-Banana wants prose, Flux wants dense description, gpt-image wants instructions). If the question is platform plumbing — auth, billing, deployments, webhooks, running an LLM or audio model — that is replicate, not this skill.

Pinned facts (verified 2026-06-02). Slugs and parameter names are the load-bearing details that make code run, and they drift — the full per-model schema lives in references/models.md so this file stays evergreen. Confirm any exact slug/param on the model page before quoting it as fact.

First move

export REPLICATE_API_TOKEN=r8_...     # both clients read this automatically
npm install replicate                  # Node; pip install replicate for Python
import Replicate from "replicate";
const replicate = new Replicate();     // reads REPLICATE_API_TOKEN from env

const output = await replicate.run("google/nano-banana-2", {
  input: { prompt: "a red ceramic mug on a sunlit wooden table, soft morning light" },
});
console.log(output[0].url());          // hosted URL of the first image

Rule: do not hand-build the token into the client — let new Replicate() read the env var. Why: a hardcoded token leaks into git and logs. Python is the same shape: replicate.run("google/nano-banana-2", input={"prompt": ...}).

Pick the model

Pick by the dominant requirement, not by hype. Full input schemas and rough cost tiers per model are in references/models.md.

Need Model slug Why
Best editing + multi-image composition google/nano-banana-2 Gemini 3.1 Flash Image; up to 14 reference images, conversational edits
Top-quality / hard compositions, budget allows google/nano-banana-pro Gemini 3 Pro Image; ~2x the NB2 cost at 1K
Dense photoreal, fine control of light/lens black-forest-labs/flux-1.1-pro rewards rich descriptive prompts; exposes seed, size
Fast/cheap draft loop black-forest-labs/flux-schnell sync-optimized, lowest latency for iterating
Strict instruction-following + crisp text openai/gpt-image-1 (OpenAI on Replicate) follows complex instructions; needs your own OpenAI key wired in
Up-to-4K + batch/sequential output bytedance/seedream-4 unified text-to-image and editing, multi-reference

Read the full file on GitHub · 242 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. 2d ago First seen · 242 lines · 84 tokens per session scan A ed5d3a167aa9

Subscribe to this mod's changes

replicate-images is a skill published in the GitHub repository ericrisco/rsc-harness (65 stars, last pushed today), licensed MIT. It adds 84 tokens to every session and 3,306 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

imagethis

Generate an AI image from a text prompt and load it into context, in one step. Routes to FLUX / SDXL / Ideogram / Recraft (Replicate) or gpt-image-2 (OpenAI). Use when a message starts with "imagethis:", or the user says "generate an image", "make a picture/logo of…", or "draw…".

dbbuilder-org/imagethis · 82 tokens

moai-domain-svg-infographic

Author editable SVG technical infographics — architecture, flow, comparison, hierarchy — by computing the layout numerically before writing markup, then rendering a 2x PNG via headless Chromium. Carries a CJK-first font stack, a deterministic source lint, and mermaid-vs-SVG selection rules.

modu-ai/moai-adk · 68 tokens

byted-seedream-image-generate

Generate high-quality images from text prompts using Volcano Engine Seedream models. Supports multiple artistic styles and aspect ratios. Use this skill when users want to create images from text descriptions, generate artwork in various styles, create visual content for creative projects, or need AI-powered image…

bytedance/agentkit-samples · 65 tokens

videoagent-image-studio

Tired of juggling 8 API keys? This skill gives you one-command access to Midjourney, Flux, Ideogram, and more, with zero setup. Use when you want to generate any image without worrying about API keys.

pexoai/pexo-skills · 53 tokens

flux-3-product-ads

Use when building a finished product ad from FLUX 3 - shot design, voiceover, action-to-word sync, evidence-gated copy, deterministic assembly, and QC gates that catch clipped audio, floating products, off-model plates, and reports that claim a pass the build did not give.

black-forest-labs/skills · 66 tokens

bfl-api

BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.

black-forest-labs/skills · 38 tokens