compose-creative
Compose just the creative (image or video) for a calendar post, in four modes. \"make the visual for this post\"
indranilbanerjee · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add indranilbanerjee/socialforge --skill compose-creative技能说明
name: compose-creative description: "Compose just the creative (image or video) for a calendar post, in four modes. "make the visual for this post"" argument-hint: "[--post ] [--all] [--variant b]" effort: max user-invocable: true
/socialforge:compose-creative — Creative Production Engine
The core production skill. Takes asset matching results and produces visual and video assets for each post according to its assigned creative mode, using a staged human-in-the-loop approval flow.
Context efficiency
Asset-heavy skill. Grep before Read the asset catalog (${CLAUDE_PLUGIN_DATA}/socialforge/brands/<brand>/asset-index.json) — never list the asset directory. Reference generated images / videos by path, not by loading metadata. Brand profile loads once per session.
The 4 Creative Modes
MODE 1: ANCHOR_COMPOSE
Brand asset is the untouchable center. AI generates scene around it.
- Remove background from brand asset (rembg)
- Generate surrounding scene via AI using brand style references
- Composite asset onto generated scene (Pillow)
- Add shadow/reflection for natural placement
- Add text overlay + logo
- Resize per platform
MODE 2: ENHANCE_EXTEND
Brand asset is the foundation. AI modifies periphery only.
- Feed real image to AI edit endpoint
- AI extends/enhances while preserving core subject
- Verify core subject preservation
- Add overlay + resize
MODE 3: STYLE_REFERENCED
No brand asset composited. Style reference photos guide AI generation.
- Load 2-8 brand style reference images
- Construct 5-layer prompt (brand identity, post context, creative direction, image rules, technical)
- Feed references + prompt to AI generation
- Quality review — does output match brand DNA?
- Add overlay + resize
MODE 4: PURE_CREATIVE
Full AI generation with only text prompt + brand colors/mood.
- Construct prompt from brief + brand-config visual style
- Generate (text-only, no reference images)
- Quality review
- Add overlay + resize
Reference images and keyframes — what the scripts actually do
Read from scripts/generate_image.py, scripts/edit_image.py and scripts/generate_video.py. This skill promises only what those scripts implement.
| Input | How to pass it | What is true today |
|---|---|---|
| Style references for a new image (STYLE_REFERENCED) | generate_image.py --references <path> [<path> ...] — the first 14 are read | Sent to the primary image provider only. The fallback providers receive the prompt and aspect ratio, not the references: when the result carries fallback_from and references were supplied, it also carries references_used: 0, references_dropped: <n> and a references_note — the image is not style-referenced. Tell the user, and fix the primary provider's credentials rather than accepting a reference-less image as a style-referenced one. |
| References alongside an image being edited (ENHANCE_EXTEND) | edit_image.py --image <src> --instruction "..." --references <path> ... — first 14 | Supported. There is no fallback chain for edits. (generate_image.py --edit takes no references.) |
| First frame for video | generate_video.py --image <path> | Supported by every video provider in the chain; one of them requires it. See /socialforge:generate-video. |
| Last frame for video | generate_video.py --last-image <path> (with --generate-video) | Sent to the kling rung as the clip's end image; no other rung takes one. The result's video.last_frame_used says whether it was sent — false (with a last_frame_note) means the clip was not steered to the approved last frame. See /socialforge:generate-video. |
| Reference images for video | none | Not wired through generate_video.py — no flag exists. See /socialforge:generate-video. |
Two caveats from the code: file type is set from the extension (.jpg/.jpeg as JPEG, everything else as PNG), so pass JPEG or PNG and convert WebP first; and references_used is the number of files actually read and sent, not the number of paths passed. When it is lower than what you passed, the result says why: references_missing lists the paths that do not exist (they are not sent, and there is no error), references_over_limit counts the paths past the 14-file limit, and references_dropped plus references_note mean a fallback provider made the image. Read those fields before treating an image as style-referenced.
Prerequisites
asset-matches.jsonmust exist (generated by/socialforge:match-assets-> match_assets.py)calendar-data.jsonmust exist (generated by/socialforge:parse-calendar)brand-config.jsonmust exist for active brandcost-log.jsoninitialized (via status_manager.py --action init-month)- Valid credentials for the image provider (Vertex AI, alias
latest-image-balanced-google) and the video provider (WaveSpeed, aliaslatest-video-wavespeed) via credential_manager.py. Which model each alias resolves to today:python scripts/generate_video.py --list-models.
If any prerequisite is missing: "Run /socialforge:match-assets first — creative production needs asset matching results."
Process (For Each IMAGE Post) — 4-Stage Approval Flow
Stage 1: Creative Direction (No API Call)
Present 2-3 creative direction options to the user. Each option includes:
- A description of the visual concept
- Mood, color palette, and composition approach
- How the brand asset will be used (per the assigned creative mode)
- Rough reference to style/tone
- Overlay text, written against the pairing rule: the overlay and the caption do different jobs and never echo each other. The overlay stops the scroll — a promise, a number, a tension in a few words. The caption (written later by adapt-copy) pays it off with context and the CTA. If the proposed overlay reads like the caption's first line, it is the wrong overlay — the quality reviewer flags this pairing as a Copy Quality failure downstream, so