nexu-io/ecommerce-image-workflow
| Reference-product ecommerce image workflow for generating a compact set of product-faithful main, feature, and lifestyle images from real product reference photos. V1 requires uploaded product imagery and intentionally defers brief-only concept generation and platform-specific batch exports.
npx skills add https://github.com/nexu-io/open-design --skill ecommerce-image-workflow
Create a compact ecommerce image set from real product reference imagery.
This V1 skill is intentionally narrow: it supports **reference-product mode
only**. If the user only describes a product and does not provide a product
photo, ask for one and stop. Do not create a brief-only concept product in
this version.
ecommerce-image-workflow/
|-- SKILL.md
|-- example.html
`-- references/
`-- checklist.md
By default, generate three ecommerce-ready image assets for one product:
background.
space, without relying on tiny unreadable in-image text.
the product faithful to the reference.
Also create:
image-manifest.json describing reference inputs, slots, prompts, outputs,aspect ratios, and fidelity notes.
ecommerce-gallery.html as a small preview gallery linking the generatedfiles and summarizing the image roles.
Required:
Ask only for missing essentials:
framing.
Do not ask broad discovery questions. Keep the workflow moving.
Before planning, verify that the current project includes a real product
reference image.
If no product image is available, reply:
> Please upload at least one product reference image first. This V1 workflow
> preserves a real product from reference photos; brief-only concept generation
> is deferred to a later version.
Then stop.
Inspect the reference image and write a short internal identity lock:
details.
Use these anchors in every generation prompt.
Create a compact shot plan before dispatch:
| Slot | Default aspect | Goal |
|---|---:|---|
| main | 1:1 | Product-first marketplace image on white or soft neutral background |
| feature | 4:5 | One clear selling point with close-up detail or simple callout space |
| lifestyle | 4:5 | Realistic use context with the product still visually faithful |
If the project metadata provides imageAspect, use it when the user expects a
single aspect across the set. Otherwise use the slot defaults above.
Every prompt must include this product fidelity instruction near the top:
Preserve the exact product identity from the reference image: shape,
silhouette, color, material, logo/label placement, visible construction
details, and proportions. Do not redesign the product. Do not add, remove,
or relocate product features.
Then add slot-specific instructions:
later designer-added labels.
structure is being generated, center the product. If label space is needed,
offset the product only slightly and make the empty space feel intentional.
product.
Use the unified Open Design media dispatcher. Do not call provider APIs or
custom model commands directly.
For each slot, run the standard generate/wait loop:
# POSIX bash. Do not call provider APIs directly.
out=$("$OD_NODE_BIN" "$OD_BIN" media generate \
--project "$OD_PROJECT_ID" \
--surface image \
--model "<imageModel from metadata>" \
--aspect "<slot aspect or imageAspect from metadata>" \
--image "<project-relative product reference image>" \
--output "<product-slug>-<slot>.png" \
--prompt "<full slot prompt>")
ec=$?
if [ "$ec" -ne 0 ]; then echo "$out" >&2; exit "$ec"; fi
last=$(printf '%s\n' "$out" | tail -1)
task_id=$(printf '%s\n' "$last" |
python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('taskId',''))" 2>/dev/null)
since=$(printf '%s\n' "$last" |
python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('nextSince',0))" 2>/dev/null)
since="${since:-0}"
while [ -n "$task_id" ]; do
out=$("$OD_NODE_BIN" "$OD_BIN" media wait "$task_id" --since "$since")
ec=$?
last=$(printf '%s\n' "$out" | tail -1)
since=$(printf '%s\n' "$last" |
python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('nextSince',0))" 2>/dev/null)
since="${since:-0}"
if [ "$ec" -eq 0 ]; then
task_id=""
elif [ "$ec" -ne 2 ]; then
echo "$out" >&2
exit "$ec"
fi
done
printf '%s\n' "$last"
The final line must be JSON with {"file": {"name": "...", ...}}.
Record each final returned filename in image-manifest.json.
If the active image model or provider cannot use --image, stop and tell the
user that this workflow needs a reference-capable image generation path for
product fidelity.
image-manifest.jsonAfter generation, create a project file named image-manifest.json:
{
"workflow": "ecommerce-image-workflow",
"mode": "reference-product",
"productName": "Example product",
"referenceImages": ["reference-product.png"],
"fidelityNotes": [
"Preserve product identity, color, material, construction, and proportions.",
"Do not treat these outputs as platform-compliance proof without human review."
],
"slots": [
{
"id": "main",
"role": "marketplace packshot",
"aspect": "1:1",
"output": "example-product-main.png",
"promptSummary": "Centered product-first packshot on a clean neutral background."
},
{
"id": "feature",
"role": "single feature highlight",
"aspect": "4:5",
"output": "example-product-feature.png",
"promptSummary": "Close-up or negative-space composition for one verified selling point."
},
{
"id": "lifestyle",
"role": "usage context",
"aspect": "4:5",
"output": "example-product-lifestyle.png",
"promptSummary": "Realistic scene with the product as the focal point."
}
]
}
Keep the manifest honest. If a detail is unknown, write null or a short note
instead of inventing claims.
ecommerce-gallery.htmlCreate a simple single-file HTML gallery that:
image-manifest.json.Reply with:
claim/legal review remain human review steps.
Do not emit an <artifact> tag.
performance data.
"$OD_NODE_BIN" "$OD_BIN" media generate; do not call provider APIsdirectly.
image-manifest.json after generation.references/checklist.md before handoff.Take nexu-io/ecommerce-image-workflow from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.