Loading...
Loading...
Atomic Skill for Brand Gene Style Extraction. Based on product images and user-provided brand gene parameters (main color, font, platform, region, language), extract a unified brand visual language (Brand DNA) and output structured brandGeneJson for consumption by downstream atomic skills. Keywords: brand gene extraction, brand gene extract, brand DNA, brand visual definition, brand tone extraction, brand style extraction, visual identity extraction. Called by the image layout layer (linkfox-aigc-imagegen-cloth / product image layout path) in Step 3; triggered when the user says "extract brand gene", "define brand style", "brand gene", or "brand visual".
npx skill4agent add linkfox-ai/linkfox-skills linkfox-aigc-imagegen-brand-gene-extract| Scenario | Description |
|---|---|
| Image Layout Call | Called by |
| Brand Gene Change | Re-extract after users modify main color/font/platform/region |
| Initial Brand Definition | First extraction when no brand gene results exist in the context |
| Parameter | Type | Default | Description |
|---|---|---|---|
| images | list[image] | — | List of product images uploaded by the user (at least 1 image), used to analyze product colors and temperament |
| brandKey | object | — | Brand gene information entered by the user (see field description below) |
| Field | Type | Default | Description |
|---|---|---|---|
| brandColor | string | "" | Brand main color (HEX value), use directly if non-empty; auto-extract if empty |
| fontStyle | string | "" | Font style, use directly if non-empty; auto-extract if empty |
| brandName | string | "" | Brand name, used for brand implantation strategy |
| language | string | "English" | Target market language |
| platform | string | "Amazon" | Publishing platform (Amazon/TikTok/Shopee, etc.) |
| salesRegion | string | "United States" | Sales region/country |
brandKeyimagesbrandKeybrandColorfontStylelanguageplatformsalesRegionimagesimageUrlListimageUrlListbrandKeybrandKeysalesRegion"Modern Nordic minimalist home, log and warm white tones, natural lighting through floor-to-ceiling windows, in line with American middle-class aesthetic""log long table, linen tablecloth, green plants, ceramic utensils, morning light""Soft natural side light, warm color temperature 4000K, creates a lazy morning atmosphere, slight long projection enhances three-dimensionality""Brand main color appears as an accent color on pillows/tags, Logo appears on props in a low-saturation embossed form, not overwhelming the main subject"["Heading Color": color value]["Body color": color value]imageUrlList--content-only--stdin<textgen root directory>skill:linkfox-aigc-textgen<this skill root directory>⚠️ Intermediate parameter files are stored in the sessiondirectory. First get the directory:data/bashDATADIR=$(python <this skill root directory>/scripts/save_brand_gene.py --datadir)⚠️ Constructmust use the Write tool to write tobrand_gene_params.json(prompt contains special characters such as quotes and backslashes, shell heredoc embedded JSON is prone to parsing failures). If generating via command line, only use$DATADIR/brand_gene_params.jsonwithpython -c, do not manually拼 JSON strings.json.dumps
python <textgen root directory>/scripts/aigc_textgen.py --stdin < "$DATADIR/brand_gene_params.json"promptimageUrlsimageUrlListmodelGEM_3_1_PROthinkingLevelhighcontentcontent⏎contentbrandGeneJsonBackground Strategy - Light & ShadowBrand InjectioncontentbrandGeneJsonbrandGeneJsonbrandGeneJson$DATADIR/brand_gene_assembled.jsonDATADIR_meta.jsonpython <this skill root directory>/scripts/save_brand_gene.py "$DATADIR/brand_gene_assembled.json"Saved full response: <absolute path> (<N> bytes)--brand-gene-file <absolute path>brand_gene_jsonlinkfox-aigc-imagegen-clothlinkfox-aigc-imagegen-productbrandGeneJson| Product | Directory | Description |
|---|---|---|
| | textgen input parameters (intermediate file in Step 3) |
Final | | Stored via |
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/<session>SESSION_IDCLAUDE.mdbrandColorfontStyle[
{
"brandColor": {
"brandColor (Brand Main Color)": "Color name and HEX value",
"Background Strategy - Style Definition": "Style description based on salesRegion",
"Background Strategy - Scene Keywords": "Keyword1, Keyword2, ...",
"Background Strategy - Light & Shadow": "Light and shadow atmosphere description",
"Brand Injection": "How brand elements are implanted into the scene"
},
"fontStyle": {
"Font Strategy": "Selected font family name",
"Font Style": "Selected specific font name",
"Color Strategy - Heading": "[\"Heading Color\": color value/reverse white logic]",
"Color Strategy - Body/Sub": "[\"Body color\": color value]",
"Flexible Reverse White": "You are authorized to switch to Matte White (#FFFFFF) text whenever using a dark background or a solid brand-color panel.",
"Typesetting": "Non-italic, standard leading"
}
}
]| Situation | Handling |
|---|---|
| images is empty | Stop execution, prompt the user to upload at least 1 product image |
| brandKey is completely empty | Fill all fields with default values (salesRegion=United States, language=English, platform=Amazon), main color and font are auto-extracted |
| Product is pure black, white, or gray and no color main color can be extracted | Allow using black, white, or gray as the main color (the only exemption condition for the black & white & gray protocol) |
LINKFOX_AGENT_API_KEYLINKFOXAGENT_API_KEYGEM_3_1_PROdata/save_brand_gene.pylinkfox-aigc-textgen