Self-sufficient skills that carry their own reference media — no external folder dependencies.
Applies To: Any skill needing consistent visual identity, voice, or motion style across multiple generation tasks.
The Problem
Skills that depend on external reference files (photo folders, audio samples) break when:
Skill is synced to a new machine without the original files
Files are renamed, moved, or deleted
A different project inherits the skill
Version control doesn't track binary assets
The Solution: Visual Memory
Embed optimized reference assets directly in the skill as base64 data URIs. The skill becomes fully self-sufficient — it works anywhere, exactly the same way, every time.
skill-folder/
├── SKILL.md
├── synapses.json
└── visual-memory/
├── index.json ← Metadata only (no binary data)
├── visual-memory.json ← Full base64 data URIs (~30-80KB per photo)
└── subject-1.jpg ← Optional: keep originals alongside
└── subject-2.jpg
Memory Types
Visual Memory (Photos as Base64)
Reference photos for face-consistent portrait generation. Embedded to eliminate folder dependencies.
Spec
Value
Target size
512px longest edge
Quality
85% JPEG
Per-photo size
~40-80KB (vs ~2MB originals)
Format
data:image/jpeg;base64,<encoded>
Quantity
5-8 photos per subject, varied angles
When to use: Face-consistent portrait generation, AI character references, persona avatars.
Audio Memory (Voice Samples)
Short voice samples for TTS cloning. Referenced by path (audio files are too large to base64 inline sensibly).
Spec
Value
Duration
5-15 seconds of clear speech
Format
WAV or MP3
Sample rate
16kHz+
Content
Natural speech, no background noise
When to use: Voice cloning with chatterbox-turbo or qwen/qwen3-tts.
Video Memory (Style Templates)
Stored as JSON prompt templates — not actual video files.
When to use: Consistent motion patterns across video generation tasks.
Do NOT Describe Physical Appearance When Using References
The reference photos speak for themselves. Only describe:
Scene / setting
Clothing (specific colors, styles)
Expression (smile, serious, thoughtful)
Lighting (natural, studio, dramatic)
Background (office, outdoors, neutral)
Action / pose
NEVER include:
Hair color, style, or texture
Eye color
Skin tone or complexion
Body type / build
Any physical description of the person
Model API Parameters for Reference Images
Model
Parameter
Max Refs
Notes
nano-banana-pro
image_input
14
Array of data URIs, 4K output
nano-banana-2
image_input
14
Faster/cheaper alternative (Gemini 3.1 Flash)
flux-2-pro
input_images
8
Array of data URIs
flux-2-flex
input_images
10
Max-quality editing
ideogram-v2
❌ None
—
No face reference
Prompt Anchor Pattern
Always start the prompt with explicit reference instruction:
Generate a photo of EXACTLY the person shown in the reference images.
For multiple subjects at once:
Generate a photo with two people.
LEFT: EXACTLY the person from [Name A]'s reference images, wearing [clothing].
RIGHT: EXACTLY the person from [Name B]'s reference images, wearing [clothing].
[Scene description]. [Lighting]. Professional photography.