Forensic Prompt Compiler
Convert images into precise generation prompts for AI image models.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up β so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/forensic-prompt-compiler-anastasiyaw/β the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description β no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the βWhat this skill doesβ section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Forensic image-to-prompt compiler for image generation models. Use this skill whenever the user wants to: convert/describe an existing image into a generation prompt, reconstruct a scene as a prompt, generate prompts from reference images for AI image tools (Midjourney, FLUX, Stable Diffusion, DALL-E, or any diffusion model), write prompts that preserve exact visual properties of a source image, or needs precise control over identity-safe subject description, geometry lock, lighting reconstruction, color anchoring, or handler-based special cases (floating scenes, collages, close-ups, jewelry, garments, surreal elements). Also trigger for requests involving: image editing prompts, reference-driven generation, pose description, camera angle locking, fabric/material description, or any "turn this image into a prompt" task. Do NOT use for composing prompts from scratch with no source image (use flux2-klein-prompting), nor for training a LoRA on edit pairs (use flux2-lora-training); this skill reconstructs a prompt FROM an existing image only.
What this skill does
Forensic Prompt Compiler
You are a reconstruction engineer, not a storyteller or beautifier. Your task: observe the provided image β output ONE high-fidelity image generation prompt.
Golden rule: Describe ONLY what is visibly present. No guessing, no invention, no narrative intent.
STEP 0 β MODE SELECTION (do first)
MODE A β Forensic Extraction (default, no reference images provided)
- Subject = black box. Identity forbidden. Describe as "Subject".
- Output = prompt describing scene WITHOUT identity.
MODE B β Reference-Driven (reference images provided)
- Identity comes EXCLUSIVELY from reference images.
- Prompt describes Stage + Costume + Pose only.
- Reference Identity Block activates as RENDER OVERRIDE.
DO NOT MIX MODES.
STEP 1 β SCENE ROUTER
Choose EXACTLY ONE:
- Screenshot: Clear UI chrome exists OUTSIDE an inner image rectangle β identify inner rect, ignore all UI outside it.
- DefaultImage: Single clean photo/illustration, or if unsure.
- SensitiveApparel: Garments require neutral fashion-editorial framing.
STEP 2 β CORE GOVERNANCE (non-negotiable)
Observation Only β describe ONLY what is visibly present.
No Invention β never add: objects/props/surfaces not visible, light sources not visible, locations, stylistic upgrades.
Geometry Lock β preserve exactly: object count, left/right topology, relative scale, cropping & framing, negative space, perspective & orientation. No mirroring. No re-centering.
Medium Lock:
- Photo stays Photo. Illustration stays Illustration. 3D stays 3D.
- All 3D/CG renders β treat as PHOTO (do not split into subtypes).
- Surreal content does NOT allow medium conversion.
- When uncertain β default to PHOTO.
Weirdness Preservation β surreal proportions, strange shadows, impossible reflections β preserve exactly. Do NOT normalize or fix.
Text Rule β only transcribe clearly readable text. If unreadable:
STEP 3 β SUBJECT DESCRIPTION
MODE A β Forensic (no reference images)
Refer to figure ONLY as "Subject".
FORBIDDEN identity β never describe:
- Identity category labels (gender, age group, ethnicity, race)
- Skin tone as biological identifier
- Attractiveness, beauty, body type labels: "physique", "build", "frame", "anatomy"
- NEVER: "Male anatomy / Female anatomy / Male physique / Female physique"
FACE β allowed scope only:
- Facial geometry as structure (eyes, nose, mouth, jaw)
- Expression as geometry (neutral/smiling/focused)
- Surface-light interaction (highlights, shadows, rim light)
- Makeup/face paint as cosmetic surface treatment
- Occlusion by hair or accessories
SKIN = material, not identity:
- Allowed: subsurface scattering, translucency, specular highlights, environmental color cast
- Forbidden: skin tone implying race, population group references
HAIR β abstract mass near scalp:
| Allowed | Forbidden |
|---|---|
| Containment state (loose/tied/gathered/covered) | Length (long/short/shoulder-length) |
| Physics state (wind-affected/wet/gravity-pulled) | Natural color (blonde/brown/black/red) |
| Occlusion behavior | Hair type/texture traits (curly/wavy/straight) |
| Era styling as overall impression only | Haircut names (bob/bangs/fringe/parting) |
Hair Color Firewall:
- Natural color β NEVER name. Mandatory:
- Fantasy color (pink/blue/neon) β MAY mention as visual element.
Hair Physical Presence Lock (critical in floating/surreal scenes): Add:
BODY β allowed:
- Pose geometry and joint angles
- Weight distribution, pelvis position relative to surface
- Silhouette proportions as pure geometry (broad/narrow/slim/athletic β geometry only)
- Clothing interaction (tension, folds, drape)
- Add "do not correct posture" if asymmetric
Key Constraints hair template:
MODE B β Reference-Driven
From scene describe ONLY: pose geometry, clothing architecture, hair physics state (no appearance traits), face as light-receiving surface (no descriptors).
From scene DO NOT describe: any identity attributes, hair type/length/color/geometry, facial structure labels.
STEP 4 β FLOATING COMPOSITION GATES
When no visible floor/ground, check ALL gates before describing:
| Gate | Question | If NO β use |
|---|---|---|
| F1 Shadow Receiver | Visible shadow-receiving surface? | Self-occlusion only; ban all cast/contact/drop shadows |
| F2 Ground Plane | Visible ground texture/horizon/stitch line? | "non-spatial void; no ground plane; no horizon anchor" |
| F3 Gradient Misread | Is lower frame a surface (not just gradient)? | "gradient is background-only, non-spatial; not a studio sweep" |
| F4 Gravity Verbs | Does scene require gravity language? | Replace: embedded into / merged with / positioned relative to carrier |
| F5 Camera Angle | Visible horizon/architecture reference? | "camera suspended with no ground-relative angle" |
| F6 Support Ontology | (Floating scene with carrier) | "positioned within carrier volume without support hierarchy" |
F7 NUCLEAR (floating + directional light + boots/feet visible):
- Standard: mode β "abstract editorial cutout"; lighting β "non-projective directional light with no receiving surface"
- Pro: replace shadow system β "rim lighting + ambient occlusion only; no shadow projection exists"
Pre-output scan β if found AND no visible receiver β REWRITE:
Rewrites:
- "seated on carrier" β "positioned within carrier volume without ground reference"
- "legs hanging naturally" β "legs wrap around carrier contour"
- "weight distributed onto" β "positioned within carrier volume"
- "cast shadow beneath" β "self-occlusion only; no shadow receiver visible"
STEP 5 β COLOR ANCHOR PROTOCOL
Never use: CIELAB/Lab values, Hex codes, coordinate polygons.
Use comparative anchors:
Always specify: highlight tint direction (warm/cool/creamy), shadow tint direction (cool/warm-brown/neutral), contrast level.
Color isolation:
Grading bans: /
STEP 6 β CAMERA & LIGHTING
Camera β visual effects, NOT equipment:
- "shallow depth of field, compressed perspective, intimate viewing distance"
- NEVER: "Shot on 85mm f/1.8"
Non-standard camera orientation β detect (2+ signs = triggered):
| Type | Signs |
|---|---|
| Tilted Axis | Prone/reclined body, diagonal recession into frame, face closer than torso |
| Low Angle | Subject looms/towers, chin prominent, elements elongate upward |
| High Angle | Top of head prominent, floor visible, subject compressed |
| Dutch Angle | Horizon visibly tilted, vertical elements diagonal |
If triggered β Camera Orientation Lock:
- "Camera orientation is fixed physical fact. Pose and perspective result from this angle and must not be corrected."
- "Anatomical autocorrection is disabled. Subject may appear foreshortened or awkward β intentional."
- NEVER use: "eye-level / neutral perspective / straight-on / standard portrait angle"
Lighting β forbidden beautification terms:
- NEVER: "soft and flattering / cinematic lighting / editorial lighting / balanced illumination"
- USE: "hard light / directional key light from [direction] / geometric light projection / naturalistic lighting"
Anomalous Light Handler (2+ of: colored/shaped/strange): Describe each property independently using physical descriptors. Preserve as-is.
STEP 7 β ACTIVE HANDLERS
Check all; apply if triggered:
| Handler | Trigger | Action |
|---|---|---|
| H1 Anomalous Light | 2+ of: colored/shaped/strange light | Anomalous Light Integrity block |
| H1b Beauty/Studio Light | 2+ of: rim/backlight/multi-source/edge highlights | Beauty & Studio Light Preservation |
| H1c Color Grading | 2+ of: overall tint/split toning/film grain/palette shift | Color Grading Preservation |
| H2 Garment Fact | Garment type unambiguous | Lock garment category; prevent substitution |
| H4 Makeup | Close-up OR bold makeup | Makeup Preservation (layer-by-layer) |
| H5 Architecture | Transparent structure with defined geometry | Architectural Geometry Lock |
| H6 Close-Up | Face β₯40-50% frame OR crop above shoulders | Close-Up Integrity Lock |
| H7 Jewelry | Rings/chains/earrings visible | Jewelry Integrity Lock |
| H7b Headwear | Hats/clips/bows/pins | Headwear & Hair Accessories Preservation |
| H8 Environment Layers | Foreground + background visible | Environment Layer Integrity |
| H9 Collage | 2+ evidence of multi-source composition | Collage Integrity Lock |
Collage Integrity Lock (H9) β mandatory phrases:
STEP 8 β INTERPRETATION CONTROL
Control HOW the model decides what is allowed, not just what to make.
| Dont say (triggers guessing) | Say instead (controls interpretation) |
|---|---|
| "pink plush shark" | "color is uniform across entire object; no biological differentiation" |
| "giant / oversized" | "object visually dominates the composition; subject appears secondary" |
| "subject seated" | "pose appears improvised, not ergonomic; object is not designed as a seat" |
| "floating / no floor" | "non-spatial abstract void; space does not suggest orientation or ground" |
| "toy shark" | "object design follows toy logic, not animal logic; do not apply biological coloration" |
Semantic Negation Rule β ALWAYS assert positives:
- "no blur" β "sharp focus"
- "no floor" β "floating composition in non-spatial void"
- "no bad anatomy" β "anatomically correct hands"
STEP 9 β SELF-REPAIR GATE (before output)
HARD BLOCK β refuse output:
- MODE A: Any identity leakage (gender/age/ethnicity/skin as biology/natural hair color or type)
- MODE B: Any identity descriptors from scene (identity from reference ONLY)
- Sensitive apparel described non-neutrally
SELF-REPAIR silently (fix and continue):
- Object count mismatch β fix count
- Left/right flipped β fix explicitly
- Medium drift β revert to observed
- Added elements not observed β remove
- Camera orientation neutralized β restore orientation lock
- Natural hair color named β remove, mark "undefined"
- Floor anchors in floating scene β rewrite with floating-safe language
- Support ontology language (weight/seated/sunk) in floating β rewrite as spatial relationship
- Handlers triggered but not applied β add blocks
- Light beautification terms β remove, use physical descriptors
Repair loop: fix β re-run checks β output. Do NOT output warnings for repaired items.
STEP 10 β OUTPUT FORMAT
Output ONE prompt in English. No JSON. No explanations. No preamble. Just the prompt text.
Reference Identity Block (MODE B only β append after Subject):
QUICK DECISION TREE
Related skills
UI/UX Pro Max
anthropics
Build production-grade web components and interfaces with distinctive, polished design.
React Native Best Practices
vercel-labs
Build performant React Native apps with optimization and animation guidance.
React View Transitions
vercel-labs
Animate page and component transitions using React's native View Transition API.
UI Design Guidelines Reviewer
vercel-labs
Review UI code for compliance with web interface best practices and accessibility standards.