Spiral gives your agent every tool with one account. Browse the tools →

How to Add the Style Transfer with JSON Prompting Skill

Image skillUse when writing a detailed image prompt as a JSON object (JSON prompting: subject, composition, environment, lighting, camera, style and negatives as fields), when the user asks for help writing or structuring an image prompt, or when the inferred intent is to apply the style of one or more reference images to a new subject (style transfer). Covers the JSON prompt structure and checklist, single-reference analysis, multi-reference style mixing, vocabulary for photography/painterly/graphic/3D styles, and common mistakes.

How to add Style Transfer with JSON Prompting to your agent

Pick the way that suits you. Each takes about two minutes.

Save SKILL.md into your agent's skills

  1. Download the skill

    Claude Code, and other agents that read Agent Skills, load it from this folder when they start.

    mkdir -p ~/.claude/skills/style-transfer
    curl -fsSL https://spiral.ai/skills/style-transfer/SKILL.md -o ~/.claude/skills/style-transfer/SKILL.md
  2. Connect Spiral

    The skill runs its tools through Spiral. Send your agent this message once to set it up.

    set up https://spiral.ai/SKILL.md

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init
  2. Read the skill

    Built-in skills are on for every organization: the CLI prints this one with all its files.

    spiral agent-skills get style-transfer --json

Read it from the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Fetch the skill

    The answer holds SKILL.md and every other file of the skill, in path order.

    curl https://api.spiral.ai/v1/skills/style-transfer \
      -H "Authorization: Bearer $SPIRAL_API_KEY"

Then ask your agent for the task: it loads Style Transfer with JSON Prompting when a request matches the skill's description.

When to use (description)

Use when writing a detailed image prompt as a JSON object (JSON prompting: subject, composition, environment, lighting, camera, style and negatives as fields), when the user asks for help writing or structuring an image prompt, or when the inferred intent is to apply the style of one or more reference images to a new subject (style transfer). Covers the JSON prompt structure and checklist, single-reference analysis, multi-reference style mixing, vocabulary for photography/painterly/graphic/3D styles, and common mistakes.

Instructions

Style Transfer with JSON Prompting

Scope (prompt fidelity). This technique is for prompts you author, or when the user asks for help with a prompt. A user-written brief is sent as the user wrote it.
What Is Style Transfer?

Style transfer takes the visual style of one or more reference images and applies it to a completely new subject. The reference provides the "how it looks" (medium, texture, color palette, lighting approach), and your prompt provides the "what it shows" (new subject, scene, composition).

Core Concept: Combine the precision of JSON-structured prompts with visual reference images passed to the model. Verbal (JSON) + visual references together beat either alone.


When to Use Style Transfer
  • User provides reference image(s) and wants to match the style
  • User wants to blend multiple styles from different references
  • Consistency across multiple outputs is important (e.g. a series of images in the same style)
  • User wants to reproduce a specific art movement, technique, or artist's approach

The 3-Step Workflow
Step 1 — Analyze the Reference Image(s)

Before writing any prompt, look at the reference image(s) with your own eyes and identify these 8 properties:

PropertyWhat to Look For
Medium / MaterialsOil paint, watercolor, charcoal, photography, digital, collage, ink, pencil
Mark-making / Edge qualityVisible brushstrokes, clean vectors, rough pencil lines, soft blending, hard pixel edges
Color paletteDominant colors, saturation level, temperature (warm/cool), accent colors
Value / ContrastHigh contrast vs flat, where highlights and shadows fall, dynamic range
Texture / GrainCanvas weave, paper grain, film grain, digital noise, smooth, rough
Spatial treatmentFlat vs deep, atmospheric perspective, layering, foreground/background relationship
Detail levelTight and refined vs loose and gestural, focal sharpness vs blur
Overall vibe / MoodGenre, era, emotional tone, movement (Impressionism, noir, vaporwave, etc.)

This analysis step is critical. If you skip it and just say "in the style of the reference," the model gets a vague instruction. When you describe the specific properties you observed, the model knows exactly what to reproduce.


