ericrisco/rsc-harness / skills/replicate-images
replicate-images
VerifiedUse when generating or editing images through the Replicate API, or when a modern image model keeps ignoring the prompt — choosing aspect ratio, resolution, seed and output format, image-to-image, multi-reference composition, text-driven inpainting, readable text inside a generated image, and structuring prompts per model family. NOT general Replicate platform, auth or non-image models (that is `replicate`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.1 KB |
| evals/README.md | markdown | 1.1 KB |
| evals/cases.yaml | config | 3.1 KB |
| references/editing-recipes.md | markdown | 4.0 KB |
| references/models.md | markdown | 5.7 KB |
| scripts/verify.shexecutable | script | 6.6 KB |
references/editing-recipes.md
View on GitHub# Editing & composition recipes
Copy-paste starting points. Each = goal + model + input shape + prompt template. Default to
`google/nano-banana-2` for edits and composition; swap in `nano-banana-pro` when fidelity matters.
Pass local files as bytes (`await readFile(path)`), never as a bare path string. See `models.md` for
the full input schema and allowed `aspect_ratio` / `output_resolution` values.
```javascript
import Replicate from "replicate";
import { readFile, writeFile } from "node:fs/promises";
const replicate = new Replicate();
async function save(output, path) {
const blob = await output[0].blob();
await writeFile(path, Buffer.from(await blob.arrayBuffer()));
}
```
---
## 1. Object / person removal
Model: `google/nano-banana-2`. Input: one source image + edit prompt; keep the rest intact.
```javascript
const src = await readFile("./scene.jpg");
const out = await replicate.run("google/nano-banana-2", {
input: {
prompt: "Remove the person standing on the left. Keep everything else identical, "
+ "including the lighting and the shadows on the ground.",
image_input: [src],
aspect_ratio: "match_input_image",
},
});
await save(out, "scene-clean.jpg");
```
Idiom: name what to remove **and** "keep everything else identical" so the model edits rather than
re-renders the whole frame.
---
## 2. Background swap
Model: `google/nano-banana-2`. Input: subject image + description of the new background.
```text
prompt: "Replace the background with a softly blurred sunlit beach at golden hour.
Keep the subject, their pose, and the rim lighting on their hair unchanged."
image_input: [subject]
```
---
## 3. Style transfer
Model: `google/nano-banana-2` (or `flux-1.1-pro` for painterly looks). Input: content image + a
described target style (or a style reference image).
```text
prompt: "Re-render this photo in the style of a 1960s screen-printed travel poster:
flat color blocks, limited palette, bold outlines. Preserve the composition."
image_input: [content]
```
For a reference-driven style, pass both images and say which is content and which is style.
---
## 4. Two-image composition
Model: `google/nano-banana-2`. Input: two (up to 14) references in `image_input`; describe how they
combine.
```javascript
const product = await readFile("./bottle.png");
const scene = await readFile("./kitchen.jpg");
const out = await replicate.run("google/nano-banana-2", {
input: {
prompt: "Place the bottle from image 1 on the kitchen counter from image 2, "
+ "matching the scene's warm lighting and adding a soft contact shadow.",
image_input: [product, scene],
aspect_ratio: "4:5",
output_resolution: "2K",
},
});
await save(out, "composite.jpg");
```
---
## 5. Product shot with rendered text
Model: `google/nano-banana-2` or `openai/gpt-image-1` (both render readable text). Quote the literal string,
name the font.
```javascript
const photo = await readFile("./product.jpg");
const logo = await readFile("./logo.png");
const out = await replicate.run("google/nano-banana-2", {
input: {
prompt: "Compose a 4:5 advertisement: the product from image 1 centered on a clean "
+ "gradient background, the logo from image 2 in the top-left corner, and a "
+ "headline reading \"Summer Sale\" in bold sans-serif across the bottom.",
image_input: [photo, logo],
aspect_ratio: "4:5",
output_format: "png",
},
});
await save(out, "ad.png");
```
Idiom: literal text in quotes fixes the characters; the named font fixes the rendering style.
---
## 6. Character consistency across images
Model: `google/nano-banana-2` (or `bytedance/seedream-4` for batches). Input: one or more reference
images of the character; restate the identity each call.
```text
prompt: "Using the character in the reference image, generate the same person now sitting
at a cafe table reading a book. Keep the face, hairstyle, and outfit identical."
image_input: [character]
```
For a coherent set, prefer SeeDream's batch/sequential generation and ask for N poses with the same
lighting in one call.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |