# Controlled generation

> Controlled generation is an open-source agent skill for design and media. Generates new images that keep a source image's composition while changing the look. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/Runware/runware-skills/tree/main/skills/controlled-generation
- **Repository:** https://github.com/runware/runware-skills
- **GitHub stars:** 8
- **License:** MIT
- **Skill name:** controlled-generation
- **Collection:** https://github.com/Runware/runware-skills
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media)
- **Listing updated:** 2026-12-03

## About

This skill guides an agent through producing a new image whose layout, outlines, pose or 3D perspective match a source picture while the style, subject or finish is rewritten from a text prompt. The agent first extracts a structural control map from the source with a ControlNet preprocessor (Canny edges, depth, OpenPose or segmentation), then runs an image generation call conditioned on that map with a matching ControlNet attached to the base model.

The workflow covers choosing the structure to hold, confirming the preprocessor and ControlNet models are live and compatible with the chosen base, and tuning how strongly the guide steers the output through weight, the active step window, and control mode. For a set of variations it reuses one guide image and changes only the prompt. It also includes a routing template for picking the pipeline and a quality check for whether structure is held at the right strength.

It expects an agent with access to the Runware API and its schema and model lookup tools, plus a source image as a URL or base64 string. Canny edge-locked, OpenPose pose-driven and depth-guided interior examples are provided as reference material.

## When your agent uses it

> Lock the composition of a generated image to a structural guide while you change everything else. Use when the user says "same pose, new character", "keep this layout, restyle it", "match this sketch", "turn my floor plan into a render", "same product silhouette, different finish", or wants interior redesign, sketch-to-render, or controlled asset variations. A control map (pose, edges, depth, segmentation) holds the structure, the prompt brings the new look. To keep a character's identity consistent rather than just its structure, use character-consistency.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Runware/runware-skills/tree/HEAD/skills/controlled-generation)
- [License: MIT](https://github.com/Runware/runware-skills/tree/HEAD/skills/controlled-generation)

## Features

- **Structure extraction:** Builds control maps from a source image using edge, depth, pose or segmentation preprocessors.
- **Conditioned generation:** Runs image generation guided by a matching ControlNet so the composition carries over.
- **Structure strength tuning:** Adjusts weight, step window and control mode to balance strict tracing against creative freedom.
- **Canny threshold control:** Sets low and high Canny thresholds to decide how much edge detail is retained.
- **Consistent variation sets:** Reuses one guide image across calls so a batch shares the same composition.
- **Model pairing checks:** Confirms the preprocessor and ControlNet are live and built for the chosen base model.

## Good for

- Restyle a room photo into a different interior design while keeping the layout
- Turn a rough sketch into a finished render
- Generate new character poses that match a reference pose
- Create product finish variations that keep the same silhouette
- Produce multiple game asset variants with identical outlines

## Install

### Claude Code

This skill ships in the `skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Runware/runware-skills
/plugin install skills@runware
```

Or copy only this skill to `~/.claude/skills/controlled-generation`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Runware/runware-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/controlled-generation &&
cp -R "$tmp/skills/controlled-generation" ~/.claude/skills/controlled-generation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/controlled-generation` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/controlled-generation` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Runware/runware-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/controlled-generation &&
cp -R "$tmp/skills/controlled-generation" ~/.agents/skills/controlled-generation &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/controlled-generation` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/controlled-generation` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Runware/runware-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/controlled-generation &&
cp -R "$tmp/skills/controlled-generation" ~/.cursor/skills/controlled-generation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/controlled-generation` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Runware/runware-skills.git --path skills/controlled-generation
```

Or copy the folder to `~/.gemini/skills/controlled-generation` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/controlled-generation`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Runware/runware-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/controlled-generation &&
cp -R "$tmp/skills/controlled-generation" ~/.copilot/skills/controlled-generation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/controlled-generation` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Runware/runware-skills.git
```

Then copy `runware-skills/skills/controlled-generation` into your agent's skills folder as `controlled-generation`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What inputs does Controlled generation need?

A source image to take structure from, which can be a photo, sketch, render or existing asset. The agent also needs a prompt describing the new look and a choice of structure to preserve.

### Which structure types can Controlled generation preserve?

Outlines via Canny edges, human pose, 3D layout and perspective via depth, and scene regions via segmentation. Soft edges are also listed as a preprocessor option.

### Which models does Controlled generation use?

It names FLUX.1 dev with FLUX Union Pro ControlNets for Canny, depth and pose, and SDXL alternatives for Canny and depth. The agent is told to confirm each model is live before calling it.

### Does Controlled generation keep a character's identity consistent?

No. The skill points to a separate character-consistency skill for keeping identity, since this one only holds composition.

### How do I install Controlled generation in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/controlled-generation to use it in all your projects, or to .claude/skills/controlled-generation in one project. Or install the skills plugin, which includes it: /plugin marketplace add Runware/runware-skills, then /plugin install skills@runware.

### Does Controlled generation run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Controlled generation?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Controlled generation?

The closest alternatives to Controlled generation are Character consistency, Imagegen, Game assets 2d, Photoreal stills and Composite scene.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Character consistency](https://ai-powered.com/skills/character-consistency): Character consistency is an open-source agent skill for design and media.
- [Imagegen](https://ai-powered.com/skills/imagegen): Imagegen is an open-source agent skill for design and media.
- [Game assets 2d](https://ai-powered.com/skills/game-assets-2d): Game assets 2d is an open-source agent skill for design and media.
- [Photoreal stills](https://ai-powered.com/skills/photoreal-stills): Photoreal stills is an open-source agent skill for design and media.
- [Composite scene](https://ai-powered.com/skills/composite-scene): Composite scene is an open-source agent skill for design and media.
- [Animate image](https://ai-powered.com/skills/animate-image): Animate image is an open-source agent skill for design and media.
- [Image replicator](https://ai-powered.com/skills/image-replicator): Image replicator is an open-source agent skill for design and media.
- [Product photography](https://ai-powered.com/skills/product-photography): Product photography is an open-source agent skill for design and media.

---
Source: https://ai-powered.com/skills/controlled-generation