Step 2 — Build a JSON Prompt

Include your analysis observations as explicit fields in the JSON. Always pass the reference image(s) as visual inputs to the model alongside the JSON prompt text.

Single Reference Template:
{
  "context": "In the exact style, texture, and vibe of this reference image.",
  "subject": "[What you want to generate — new subject, new scene]",
  "medium": "[What you observed: oil on canvas, watercolor on rough paper, 35mm film, etc.]",
  "mark_making": "[What you observed: visible impasto brushwork, clean vector lines, soft charcoal smudges, etc.]",
  "color_approach": "[What you observed: muted earth tones, vibrant complementary colors, monochromatic blue, etc.]",
  "value_structure": "[What you observed: high contrast chiaroscuro, flat even values, dramatic rim lighting, etc.]",
  "texture_quality": "[What you observed: heavy canvas weave, smooth digital, organic paper grain, etc.]",
  "spatial_treatment": "[What you observed: flat decorative layering, deep atmospheric perspective, shallow DoF, etc.]",
  "detail_level": "[What you observed: tight photorealistic detail, loose gestural strokes, minimal line work, etc.]",
  "aesthetic": "[What you observed: Impressionist plein air, 1970s Polaroid nostalgia, cyberpunk neon noir, etc.]",
  "style_notes": "[Any additional observations unique to this reference]"
}
Multiple References Template (Style Mixing):
{
  "context": "Use the reference images to match medium, texture, and vibe extremely closely.",
  "subject": "[What you want to generate]",
  "reference_1_contribution": "[What to take from reference 1 — e.g. 'color palette and lighting']",
  "reference_2_contribution": "[What to take from reference 2 — e.g. 'texture and mark-making']",
  "reference_3_contribution": "[Optional — what to take from reference 3]",
  "style_blend": "[How to mix — e.g. '70% ref 1 texture, 30% ref 2 colors']",
  "medium": "[Combined medium characteristics]",
  "mark_making": "[Combined mark-making approach]",
  "color_approach": "[Combined color approach]",
  "value_structure": "[Combined value/contrast]",
  "texture_quality": "[Combined texture details]",
  "spatial_treatment": "[Combined spatial treatment]",
  "detail_level": "[Combined detail level]",
  "aesthetic": "[Combined mood/feeling]"
}

Step 3 — Generate with Reference Images

Run an image tool that takes reference images, such as Nano Banana 2.1 Edit or GPT Image 2.6 Sunburst · Edit:

  1. Pass the reference image(s) as visual inputs — pass them in the image-input field its input schema names. The model MUST see the actual images, not just your description of them.
  2. Pass the JSON prompt as text — this tells the model what to generate and what style properties to match.
  3. Choose appropriate resolution and aspect ratio — match to the intended use.

⚠️ CRITICAL: The prompt text must start with a reference instruction. Use one of these:

  • Single reference: "In the exact style and texture and vibe of this image..."
  • Multiple references: "Use the reference images to match medium, texture and vibe extremely closely."
  • Face + style: "THIS EXACT FACE and identity from the reference, in the style of..."

Without this opening instruction, the model may ignore the reference image entirely.


Style-Specific Vocabulary

Different reference styles need different vocabulary in your JSON. Use the right terms:

