{"id":"9273d5c3-cc42-4586-a168-ce53dd407a99","shortId":"V2YSMV","kind":"skill","title":"xhs-image-gen","tagline":"Generate Xiaohongshu (小红书) carousel images (3:4, 1080x1440) from structured content. Creates professional slide decks with Chinese typography and proper XHS formatting. Triggers on \"做小红书图\", \"xhs images\", \"generate xhs slides\", \"小红书配图\", \"carousel images\", or any XHS image generati","description":"# XHS Image Generator Skill\n\nGenerate professional Xiaohongshu carousel images from structured content JSON. Outputs 3:4 vertical PNGs (1080x1440) with Chinese typography, ready for upload.\n\n---\n\n## Setup\n\n**Clone the skill:**\n```bash\ngit clone https://github.com/PHY041/claude-agent-skills\ncd claude-agent-skills/skills/xhs-image-gen\npython3 -m venv venv\nvenv/bin/pip install -r requirements.txt\n```\n\n**Optional — AI cover generation (uses fal.ai):**\n```bash\nexport FAL_API_KEY=\"your_fal_api_key\"\n```\n\n---\n\n## Quick Start\n\n```bash\n# Template-only (fast, free)\nvenv/bin/python3 generate.py content.json --output /tmp/xhs-output/\n\n# AI cover + template content (recommended)\nFAL_API_KEY=\"...\" venv/bin/python3 generate.py content.json --ai-cover --output /tmp/xhs-output/\n```\n\n---\n\n## Workflow\n\n### Step 1: Understand the Topic\n\nWhen user asks to create XHS content for topic X:\n1. Understand the topic and target audience\n2. Plan 4-6 slides (cover + 2-4 content + summary)\n3. Choose appropriate template\n\n### Step 2: Decide on Cover Style\n\n| Mode | Flag | When to Use |\n|------|------|-------------|\n| **Gradient cover** (default) | _(none)_ | Clean, fast, no API cost |\n| **AI cover** | `--ai-cover` | Eye-catching background via fal.ai |\n\nAI cover uses flux/schnell to generate an atmospheric background, applies a dark gradient overlay, and renders white text on top. Content slides always use templates (no AI). Cost: ~$0.003 per cover.\n\n### Step 3: Generate Content JSON\n\n```json\n{\n  \"template\": \"tutorial\",\n  \"ai_cover\": true,\n  \"slides\": [\n    {\n      \"type\": \"cover\",\n      \"title\": \"大标题（简短有力）\",\n      \"subtitle\": \"副标题（补充说明）\",\n      \"tag\": \"分类标签\",\n      \"author\": \"@your_handle\",\n      \"ai_prompt\": \"optional: custom fal.ai prompt for background\"\n    },\n    {\n      \"type\": \"content\",\n      \"title\": \"第一个要点\",\n      \"number\": 1,\n      \"body\": \"详细说明\\n用换行分段\\n每段1-2句话\",\n      \"highlight\": \"可选：重点提示框内容\"\n    },\n    {\n      \"type\": \"list\",\n      \"title\": \"清单/工具列表\",\n      \"items\": [\n        \"第一项 — 简短说明\",\n        \"第二项 — 简短说明\",\n        \"第三项 — 简短说明\"\n      ]\n    },\n    {\n      \"type\": \"summary\",\n      \"title\": \"总结\",\n      \"points\": [\n        \"核心收获一\",\n        \"核心收获二\",\n        \"核心收获三\"\n      ],\n      \"cta\": \"关注我获取更多干货\"\n    }\n  ]\n}\n```\n\n### Step 4: Generate Images\n\n```bash\ncat > /tmp/xhs-content.json << 'EOF'\n{... your JSON here ...}\nEOF\n\nvenv/bin/python3 generate.py /tmp/xhs-content.json --output /tmp/xhs-output/\n```\n\n### Step 5: Present to User\n\nShow the generated images for review. If approved, they're ready for manual upload to Xiaohongshu.\n\n---\n\n## Available Templates\n\n| Template | Style | Best For |\n|----------|-------|----------|\n| `tutorial` | White bg, blue accent | How-to, tutorials, step-by-step |\n| `dark` | Dark bg, soft blue accent | Tech, dev tools, coding |\n| `warm` | Cream bg, amber accent | Lifestyle, personal stories |\n| `nature` | Light green bg, green accent | Wellness, growth, nature |\n| `coral` | Light pink bg, red accent | Alerts, hot takes, comparisons |\n\nSelect with `--template dark` or set `\"template\": \"dark\"` in JSON.\n\n### Custom Accent Color\n\nOverride with `\"accent_color\": \"#FF6B6B\"` in the JSON root.\n\n---\n\n## Content Rules (CRITICAL)\n\n### Slide Count\n- **Minimum 3 slides** (cover + 1 content + summary)\n- **Optimal 4-6 slides** (XHS algorithm favors multi-image carousels)\n- **Maximum 9 slides** (beyond this, completion rate drops)\n\n### Text Length Per Slide\n- **Title:** 6-12 characters (Chinese) — must be scannable\n- **Body:** 4-6 lines max per slide — don't cram\n- **List items:** 8 max per slide\n- **CTA:** Under 12 characters\n\n### Language & Tone\n- Write in Chinese (simplified)\n- 朋友分享 tone — like telling a friend, not marketing\n- Short sentences, line breaks between ideas\n- Concrete numbers > vague claims (\"省90%时间\" > \"节省大量时间\")\n\n### What NOT to Do\n- No English-only slides (mixed OK, pure English bad for XHS)\n- No walls of text (if body > 6 lines, split into 2 slides)\n- No generic AI-sounding language\n- No hype words: 颠覆、革命性、10倍、全网最强\n\n---\n\n## CLI Options\n\n```\ngenerate.py <content.json> [--template NAME] [--output DIR] [--ai-cover]\ngenerate.py --list-templates\n```\n\n| Flag | Effect |\n|------|--------|\n| `--ai-cover` | Generate fal.ai background for cover slide |\n| `--template` | Template preset (tutorial, dark, warm, nature, coral) |\n| `--output` | Output directory (default: ./output) |\n\n**AI cover also activatable via JSON:** set `\"ai_cover\": true` in the root object.\n\n### Output\n- Files named `slide-01-cover.png`, `slide-02-content.png`, etc.\n- All 1080x1440px (3:4 vertical)\n- PNG format, ready for XHS upload\n\n---\n\n## Example\n\nTest with the bundled example:\n\n```bash\nvenv/bin/python3 generate.py example.json --output /tmp/xhs-test/\nopen /tmp/xhs-test/  # Preview on macOS\n```","tags":["xhs","image","gen","claude","agent","skills","phy041","agent-skills","ai-agents","automation","founder","indie-hacker"],"capabilities":["skill","source-phy041","skill-xhs-image-gen","topic-agent-skills","topic-ai-agents","topic-automation","topic-claude","topic-founder","topic-indie-hacker","topic-openclaw","topic-social-media"],"categories":["claude-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/PHY041/claude-agent-skills/xhs-image-gen","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add PHY041/claude-agent-skills","source_repo":"https://github.com/PHY041/claude-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.456","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 13 github stars · SKILL.md body (4,747 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T13:03:32.815Z","embedding":null,"createdAt":"2026-04-19T00:41:14.359Z","updatedAt":"2026-04-22T13:03:32.815Z","lastSeenAt":"2026-04-22T13:03:32.815Z","tsv":"'-12':458 '-4':166 '-6':162,435,466 '/output':589 '/phy041/claude-agent-skills':77 '/skills/xhs-image-gen':83 '/tmp/xhs-content.json':311,319 '/tmp/xhs-output':119,135,321 '/tmp/xhs-test':632,634 '0.003':232 '1':138,152,273,430 '1080x1440':12,61 '1080x1440px':611 '10倍':550 '12':482 '2':159,165,174,537 '2句话':279 '3':10,57,169,236,427,612 '4':11,58,161,306,434,465,613 '5':323 '6':457,533 '8':476 '9':445 'accent':353,367,376,385,394,410,414 'activat':593 'agent':81 'ai':93,120,132,193,196,204,230,243,260,542,560,569,590,597 'ai-cov':131,195,559,568 'ai-sound':541 'alert':395 'algorithm':438 'also':592 'alway':226 'amber':375 'api':101,105,126,191 'appli':213 'appropri':171 'approv':334 'ask':144 'atmospher':211 'audienc':158 'author':257 'avail':343 'background':201,212,267,573 'bad':524 'bash':72,98,109,309,627 'best':347 'beyond':447 'bg':351,364,374,383,392 'blue':352,366 'bodi':274,464,532 'break':501 'bundl':625 'carousel':8,36,50,443 'cat':310 'catch':200 'cd':78 'charact':459,483 'chines':21,63,460,488 'choos':170 'claim':507 'claud':80 'claude-agent-skil':79 'clean':188 'cli':552 'clone':69,74 'code':371 'color':411,415 'comparison':398 'complet':449 'concret':504 'content':15,54,123,148,167,224,238,269,421,431 'content.json':117,130 'coral':389,584 'cost':192,231 'count':425 'cover':94,121,133,164,177,185,194,197,205,234,244,248,429,561,570,575,591,598 'cram':473 'cream':373 'creat':16,146 'critic':423 'cta':303,480 'custom':263,409 'dark':215,362,363,402,406,581 'decid':175 'deck':19 'default':186,588 'dev':369 'dir':558 'directori':587 'drop':451 'effect':567 'english':517,523 'english-on':516 'eof':312,316 'etc':609 'exampl':621,626 'example.json':630 'export':99 'eye':199 'eye-catch':198 'fal':100,104,125 'fal.ai':97,203,264,572 'fast':113,189 'favor':439 'ff6b6b':416 'file':605 'flag':180,566 'flux/schnell':207 'format':26,616 'free':114 'friend':495 'gen':4 'generat':5,32,45,47,95,209,237,307,329,571 'generate.py':116,129,318,554,562,629 'generati':42 'generic':540 'git':73 'github.com':76 'github.com/phy041/claude-agent-skills':75 'gradient':184,216 'green':382,384 'growth':387 'handl':259 'highlight':280 'hot':396 'how-to':354 'hype':546 'idea':503 'imag':3,9,31,37,41,44,51,308,330,442 'instal':89 'item':288,475 'json':55,239,240,314,408,419,595 'key':102,106,127 'languag':484,544 'length':453 'lifestyl':377 'light':381,390 'like':492 'line':467,500,534 'list':284,474,564 'list-templ':563 'm':85 'maco':637 'manual':339 'market':497 'max':468,477 'maximum':444 'minimum':426 'mix':520 'mode':179 'multi':441 'multi-imag':440 'must':461 'name':556,606 'natur':380,388,583 'none':187 'number':272,505 'n每段1':278 'n每段1-2句话':277 'n用换行分段':276 'object':603 'ok':521 'open':633 'optim':433 'option':92,262,553 'output':56,118,134,320,557,585,586,604,631 'overlay':217 'overrid':412 'per':233,454,469,478 'person':378 'pink':391 'plan':160 'png':615 'pngs':60 'point':299 'present':324 'preset':579 'preview':635 'profession':17,48 'prompt':261,265 'proper':24 'pure':522 'python3':84 'quick':107 'r':90 'rate':450 're':336 'readi':65,337,617 'recommend':124 'red':393 'render':219 'requirements.txt':91 'review':332 'root':420,602 'rule':422 'scannabl':463 'select':399 'sentenc':499 'set':404,596 'setup':68 'short':498 'show':327 'simplifi':489 'skill':46,71,82 'skill-xhs-image-gen' 'slide':18,34,163,225,246,424,428,436,446,455,470,479,519,538,576 'slide-01-cover.png':607 'slide-02-content.png':608 'soft':365 'sound':543 'source-phy041' 'split':535 'start':108 'step':137,173,235,305,322,359,361 'step-by-step':358 'stori':379 'structur':14,53 'style':178,346 'subtitl':252 'summari':168,296,432 'tag':255 'take':397 'target':157 'tech':368 'tell':493 'templat':111,122,172,228,241,344,345,401,405,555,565,577,578 'template-on':110 'test':622 'text':221,452,530 'titl':249,270,285,297,456 'tone':485,491 'tool':370 'top':223 'topic':141,150,155 'topic-agent-skills' 'topic-ai-agents' 'topic-automation' 'topic-claude' 'topic-founder' 'topic-indie-hacker' 'topic-openclaw' 'topic-social-media' 'trigger':27 'true':245,599 'tutori':242,349,357,580 'type':247,268,283,295 'typographi':22,64 'understand':139,153 'upload':67,340,620 'use':96,183,206,227 'user':143,326 'vagu':506 'venv':86,87 'venv/bin/pip':88 'venv/bin/python3':115,128,317,628 'vertic':59,614 'via':202,594 'wall':528 'warm':372,582 'well':386 'white':220,350 'word':547 'workflow':136 'write':486 'x':151 'xhs':2,25,30,33,40,43,147,437,526,619 'xhs-image-gen':1 'xiaohongshu':6,49,342 '做小红书图':29 '全网最强':551 '关注我获取更多干货':304 '分类标签':256 '副标题':253 '可选':281 '大标题':250 '小红书':7 '小红书配图':35 '工具列表':287 '总结':298 '时间':509 '朋友分享':490 '核心收获一':300 '核心收获三':302 '核心收获二':301 '清单':286 '省90':508 '第一个要点':271 '第一项':289 '第三项':293 '第二项':291 '简短有力':251 '简短说明':290,292,294 '节省大量时间':510 '补充说明':254 '详细说明':275 '重点提示框内容':282 '革命性':549 '颠覆':548","prices":[{"id":"e0683b0c-afa7-425e-a216-942f36ae611a","listingId":"9273d5c3-cc42-4586-a168-ce53dd407a99","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"PHY041","category":"claude-agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-19T00:41:14.359Z"}],"sources":[{"listingId":"9273d5c3-cc42-4586-a168-ce53dd407a99","source":"github","sourceId":"PHY041/claude-agent-skills/xhs-image-gen","sourceUrl":"https://github.com/PHY041/claude-agent-skills/tree/main/skills/xhs-image-gen","isPrimary":false,"firstSeenAt":"2026-04-19T00:41:14.359Z","lastSeenAt":"2026-04-22T13:03:32.815Z"}],"details":{"listingId":"9273d5c3-cc42-4586-a168-ce53dd407a99","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"PHY041","slug":"xhs-image-gen","github":{"repo":"PHY041/claude-agent-skills","stars":13,"topics":["agent-skills","ai-agents","automation","claude","founder","indie-hacker","openclaw","social-media"],"license":null,"html_url":"https://github.com/PHY041/claude-agent-skills","pushed_at":"2026-02-24T15:25:20Z","description":"Collection of Claude Code Agent Skills for founders, indie hackers, and growth engineers","skill_md_sha":"3c947a05b130d001ada9d8a27cdf4c1f0d73cd70","skill_md_path":"skills/xhs-image-gen/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/PHY041/claude-agent-skills/tree/main/skills/xhs-image-gen"},"layout":"multi","source":"github","category":"claude-agent-skills","frontmatter":{"name":"xhs-image-gen","description":"Generate Xiaohongshu (小红书) carousel images (3:4, 1080x1440) from structured content. Creates professional slide decks with Chinese typography and proper XHS formatting. Triggers on \"做小红书图\", \"xhs images\", \"generate xhs slides\", \"小红书配图\", \"carousel images\", or any XHS image generation request."},"skills_sh_url":"https://skills.sh/PHY041/claude-agent-skills/xhs-image-gen"},"updatedAt":"2026-04-22T13:03:32.815Z"}}