Replicate Imagery
Thin routing + brand-alignment skill for AI image generation and editing on Replicate. Delegates substantive prompting guidance to Replicate's upstream prompt-images skill and model discovery to the replicate MCP server. This skill is the plugin's entry point that says WHEN to reach for Replicate and HOW it composes with the plugin's other visual capabilities.
When to use this skill
You want to add a visual artifact to a doc / book / report and none of these fit:
Fires when the goal is one of:
- Illustrations — decorative or narrative images for chapters, sections, blog posts
- Hero images — top-of-page visuals for docs shared externally
- Character / concept art — figures for creative writing, book covers, brand mascots
- Photorealistic scenes — mockups, product-in-context imagery, scene composition
- Style-transferred images — restyling existing images to match a brand aesthetic
- Image editing — inpaint, background removal, upscaling, prompt-driven edits
Prerequisites
REPLICATE_API_TOKEN environment variable — get one at replicate.com/account/api-tokens. Set in your shell env so the MCP server picks it up:
# PowerShell (per-session)
$env:REPLICATE_API_TOKEN = 'r8_...'
# PowerShell (persistent, user scope)
[System.Environment]::SetEnvironmentVariable('REPLICATE_API_TOKEN', 'r8_...', 'User')
# bash / zsh
export REPLICATE_API_TOKEN=r8_...
Do NOT commit the token to any config file. The plugin's shipped .vscode/mcp.json references it via ${env:REPLICATE_API_TOKEN} so it stays out of source control.
The replicate MCP server — run setup-dependencies once after installing or updating the plugin. It installs the reviewed replicate-mcp@0.9.0 pin through npm's configured registry; the bundled Node launcher starts it on the first Replicate tool invocation. Use setup's --check-updates mode to compare the pin with the stable dist-tag before a release.
Upstream Replicate skills (recommended, one-shot) — install once per project:
npx skills add replicate/skills
Pulls in five agent skills authored by Replicate covering the substantive prompting knowledge this thin skill delegates to:
| Upstream skill |
What it covers |
find-models |
Searching models, browsing collections, reading schemas, picking the right model |
compare-models |
Evaluating by cost, speed, quality, capabilities |
run-models |
Creating predictions, polling, webhooks, streaming, file handling, multi-model workflows |
prompt-images |
Prompting techniques: photographic language, text rendering, style transfer, character consistency, inpainting |
prompt-videos |
Prompting techniques for video: scene, camera motion, audio/dialogue, time-coded multi-shot, style control |
Update with npx skills update. Remove with npx skills remove replicate.
Model selection
Replicate hosts thousands of models. Working set for illustration as of 2026-07:
Discover current models via the MCP tool: ask the agent "search Replicate for <capability> models" — the replicate MCP calls models.search under the hood and returns current results with cost, hardware, and capability metadata. Per-model page at replicate.com/<owner>/<model> shows pricing and interactive playground.
Model list evolves fast. If a recommendation here is stale, the upstream find-models skill has current model-discovery guidance and the MCP does live discovery.
Brand alignment
For illustrations that should feel on-brand, weave color hex codes from your project's .github/config/brand-palette.json into the prompt. Example:
"A minimalist illustration of a person coding at a desk, dominant color emerald #10b981 with deep slate #0f172a accents, cyan #06b6d4 highlight on the monitor, clean vector style, no text."
Per-project brands: each project overrides the palette in its own .github/config/brand-palette.json.
Best model choices for brand-consistent output:
recraft-ai/recraft-v3 — strongest color-guidance adherence, vector-friendly
ideogram-ai/ideogram-v3 — respects color hints, best if the image includes readable text
black-forest-labs/flux-* — interprets colors well but with less strict adherence
Output handling
- Default output location:
assets/generated/<slug>-<timestamp>.png
- Consider adding
assets/generated/ to .gitignore — ML-generated images are large and often iterative
- Keep curated finals in
assets/ (not assets/generated/)
- For book / report embedding, downscale to target print DPI before committing to keep the git tree light
Cost awareness
Replicate charges per prediction. Approximate costs for image generation as of 2026-07 (verify current at replicate.com/<model>):
| Model |
Approx. cost per image |
black-forest-labs/flux-schnell |
~$0.003 |
black-forest-labs/flux-dev |
~$0.025 |
black-forest-labs/flux-1.1-pro |
~$0.04 |
ideogram-ai/ideogram-v3 |
~$0.09 |
recraft-ai/recraft-v3 |
~$0.04 |
| Video models |
~$0.10-$5.00 per second |
A measured iteration session with multiple stock media generations cost roughly $1.83. Individual illustrations are cheap; volume adds up.
Set a spending cap at replicate.com/account/billing if runaway costs are a concern.
Composition with plugin skills
- Big Idea gate first: run
chart-big-idea Step 0.5 (earn-a-figure gate) before generating. Skips wasted API calls for figures that shouldn't exist.
- Verify after: run
render-verify to check the generated image actually communicates what you asked for. AI-generated images fail Prose-coupling surprisingly often (prose says X, image shows Y).
- Iterate cheap, publish expensive: FLUX-schnell for iteration, FLUX-1.1-pro or Ideogram for the final.
- Style-lock for a series: for a book or multi-chapter report, lock model + seed + palette hints across figures so the visual family reads as one voice. Ideogram and Recraft handle this best.
Boundaries
- Does not itself run predictions — dispatches to the
replicate MCP server which invokes the Replicate HTTP API. Requires setup-dependencies to have installed the reviewed runtime; verify with the plugin install verifier.
- Does not manage the API token — user brings their own via
REPLICATE_API_TOKEN env var. If the var is unset, the MCP server fails on first invocation, not at config load.
- Does not cache or dedupe predictions — same prompt run twice = two paid predictions. Save outputs you want to keep.
- Does not select the model automatically — the agent chooses based on the prompt + this skill's recommendations. Model choice matters for both cost and quality.
- Does not do TTS, music, code generation, or LLM inference on Replicate — those are separate categories the plugin does not currently route to.
Falsifiability
Revisit by 2026-10-30 (90 days) or sooner if:
- The recommended model list is stale (≥3 models retired or superseded by newer versions)
- The upstream
replicate/skills bundle changes structure such that the composition callouts here point at moved content
- Heirs consistently reach for this skill for artifact types the routing table above says NOT to use (indicates the boundary is unclear)
- Cost estimates in the table are off by >2x versus real Replicate pricing at 2026-10 recheck
- The
replicate-mcp npm package moves, renames, or changes invocation shape
- Zero heir uses the skill in the observation window (parking-lot candidate — the plugin scope was wrong to activate)
1---2name: replicate-imagery3description: Route AI image generation and editing requests to Replicate (FLUX, Ideogram, Recraft, SDXL, imagen) via the bundled `replicate` MCP server. Use when a document, book, or report needs an illustration, hero image, character/concept art, photorealistic scene, or style-transferred image that neither Flint (data charts), Mermaid (technical diagrams), nor svg-banner (brand banners) can produce. Composes with Replicate's upstream agent skills (prompt-images, find-models, run-models, compare-models, prompt-videos) installable via `npx skills add replicate/skills`. Requires `REPLICATE_API_TOKEN`.4---56# Replicate Imagery78Thin routing + brand-alignment skill for AI image generation and editing on Replicate. Delegates substantive prompting guidance to Replicate's upstream `prompt-images` skill and model discovery to the `replicate` MCP server. This skill is the plugin's entry point that says WHEN to reach for Replicate and HOW it composes with the plugin's other visual capabilities.910## When to use this skill1112You want to add a visual artifact to a doc / book / report and none of these fit:1314| Artifact | Not this skill — use instead |15| --------------------------------------------------- | ------------------------------------------------------------------- |16| Data chart (bar, line, scatter, distribution, KPI) | [`flint-chart`](../flint-chart/SKILL.md) |17| Technical / architectural / flow diagram | [`markdown-mermaid`](../markdown-mermaid/SKILL.md) |18| Brand banner (hero header for a doc) | [`svg-banner`](../svg-banner/SKILL.md) |19| Deterministic hand-authored figure (dataset-backed) | [`figure-generator`](../figure-generator/SKILL.md) |20| Print-quality book figure with typography grammar | [`print-svg-style-guide`](../print-svg-style-guide/SKILL.md) |2122Fires when the goal is one of:2324- **Illustrations** — decorative or narrative images for chapters, sections, blog posts25- **Hero images** — top-of-page visuals for docs shared externally26- **Character / concept art** — figures for creative writing, book covers, brand mascots27- **Photorealistic scenes** — mockups, product-in-context imagery, scene composition28- **Style-transferred images** — restyling existing images to match a brand aesthetic29- **Image editing** — inpaint, background removal, upscaling, prompt-driven edits3031## Prerequisites32331. **`REPLICATE_API_TOKEN` environment variable** — get one at [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens). Set in your shell env so the MCP server picks it up:3435 ```pwsh36 # PowerShell (per-session)37 $env:REPLICATE_API_TOKEN = 'r8_...'3839 # PowerShell (persistent, user scope)40 [System.Environment]::SetEnvironmentVariable('REPLICATE_API_TOKEN', 'r8_...', 'User')41 ```4243 ```bash44 # bash / zsh45 export REPLICATE_API_TOKEN=r8_...46 ```4748 Do NOT commit the token to any config file. The plugin's shipped `.vscode/mcp.json` references it via `${env:REPLICATE_API_TOKEN}` so it stays out of source control.49502. **The `replicate` MCP server** — run `setup-dependencies` once after installing or updating the plugin. It installs the reviewed `replicate-mcp@0.9.0` pin through npm's configured registry; the bundled Node launcher starts it on the first Replicate tool invocation. Use setup's `--check-updates` mode to compare the pin with the stable dist-tag before a release.51523. **Upstream Replicate skills (recommended, one-shot)** — install once per project:5354 ```pwsh55 npx skills add replicate/skills56 ```5758 Pulls in five agent skills authored by Replicate covering the substantive prompting knowledge this thin skill delegates to:5960 | Upstream skill | What it covers |61 | --- | --- |62 | `find-models` | Searching models, browsing collections, reading schemas, picking the right model |63 | `compare-models` | Evaluating by cost, speed, quality, capabilities |64 | `run-models` | Creating predictions, polling, webhooks, streaming, file handling, multi-model workflows |65 | `prompt-images` | Prompting techniques: photographic language, text rendering, style transfer, character consistency, inpainting |66 | `prompt-videos` | Prompting techniques for video: scene, camera motion, audio/dialogue, time-coded multi-shot, style control |6768 Update with `npx skills update`. Remove with `npx skills remove replicate`.6970## Model selection7172Replicate hosts thousands of models. Working set for illustration as of 2026-07:7374| Need | Recommended model | Notes |75| --- | --- | --- |76| Fast, cheap illustrations | [`black-forest-labs/flux-schnell`](https://replicate.com/black-forest-labs/flux-schnell) | Very fast, low cost; iterate freely |77| Higher quality, still fast | [`black-forest-labs/flux-dev`](https://replicate.com/black-forest-labs/flux-dev) | Balance of quality and speed |78| Premium quality, hero images | [`black-forest-labs/flux-1.1-pro`](https://replicate.com/black-forest-labs/flux-1.1-pro) or `flux-1.1-pro-ultra` | Premium; `ultra` variant supports very high resolution |79| Great text-in-image rendering | [`ideogram-ai/ideogram-v3`](https://replicate.com/ideogram-ai/ideogram-v3) | Best for images with readable typography (signage, quotes, labels) |80| Vector-style, brand-consistent | [`recraft-ai/recraft-v3`](https://replicate.com/recraft-ai/recraft-v3) | Cleaner, designed feel; respects color guidance well |81| Photorealistic scenes | [`google/imagen-4`](https://replicate.com/google/imagen-4) | Google's photorealism model |82| Image editing via prompt | [`black-forest-labs/flux-kontext-pro`](https://replicate.com/black-forest-labs/flux-kontext-pro) | Edit existing images with natural-language instructions |83| Inpainting (fill masked region) | [`black-forest-labs/flux-fill-pro`](https://replicate.com/black-forest-labs/flux-fill-pro) | Mask + prompt → composited output |84| Upscaling | [`philz1337x/clarity-upscaler`](https://replicate.com/philz1337x/clarity-upscaler) or [`lucataco/real-esrgan`](https://replicate.com/lucataco/real-esrgan) | Real-ESRGAN is the classic cheap option; Clarity has finer detail preservation |85| Background removal | [`851-labs/background-remover`](https://replicate.com/851-labs/background-remover) | Alpha channel output |8687**Discover current models** via the MCP tool: ask the agent "search Replicate for `<capability>` models" — the `replicate` MCP calls `models.search` under the hood and returns current results with cost, hardware, and capability metadata. Per-model page at `replicate.com/<owner>/<model>` shows pricing and interactive playground.8889Model list evolves fast. If a recommendation here is stale, the upstream `find-models` skill has current model-discovery guidance and the MCP does live discovery.9091## Brand alignment9293For illustrations that should feel on-brand, weave color hex codes from your project's `.github/config/brand-palette.json` into the prompt. Example:9495> "A minimalist illustration of a person coding at a desk, dominant color emerald `#10b981` with deep slate `#0f172a` accents, cyan `#06b6d4` highlight on the monitor, clean vector style, no text."9697Per-project brands: each project overrides the palette in its own `.github/config/brand-palette.json`.9899Best model choices for brand-consistent output:100101- `recraft-ai/recraft-v3` — strongest color-guidance adherence, vector-friendly102- `ideogram-ai/ideogram-v3` — respects color hints, best if the image includes readable text103- `black-forest-labs/flux-*` — interprets colors well but with less strict adherence104105## Output handling106107- Default output location: `assets/generated/<slug>-<timestamp>.png`108- Consider adding `assets/generated/` to `.gitignore` — ML-generated images are large and often iterative109- Keep curated finals in `assets/` (not `assets/generated/`)110- For book / report embedding, downscale to target print DPI before committing to keep the git tree light111112## Cost awareness113114Replicate charges per prediction. Approximate costs for image generation as of 2026-07 (verify current at `replicate.com/<model>`):115116| Model | Approx. cost per image |117| ---------------------------------- | ----------------------- |118| `black-forest-labs/flux-schnell` | ~$0.003 |119| `black-forest-labs/flux-dev` | ~$0.025 |120| `black-forest-labs/flux-1.1-pro` | ~$0.04 |121| `ideogram-ai/ideogram-v3` | ~$0.09 |122| `recraft-ai/recraft-v3` | ~$0.04 |123| Video models | ~$0.10-$5.00 per second |124125A measured iteration session with multiple stock media generations cost roughly $1.83. Individual illustrations are cheap; volume adds up.126127Set a spending cap at [replicate.com/account/billing](https://replicate.com/account/billing) if runaway costs are a concern.128129## Composition with plugin skills130131- **Big Idea gate first**: run [`chart-big-idea`](../chart-big-idea/SKILL.md) Step 0.5 (earn-a-figure gate) before generating. Skips wasted API calls for figures that shouldn't exist.132- **Verify after**: run [`render-verify`](../render-verify/SKILL.md) to check the generated image actually communicates what you asked for. AI-generated images fail Prose-coupling surprisingly often (prose says X, image shows Y).133- **Iterate cheap, publish expensive**: FLUX-schnell for iteration, FLUX-1.1-pro or Ideogram for the final.134- **Style-lock for a series**: for a book or multi-chapter report, lock model + seed + palette hints across figures so the visual family reads as one voice. Ideogram and Recraft handle this best.135136## Boundaries137138- Does not itself run predictions — dispatches to the `replicate` MCP server which invokes the Replicate HTTP API. Requires `setup-dependencies` to have installed the reviewed runtime; verify with the plugin install verifier.139- Does not manage the API token — user brings their own via `REPLICATE_API_TOKEN` env var. If the var is unset, the MCP server fails on first invocation, not at config load.140- Does not cache or dedupe predictions — same prompt run twice = two paid predictions. Save outputs you want to keep.141- Does not select the model automatically — the agent chooses based on the prompt + this skill's recommendations. Model choice matters for both cost and quality.142- Does not do TTS, music, code generation, or LLM inference on Replicate — those are separate categories the plugin does not currently route to.143144## Falsifiability145146Revisit by **2026-10-30** (90 days) or sooner if:147148- The recommended model list is stale (≥3 models retired or superseded by newer versions)149- The upstream `replicate/skills` bundle changes structure such that the composition callouts here point at moved content150- Heirs consistently reach for this skill for artifact types the routing table above says NOT to use (indicates the boundary is unclear)151- Cost estimates in the table are off by >2x versus real Replicate pricing at 2026-10 recheck152- The `replicate-mcp` npm package moves, renames, or changes invocation shape153- Zero heir uses the skill in the observation window (parking-lot candidate — the plugin scope was wrong to activate)