Photography / Realism
PropertyVocabulary Examples
Medium35mm film, medium format, digital full-frame, Polaroid instant
Mark-makingN/A — instead use: sharpness, focus falloff, grain structure
ColorColor grade (teal/orange, bleach bypass), film stock emulation (Portra 400, Velvia 50)
ValueExposure latitude, highlight rolloff, shadow detail, dynamic range
TextureFilm grain (fine/coarse), sensor noise, lens flare, chromatic aberration
SpatialDepth of field (shallow/deep), atmospheric haze, bokeh quality (creamy/busy)
DetailMicro-contrast, sharpness, softness, resolution
AestheticDocumentary, editorial, street, fashion, cinematic, snapshot
Painterly / Drawn
PropertyVocabulary Examples
MediumOil on linen, watercolor on cold-press, charcoal on toned paper, gouache, ink wash
Mark-makingImpasto, palette knife, wet-into-wet, cross-hatching, stippling, dry brush
ColorLimited palette, complementary scheme, earth tones, high-key, low-key
ValueChiaroscuro, tenebrism, flat local color, value massing
TextureCanvas weave, paper grain, tooth, varnish gloss, matte
SpatialAtmospheric perspective, flat decorative, isometric, forced perspective
DetailTight rendering, loose gesture, abstraction, focal detail vs peripheral simplification
AestheticImpressionism, Expressionism, Art Nouveau, Baroque, contemporary realism
Graphic / Digital
PropertyVocabulary Examples
MediumVector, raster, pixel art, flat illustration, cel-shaded
Mark-makingUniform line weight, variable stroke, no outlines, hard edges
ColorFlat fills, gradients, neon, pastel, limited color count
ValueFlat shading, cel shading, no shadows, ambient occlusion only
TextureSmooth, noise overlay, halftone, screenprint, risograph
SpatialIsometric, flat layers, parallax depth, no perspective
DetailMinimal, iconographic, hyper-detailed, geometric reduction
AestheticSwiss design, vaporwave, brutalist, kawaii, retro gaming
3D / Rendered
PropertyVocabulary Examples
MediumPBR materials, clay render, wireframe, toon shader
Mark-makingN/A — instead: polygon density, subdivision level, edge bevels
ColorAlbedo maps, material color, environment reflection
ValueHDR lighting, global illumination, ray-traced shadows
TextureRoughness maps, normal maps, displacement, SSS (subsurface scattering)
SpatialCamera focal length, environment scale, depth of field
DetailHigh-poly, low-poly, LOD (level of detail), micro-displacement
AestheticPixar, photorealistic archviz, stylized, miniature/tilt-shift

Worked Example: Analyzing a Reference

Suppose you receive a reference image of a moody watercolor landscape. Here's how the analysis → JSON workflow looks:

Analysis:
  • Medium: Watercolor on rough cold-press paper
  • Mark-making: Wet-into-wet washes with dry brush edges, visible paper white left as highlights
  • Color: Muted blue-grey palette with warm ochre accents, desaturated
  • Value: High contrast between dark foreground silhouettes and light misty background
  • Texture: Visible paper grain, pigment granulation in washes, bleeding edges
  • Spatial: Strong atmospheric perspective — foreground sharp and dark, background dissolving into mist
  • Detail: Foreground has tight detail, middle ground is loose, background is almost abstract
  • Vibe: Contemplative, quiet, Northern European Romantic landscape tradition
Resulting JSON (for a new subject):
{
  "context": "In the exact style and texture and vibe of this reference image.",
  "subject": "A lone lighthouse on a rocky cliff during a storm",
  "medium": "Watercolor on rough cold-press paper, visible paper white left as highlights",
  "mark_making": "Wet-into-wet washes for sky and sea, dry brush strokes for rocky cliff texture, bleeding edges where water meets land",
  "color_approach": "Muted blue-grey palette with warm ochre accents on the lighthouse and cliff. Desaturated overall. No vivid colors.",
  "value_structure": "High contrast — dark foreground rocks silhouetted against lighter misty sky. Lighthouse beam as the brightest value.",
  "texture_quality": "Visible paper grain throughout, pigment granulation in the sky washes, organic irregularities in edges",
  "spatial_treatment": "Strong atmospheric perspective — sharp foreground rocks, dissolving middle-ground waves, nearly abstract distant horizon",
  "detail_level": "Tight detail on foreground rocks and lighthouse structure, loose gestural waves in middle ground, abstract mist in background",
  "aesthetic": "Contemplative, brooding, Northern European Romantic landscape tradition. Turner meets contemporary watercolor."
}

Multi-Reference Style Mixing Example

Suppose you have:

  • Reference 1: A warm, golden-hour photograph with creamy bokeh
  • Reference 2: A textured oil painting with thick impasto brushwork

And you want to combine them:

{
  "context": "Use the reference images to match medium, texture and vibe extremely closely.",
  "subject": "A violin resting on an armchair by a window",
  "reference_1_contribution": "Golden-hour color temperature, warm directional lighting, shallow depth of field, creamy background blur",
  "reference_2_contribution": "Thick impasto brushwork, visible palette knife edges, heavy canvas texture, tactile surface quality",
  "style_blend": "70% reference 2's painterly texture and mark-making, 30% reference 1's warm lighting and color palette",
  "medium": "Oil painting on heavy linen canvas, but lit and colored like a golden-hour photograph",
  "mark_making": "Thick impasto in highlights, smoother blending in shadows, palette knife edges on the violin body",
  "color_approach": "Warm amber and gold from window light, deep shadow tones in complementary cool blues, overall warm bias",
  "value_structure": "Strong directional light from window, Rembrandt-style falloff, deep shadows with subtle detail",
  "texture_quality": "Heavy canvas weave visible through thin paint, thick ridges in light-catching areas",
  "spatial_treatment": "Shallow focus — violin sharp, background softly blurred (painted equivalent of bokeh)",
  "detail_level": "Tight rendering on violin strings and wood grain, loose suggestion for armchair fabric and curtains",
  "aesthetic": "Dutch Golden Age still life meets contemporary warm photography"
}

JSON Image Prompting (with or without a reference)

Describing a scene as a structured JSON object instead of prose gives granular control: every attribute is labeled, the structure stops you forgetting an element, and one field can be changed and regenerated. It is opt-in: use it for detailed prompts you author, or when the user asks for help with a prompt. A user's own prose brief is sent in their own words; never convert it to JSON. There is no fixed schema: adapt the keys to the subject and style. The minimal keys are subject, composition, environment, lighting, color_and_mood, camera, style and strict_negatives; for maximum control, nest them:

{
  "intent": { "summary": "[The overall goal and mood, in one sentence]" },
  "subject": {
    "description": "[Overall description]",
    "age": "[Age range]",
    "expression": "[Facial expression, emotion]",
    "hair": { "color": "", "style": "" },
    "clothing": {
      "top": { "type": "", "color": "", "details": "" },
      "bottom": { "type": "", "color": "", "details": "" }
    },
    "face": { "makeup": "", "skin": "" },
    "pose": "[Body position, gesture, action]"
  },
  "accessories": {
    "jewelry": "",
    "headwear": "",
    "props": "[Objects held or nearby]"
  },
  "environment": {
    "setting": "[Location type]",
    "elements": ["[Background detail 1]", "[Background detail 2]"],
    "atmosphere": "[Vibe]",
    "time_of_day": "[Morning, golden hour, night]",
    "weather": "[Clear, overcast, rain]"
  },
  "lighting": {
    "primary_source": "[Sun, window, studio, practical lights]",
    "direction": "[Front, back, side, rim, overhead]",
    "quality": "[Hard, soft, diffused, specular]",
    "color_temperature": "[Warm 3200K, cool 6500K, mixed]",
    "shadow_quality": "[Sharp, soft, deep, subtle]"
  },
  "camera": {
    "angle": "[Eye-level, low angle, overhead, Dutch tilt]",
    "lens": "[24mm wide, 50mm standard, 85mm portrait, 135mm tele]",
    "aperture": "[f/1.4 shallow, f/8 deep, f/16 everything sharp]",
    "shot_type": "[Close-up, medium, wide, full body, waist-up]",
    "film_stock": "[Kodak Portra 400, Fuji Velvia, digital clean]",
    "texture": "[Grain, noise, sharpness, softness]"
  },
  "color_approach": {
    "palette": "",
    "saturation": "[Vivid, muted]",
    "contrast": "[High, low, flat]",
    "color_grade": "[Teal/orange, warm, split toning]"
  },
  "style": {
    "medium": "[Photography, oil painting, digital art]",
    "genre": "",
    "era": "",
    "technique": "[Long exposure, chiaroscuro]"
  },
  "negative": {
    "artifact_suppression": "[bad anatomy, extra fingers, text, watermark, blurry]",
    "style_excludes": "[plastic skin, oversaturated, studio look]"
  }
}

What makes a detailed JSON prompt work: an intent block first grounds the model in the goal; every clothing item, accessory and background element is named, so the model cannot forget or improvise them; lighting can name two color temperatures (a 3200K warm glow on faces, a 7000K blue sky); a mirror selfie needs a rule such as "text on clothing reads forward and legible to the viewer"; and the negative block suppresses both artifacts and unwanted content (clean clothes, studio light). Style vocabulary is the same as in Style-Specific Vocabulary above.

Before sending a JSON prompt, check it covers: subject (who or what, appearance, expression, pose, clothing, accessories); composition (shot type, framing, aspect ratio, placement); environment (location, background elements, time of day, weather, atmosphere); lighting (source, direction, quality, color temperature, shadows); color (palette, saturation, contrast, grade); camera (lens, aperture, angle, film stock, grain); style (medium, genre, era, technique, rendering); negatives (artifacts to suppress, content to exclude).

Tips and mistakes:

  1. Be specific. "Brown hair" loses to "long straight chestnut brown hair falling over the shoulders with subtle honey highlights"; "nice lighting" loses to "soft diffused window light from camera left, 5600K daylight, gentle shadow gradient on the face".
  2. Self-contained, no pronouns. Each prompt stands alone: "the young woman in the white cami top walks toward the camera", never "she walks…", especially across a sequence of images.
  3. State the aspect ratio and match the use: 9:16 mobile, 16:9 YouTube, 1:1 Instagram, 2.39:1 cinematic. Without it the model picks a default.
  4. Negatives in prompts you author (negative or strict_negatives): without them the model falls back on its biases. For a user-written brief, use only the user's own exclusions.
  5. Real-world references: real lenses (Cooke S7/i, Canon 50mm f/1.2), film stocks (Portra 400, Velvia 50), grades (teal/orange, bleach bypass).
  6. Specific backgrounds tell a story: "a distressed white vintage nightstand with a modern bedside lamp", not "a room".
  7. Realism needs imperfection: pores, wrinkles, fabric creases, dust, wear. Perfect reads as fake.
  8. No conflicting fields: "8-bit pixel art" with "f/1.4 bokeh" contradicts itself; keep every field in the chosen style.
  9. Templates are templates: replace every placeholder. A half-adapted template is worse than a fresh prompt. When a structure works, keep it and swap the subject and setting next time.

Key Principles
  1. Always analyze the reference first — identify medium, mark-making, color, value, texture, spatial treatment, detail level, and mood before writing the prompt.
  2. Verbal + visual beats either alone — pass the reference image(s) to the model AND describe the style properties in JSON. The model sees the image for subtle details; the JSON tells it what to prioritize.
  3. Be explicit about what comes from which reference — when mixing multiple references, label contributions clearly (e.g. "reference 1: color palette, reference 2: texture").
  4. Adapt vocabulary to the style type — don't use photography terms for a painting, or painting terms for a photograph.
  5. Start simple, add complexity — begin with 1 reference and the basic template. Once that works, try mixing 2–3 references.
  6. Save working patterns — when a JSON structure produces great results for a particular style, save it as a template for future use.
  7. The opening instruction matters — always start with "In the exact style and texture and vibe of this image" (or equivalent). Without this, the model may treat the reference as content to reproduce rather than style to transfer.

Common Mistakes
  1. Not passing the reference image to the model — describing a style in text without passing the actual image loses all the subtle details the model can see. Always attach the image in the schema's image-input field.
  2. Skipping the analysis step — jumping straight to "in the style of this image" without identifying specific properties produces vague, inconsistent results. Always analyze first.
  3. Using the wrong vocabulary — "f/1.4 bokeh" in a watercolor prompt, or "visible brushstrokes" in a photography prompt. Match your terms to the medium you observed.
  4. Vague style descriptions — "make it look like the reference" gives the model nothing specific. "Muted blue-grey palette, wet-into-wet watercolor washes, visible paper grain, strong atmospheric perspective" gives it everything.
  5. Not specifying what comes from which reference — with multiple references, "blend these styles" is too vague. "Color palette from reference 1, texture from reference 2, spatial depth from reference 1" is actionable.
  6. Forgetting the opening instruction — without "In the exact style of this image..." at the start, the model may try to reproduce the reference content instead of transferring its style.
  7. Over-mixing references — 4+ references with conflicting styles confuse the model. Stick to 1–3 references with complementary qualities.
  8. Describing content instead of style — "a landscape with mountains and a river" describes what's IN the reference. "Muted watercolor with atmospheric perspective and granulated washes" describes HOW it looks. Style transfer needs the latter.
  9. Inconsistent JSON fields — asking for "oil painting texture" but also "digital clean smooth" in the same prompt creates contradictions. Keep all fields aligned with one coherent vision.
  10. Not iterating — style transfer rarely nails it on the first try. Generate, compare to the reference, identify what's off (color too saturated? edges too clean? texture missing?), adjust the JSON, and regenerate.

Capabilities

Used in this skill · 2

  • Use when creating ultra-realistic AI-generated photography (a believable real-world photo, not art or illustration). Covers the 9-step prompt construction workflow, required/optional inputs, the structured positive+negative prompt format, anti-failure guardrails, primary focus technique, camera/light/material domain language, and the self-checklist.

  • Use when generating multiple related assets, working with character references, brand assets, or scene sequences, or revising an earlier asset. Maintains visual and tonal consistency across multi-asset media projects: character reference workflows, style briefs, model matching rules, revisions, prompt enhancement, iterative quality testing, and scene consistency.

    Built-in
  • Use when an edit changes part of an existing image while keeping the rest — editing a person's face, eyes, hair, skin, body or clothing, editing a logo or brand mark, moving a small detail (a piercing, earring, mole, tattoo, badge or small object) to another spot or to the other side, and fixing one region of an image the user already approved. Load it before the first edit; hard rules for each case; the model pick stays in model-recommendations.

  • Use when creating high-CTR YouTube thumbnails. A 7-phase workflow covering style hunting, context gathering, emotion triggers, viral hooks, blueprint approval, image generation with style references, and refinement.

    Built-in

Questions about Style Transfer with JSON Prompting

What does the Style Transfer with JSON Prompting skill do?

Use when writing a detailed image prompt as a JSON object (JSON prompting: subject, composition, environment, lighting, camera, style and negatives as fields), when the user asks for help writing or structuring an image prompt, or when the inferred intent is to apply the style of one or more reference images to a new subject (style transfer). Covers the JSON prompt structure and checklist, single-reference analysis, multi-reference style mixing, vocabulary for photography/painterly/graphic/3D styles, and common mistakes.

Which tools does Style Transfer with JSON Prompting use?

It runs Nano Banana 2.1 Edit, GPT Image 2.6 Sunburst · Edit through Spiral, each at the price on its tool page.

Does the Style Transfer with JSON Prompting skill cost anything?

The skill is free. The tools it runs are billed pay-as-you-go from your Spiral balance at each tool's stated price, with no plan.

How does my agent know when to use Style Transfer with JSON Prompting?

An agent reads each skill's description and loads its instructions when a request matches it.

How do I add Style Transfer with JSON Prompting to Claude Code?

Save its files into ~/.claude/skills/style-transfer/ with the commands on this page; Claude Code loads it when it starts.

Can I use Style Transfer with JSON Prompting in other agents?

Yes. Any agent that reads Agent Skills folders loads the same files, and any other agent reads the skill with `spiral agent-skills get style-transfer --json` or the Spiral API.

Is Style Transfer with JSON Prompting on for my Spiral organization?

Yes. Built-in skills are on for every organization; an admin can turn Style Transfer with JSON Prompting off on the console's Skills page.

Where is the Style Transfer with JSON Prompting SKILL.md file?

At https://spiral.ai/skills/style-transfer/SKILL.md, with no key needed. On the console's Skills page, Customize saves a copy you can edit as your organization's own skill.