[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MKETFRYB4Q89Y043Y6JMZ6":3,"skill-same:01M6MKETFRYB4Q89Y043Y6JMZ6":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6MKETFRYB4Q89Y043Y6JMZ6","gen-social",null,"Generate platform-specific social media copy and images for content distribution","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Focto-patch\u002FMorningAI\u002Fskills\u002Fgen-social\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"social","gen social","generate","content","Media","social media","images","platform","distribution","copy","content distribution","for","2026-11-10 10:12:30",false,"---\nname: gen-social\nversion: \"1.3.0\"\ndescription: Generate platform-specific social media copy and images for content distribution\n---\n\n## Objective\n\nTransform the daily AI news report into platform-optimized social media content. Generates ready-to-post copy and adapted images for multiple platforms, with support for multiple accounts and styles per platform.\n\n**Phase 1 scope**: Generate copy files + images. No auto-publish (future phase).\n\n---\n\n## Supported Platforms\n\n### X \u002F Twitter\n\n| Constraint | Value |\n|------------|-------|\n| Single tweet | 280 characters max |\n| Thread | Unlimited tweets (recommended 5-15) |\n| Images per tweet | Up to 4, 16:9 or 1:1 |\n| Hashtags | 2-3 per tweet |\n| Mentions | @handle format |\n\n### Xiaohongshu (Little Red Book)\n\n| Constraint | Value |\n|------------|-------|\n| Title | 20 characters max |\n| Body | 1000 characters max |\n| Images | Up to 9 per post, 3:4 or 1:1 (carousel) |\n| Tags | 5-10 # tags at end of body |\n| Emoji | Heavy use expected (platform culture) |\n\n---\n\n## Style Definitions\n\n### Custom Personas & Styles\n\nTemplates define the voice, tone, and format for each channel. This repo ships with **one example template per platform** as a starting point:\n\n- **X**: `templates\u002Fx\u002Finsider.md` (Tech Insider persona)\n- **Xiaohongshu**: `templates\u002Fxiaohongshu\u002Feducational.md`\n\nTo create your own persona or style:\n\n```bash\n# X persona\ncp skills\u002Fgen-social\u002Ftemplates\u002Fx\u002Finsider.md skills\u002Fgen-social\u002Ftemplates\u002Fx\u002Fmy-persona.md\n\n# Xiaohongshu style\ncp skills\u002Fgen-social\u002Ftemplates\u002Fxiaohongshu\u002Feducational.md skills\u002Fgen-social\u002Ftemplates\u002Fxiaohongshu\u002Fmy-style.md\n```\n\nEdit the copy, then set your channel config `style` field to match the filename (e.g. `\"style\": \"my-persona\"`). Custom templates in these directories are gitignored — your personas stay local.\n\n### X Styles\n\nEach X style has a distinct **persona** — a consistent voice and perspective that makes the account feel like a real person, not a news feed.\n\n**Available styles:**\n\n| Style | Persona | Template | Tone | Default Items | Min Score |\n|-------|---------|----------|------|---------------|-----------|\n| `briefing` | Daily Briefing | `templates\u002Fx\u002Fbriefing.md` | Clean scannable index + infographic image, neutral | 5 | 6 |\n| `insider` | Razor | `templates\u002Fx\u002Finsider.md` | Devastating one-liners, deadpan, says the quiet part loud | 3 | 7 |\n| `commentary` | Builder | `templates\u002Fx\u002Fcommentary.md` | First-person practical, opinionated hot takes, @levelsio meets @karpathy | 3 | 8 |\n| `thread` | Hype-Free Analyst | `templates\u002Fx\u002Fthread.md` | Data-driven thread, contrarian, pattern recognition, @Benedict Evans | 5 | 6 |\n\n### Xiaohongshu Styles\n\n**Available styles:**\n\n| Style | Template | Tone | Default Items | Min Score |\n|-------|----------|------|---------------|-----------|\n| `news-briefing` | `templates\u002Fxiaohongshu\u002Fnews-briefing.md` | Telegraph speed-scan, priority indicators | 5-8 | 5 |\n| `educational` | `templates\u002Fxiaohongshu\u002Feducational.md` | Structured explainer, numbered, \"one article to understand it all\" | 3-5 | 6 |\n| `recommendation` | `templates\u002Fxiaohongshu\u002Frecommendation.md` | Enthusiastic discovery, heavy emoji, \"must see!\" | 3 | 7 |\n\n---\n\n## Channel Configuration\n\nA **channel** is the core abstraction: one channel = one platform + one style + one language + content selection rules. Each channel produces an independent set of output files.\n\n### Channel Config File\n\nLocated at `~\u002F.config\u002Fmorning-ai\u002Fsocial_channels.json` (or path set via `SOCIAL_CHANNELS_FILE`).\n\n```json\n[\n  {\n    \"id\": \"x_insider_en\",\n    \"platform\": \"x\",\n    \"style\": \"insider\",\n    \"lang\": \"en\",\n    \"items\": 3,\n    \"min_score\": 7,\n    \"image\": true,\n    \"image_aspect\": \"16:9\"\n  },\n  {\n    \"id\": \"x_thread_en\",\n    \"platform\": \"x\",\n    \"style\": \"thread\",\n    \"lang\": \"en\",\n    \"items\": 5,\n    \"min_score\": 6,\n    \"image\": true,\n    \"image_aspect\": \"16:9\"\n  },\n  {\n    \"id\": \"xhs_kepu_zh\",\n    \"platform\": \"xiaohongshu\",\n    \"style\": \"educational\",\n    \"lang\": \"zh\",\n    \"items\": 5,\n    \"min_score\": 6,\n    \"image\": true,\n    \"image_aspect\": \"3:4\",\n    \"image_count\": 4\n  },\n  {\n    \"id\": \"xhs_zhongcao_zh\",\n    \"platform\": \"xiaohongshu\",\n    \"style\": \"recommendation\",\n    \"lang\": \"zh\",\n    \"items\": 3,\n    \"min_score\": 7,\n    \"image\": true,\n    \"image_aspect\": \"3:4\",\n    \"image_count\": 3\n  }\n]\n```\n\n### Channel Fields\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `id` | string | Yes | Unique channel identifier, used in output filenames |\n| `platform` | string | Yes | `x` or `xiaohongshu` |\n| `style` | string | Yes | Style name (see Style Definitions above) |\n| `lang` | string | Yes | Language code: `en`, `zh`, `ja`, etc. |\n| `items` | number | No | Max items to include (default: from template) |\n| `min_score` | number | No | Minimum score threshold (default: from template) |\n| `image` | boolean | No | Generate images for this channel (default: `false`) |\n| `image_aspect` | string | No | Image aspect ratio: `16:9`, `1:1`, `3:4` (default: platform default) |\n| `image_count` | number | No | Number of carousel images for xiaohongshu (default: 1) |\n| `image_style` | string | No | Override image style: `classic`, `dark`, `glassmorphism`, `newspaper`, `tech`, `cover-hook` (default: persona's recommended style). Note: `cover-hook` is special — it is intended only for the FIRST image of a Xiaohongshu carousel (the thumbnail in the discovery feed). Subsequent images should use the channel's regular style. |\n| `include_types` | array | No | Filter by content types, e.g. `[\"model\", \"product\"]` (default: all) |\n| `kol_voice_only` | boolean | No | If `true`, only items with `is_kol_voice: true` are eligible for selection. Used by the dedicated KOL channel so that KOL original commentary becomes the post's main topic, not embedded inside an unrelated post. (default: `false`) |\n| `conditional` | string | No | Conditional run gate. Currently supported: `viral_only` (max score ≥ `min_score`) and `kol_voice_available` (at least one item with `is_kol_voice: true` and `score ≥ min_score`). If the gate fails, the channel produces an empty manifest entry (no copy file, no images) and downstream consumers (e.g. foreman publish adapter) should skip the run gracefully. |\n\n### Quick Setup (Single Channel via Env Vars)\n\nWhen only one channel is needed, use env vars instead of a JSON file:\n\n```bash\nSOCIAL_PLATFORM=x\nSOCIAL_STYLE=insider\nSOCIAL_LANG=en\n```\n\nThis creates a single channel with id `{platform}_{style}_{lang}`.\n\n---\n\n## Content Selection Rules\n\nFor each channel, select items from the daily report data:\n\n1. **Filter by score**: only items with `importance >= min_score`\n2. **Filter by type**: if `include_types` is set, only those content types\n3. **Filter by KOL voice flag**: if `kol_voice_only: true` is set, only items where `is_kol_voice: true`\n4. **Sort by score**: highest first\n5. **Limit**: take top N items (from channel `items` setting or template default)\n6. **Translate**: if source data language differs from channel `lang`, translate content. Entity names (proper nouns) stay unchanged.\n\n### Conditional Channels (Pre-Selection Gate)\n\n**This check runs BEFORE the 5 steps above.** Some channels only make sense on certain days (e.g. a viral-only channel that should only post when there's a genuinely big story). These channels declare a `conditional` field — the value tells the pipeline what gate to apply:\n\n| `conditional` value | Gate logic |\n|---|---|\n| (omitted) | Always run (default) |\n| `viral_only` | Channel runs ONLY if `max(item.importance for item in today's data) >= channel.min_score`. If no item clears the threshold, the channel is skipped. |\n| `kol_voice_available` | Channel runs ONLY if at least one item has `is_kol_voice: true` AND `score >= channel.min_score`. If no qualifying KOL voice exists today, the channel is skipped. Used by the dedicated KOL channel so that on quiet KOL days the post is not forced. |\n\n**When a conditional channel is gated off:**\n\n1. Do NOT generate a copy file or images for this channel\n2. Still emit a manifest entry, but with a `skipped: true` field and a `skip_reason` explaining why (e.g. `\"max score 7.8 \u003C required 8.5\"`)\n3. Required manifest entry shape for skipped conditional channels:\n   ```json\n   {\n     \"id\": \"xhs_zhongcao_viral_zh\",\n     \"platform\": \"xiaohongshu\",\n     \"style\": \"single-topic\",\n     \"skipped\": true,\n     \"skip_reason\": \"max score 7.8 \u003C required 8.5\"\n   }\n   ```\n4. Downstream publish adapters (e.g. foreman `daily-publish-xhs-2-viral`) detect `skipped: true` and mark their run as SKIPPED rather than FAILED.\n\n**Why this matters**: it lets us schedule a 12:00 viral-only post on the cron without generating empty\u002Flow-quality posts on slow news days. The viral channel only fires content when there's something worth firing about.\n\n---\n\n## Copy Generation\n\nFor each channel:\n\n1. Read the template: `{SKILL_DIR}\u002Fskills\u002Fgen-social\u002Ftemplates\u002F{platform}\u002F{style}.md`\n2. Select items using Content Selection Rules above\n3. Generate copy following the template's format rules, character limits, and tone\n4. Validate character counts against platform limits\n\n### Post-Generation Checklist\n\n- [ ] Character count within platform limits (280\u002Ftweet for X, 20 title + 1000 body for Xiaohongshu)\n- [ ] Language matches channel `lang` setting\n- [ ] Entity names preserved as proper nouns (not translated)\n- [ ] Source links included where template requires them\n- [ ] Hashtags\u002Ftags present and relevant\n- [ ] No score numbers displayed in copy (scores are internal only)\n\n---\n\n## Image Generation\n\nSocial images reuse the existing image generation infrastructure (`lib\u002Fimage_gen.py`) and the same providers (Gemini\u002FGPT\u002FMiniMax).\n\n### Image Language Rules\n\nImage text language **must match the target platform**, not the report source language:\n\n| Platform | Image Language | Header Text |\n|----------|---------------|-------------|\n| **X** | **English only** | \"MorningAI\" |\n| **Xiaohongshu** | **Chinese only** | \"MorningAI\" |\n\nAll card titles, bullet points, section headers, and any text rendered on the image must be in the platform's language. Entity names (proper nouns like OpenAI, DeepSeek) remain unchanged.\n\n### Persona–Image Style Mapping\n\nEach persona\u002Fstyle has a **recommended image style** that matches its voice. This overrides the global `IMAGE_STYLE` setting for social images.\n\n#### X Styles\n\n| Persona | Recommended Image Style | Images | Why |\n|---------|------------------------|--------|-----|\n| **briefing** (Daily Briefing) | `classic` | 1 cover + per-category (model\u002Fproduct\u002Fbenchmark\u002Ffunding) | Clean editorial, professional — cover indexes the day, per-category images go deeper |\n| **insider** (Tech Insider) | `tech` | 0 | Razor is pure text — images dilute the punchline |\n| **commentary** (Builder) | `dark` | 0 | Builder takes stand alone — bold text, no visual crutch |\n| **thread** (Hype-Free Analyst) | `classic` | 1 cover | Clean editorial magazine — serious, data-focused, no visual noise |\n\n#### Xiaohongshu Styles\n\n| Style | Default Image Style | Images | Why |\n|-------|---------------------|--------|-----|\n| **recommendation** | `glassmorphism` | 3 carousel | Frosted glass, warm tones — lifestyle\u002Fdiscovery aesthetic |\n| **educational** | `classic` | 4 carousel | Clean editorial — structured, authoritative content |\n| **news-briefing** | `newspaper` | 1 | Classic newsprint — information-dense, professional |\n\n> **IMPORTANT**: If the channel config has an explicit `image_style` field, that takes absolute priority over the defaults above. Do NOT include style labels or content-type annotations in image prompts.\n\n#### Briefing Per-Category Images\n\nThe **briefing** channel generates additional per-category images beyond the cover, mirroring how `gen-infographic` handles per-type infographics:\n\n| Image | Filename | Generated When |\n|-------|----------|----------------|\n| Cover | `social_{DATE}_x_briefing_en_cover.png` | Always |\n| Model | `social_{DATE}_x_briefing_en_model.png` | ≥1 Model item with score ≥ min_score |\n| Product | `social_{DATE}_x_briefing_en_product.png` | ≥1 Product item with score ≥ min_score |\n| Benchmark | `social_{DATE}_x_briefing_en_benchmark.png` | ≥1 Benchmark item with score ≥ min_score |\n| Funding | `social_{DATE}_x_briefing_en_funding.png` | ≥1 Funding item with score ≥ min_score |\n\nPer-category images:\n- Same classic style as cover, 16:9 landscape\n- Header: \"MorningAI — {Type} Updates\" (no date — consistent with infographic per-type images)\n- Include ALL qualifying items of that type (not limited to the channel `items` cap)\n- Each card: entity + event + 2-3 bullet points\n\nThe recommended style is a default — channels can override via `image_style` field in the channel config. If not set, the persona's recommended style is used. If no persona mapping exists, falls back to the global `IMAGE_STYLE` setting.\n\n### Platform-Specific Image Adaptation\n\n**X images**:\n- Aspect ratio: 16:9 (landscape) or 1:1 (square)\n- **All text in English** — titles, bullets, headers, everything\n- Header: \"MorningAI\"\n- Apply the persona's recommended image style (see mapping above)\n- Single image per tweet (or up to 4 for threads)\n\n**Xiaohongshu images**:\n- Aspect ratio: 3:4 (portrait) or 1:1 (square)\n- **All text in Chinese** — titles, bullets, headers, everything\n- Header: \"MorningAI\"\n- Apply the style's recommended image style (see mapping above), plus Xiaohongshu-specific adaptations:\n  - Larger font sizes for mobile readability\n  - Rounded card corners (16px)\n  - Emoji-style bullet markers\n- Carousel strategy (when `image_count > 1`):\n  - Image 1: Cover overview — top headlines, eye-catching title\n  - Image 2-N: Detail pages — 1-2 items per image with expanded bullet points\n  - Last image: Follow\u002Fsubscribe CTA (optional)\n\n### Image Prompt Template\n\n```\n{ASPECT} infographic, {HEADER_TEXT} {YYYY-MM-DD}, ALL text content in {LANG}.\n\nTotal news items: {N}\n\nNews cards (display EXACTLY {N} cards):\n\nCard 1: {Entity name} {Event subject} {Core event verb phrase}\n- {Point 1}\n- {Point 2}\n- {Point 3}\n\n(... list according to actual item count ...)\n\nCRITICAL RULES:\n- ALL text on this image MUST be in {LANG} — titles, bullet points, headers, labels, everything\n- Entity names are proper nouns (OpenAI, DeepSeek, Cursor) — keep as-is, do NOT translate\n- Do NOT display ANY platform names on the image (no \"小红书\", \"Xiaohongshu\", \"特刊\", \"Twitter\", \"X\" etc.) — the image is content, not an ad for the platform\n- Header text: \"{HEADER_TEXT}\"\n- Each card title MUST include: Entity name + Event subject + Event description\n- Display complete titles, do NOT truncate\n- Do NOT display score numbers, score badges, or importance markers\n- Do NOT invent items not listed\n- Display ALL bullet points for each card\n- Maximize content area — card titles and bullet points are the primary focus\n\nANTI-AI-SLOP RULES (mandatory — ref: huashu-design):\n- NO purple\u002Flavender\u002Fviolet gradients — this is the #1 \"AI-generated\" tell\n- NO emoji as bullet markers or icons — use typographic bullets (·, —, or numbered)\n- NO rounded-corner cards with colored left border accent — the 2020-2024 AI slop archetype\n- NO Inter\u002FRoboto\u002FArial\u002Fsystem fonts as display — use serif display fonts (Noto Serif, Source Serif, Georgia)\n- NO neon glow, glassmorphism, or frosted glass effects\n- NO decorative icons per heading — if an icon doesn't carry information, remove it\n- NO flat digital color blocks — use paper\u002Fmaterial texture feel\n- Color restraint: black + cream\u002Fwhite + ONE accent color max. Do NOT invent extra colors\n- Typography IS the visual language — let font weight, size, and spacing create hierarchy, not color\u002Fshape decoration\n- One detail at 120%, everything else at 80% — not uniformly polished, but sharp where it counts\n- Describe mood, not pixel coordinates — \"feels like a morning broadsheet\" beats \"title at top, 36pt, centered\"\n\n{STYLE_BLOCK}\n{PLATFORM_STYLE_ADDON}\n```\n\n**Variable substitution:**\n- `{HEADER_TEXT}` → \"MorningAI\" for X, \"MorningAI\" for Xiaohongshu\n- `{LANG}` → \"English\" for X, \"Chinese\" for Xiaohongshu\n- `{STYLE_BLOCK}` → from the persona's recommended image style (see `skills\u002Fgen-infographic\u002FSKILL.md` Style Presets)\n\n**`{PLATFORM_STYLE_ADDON}`** for Xiaohongshu — **use the matching style variant based on the channel's `image_style` field**:\n\n**When `image_style` = `glassmorphism`:**\n```\nAdditional Xiaohongshu adaptation (glassmorphism):\n- ALL text must be in Chinese (except entity proper nouns)\n- Soft gradient background (lavender to pale rose)\n- Semi-transparent frosted white cards with backdrop blur\n- Use rounded corners (16px) on all cards\n- Larger title font (22pt bold) for mobile readability\n- Warm accent colors: coral (#FF6B6B), soft pink (#FFB4B4), lavender (#E8EAF6)\n- Emoji bullet markers (colored dots or sparkle symbols)\n- Clean, fresh, lifestyle-magazine aesthetic\n- Generous padding and line spacing for mobile screens\n```\n\n**When `image_style` = `newspaper`:**\n```\nAdditional Xiaohongshu adaptation (newspaper):\n- ALL text must be in Chinese (except entity proper nouns)\n- Mood: feels like unfolding a quality morning broadsheet — authoritative, calm, information-dense, zero decoration\n- Warm cream background (#FFF8E7) with subtle paper grain texture — NOT flat digital white\n- Typography IS the design: bold serif headers (Noto Serif CJK \u002F Source Han Serif \u002F Georgia feel), clean sans-serif body\n- Typographic hierarchy through font weight (700 headers, 400 body) and size contrast — NOT through color or shape\n- Thin black hairline rules (1px) between sections, like column dividers in a broadsheet\n- NO card backgrounds, NO rounded corners, NO shadows, NO colored borders — pure typographic layout\n- Color: cream + deep black + crimson (#DC143C) accent ONLY — crimson used sparingly (dateline, one key number, or a thin rule)\n- Bullet markers: typographic only (· or —), NEVER emoji\n- One signature detail at 120%: the headline typography should feel crafted, like a newspaper masthead\n- Generous line spacing (1.6+) for mobile readability, but information-dense — fill the space with content, not decoration\n- DO NOT use gradients, frosted glass, glow effects, or any \"digital\" aesthetic\n- The image should look like it was typeset, not generated\n```\n\n**When `image_style` = `cover-hook`:** (FIRST image of XHS carousel ONLY — this is the discovery-feed thumbnail)\n```\nAdditional Xiaohongshu adaptation (cover-hook):\n- ALL text must be in Chinese (except entity proper nouns)\n- Mood: a newspaper EXTRA edition headline — urgent, bold, one statement that demands attention, but with editorial class, not digital loudness\n- 3:4 single card, super-large title text occupying ≥ 50% of canvas\n- Title text = the post title or its strongest 1-line variant (e.g., \"Cursor 估值飙到 500 亿\")\n- ONE single subtitle line below with the most striking concrete data point (e.g., \"3 年达 20 亿 ARR · 史上最快 B2B\")\n- Newspaper headline poster aesthetic:\n  - Warm cream (#FFF8E7) with bold black serif title, OR deep charcoal (#1A1A1A) with cream\u002Foff-white serif title\n  - Bold serif typography (Noto Serif CJK \u002F Source Han Serif \u002F Georgia feel), weight ≥ 700\n  - Paper grain texture — NOT flat digital color blocks\n- Thin crimson (#DC143C) hairline rule above or below the headline — the ONE signature detail at 120%\n- Optional: small \"MorningAI\" masthead at very top in small caps, like a newspaper nameplate — restrained, not decorative\n- NO bullet points, NO emoji, NO icons, NO small annotations — single statement only\n- NO body text, NO list of items, NO date stamps — only the headline + one subtitle line\n- NO gradients, NO glow, NO frosted glass, NO rounded corners — this is typeset, not generated\n- The cover should look like a broadsheet front page that was photographed, not a Canva template\n```\n\n**When `image_style` = `classic`:**\n```\nAdditional Xiaohongshu adaptation (classic):\n- ALL text must be in Chinese (except entity proper nouns)\n- Off-white background (#F5F5F0), clean editorial magazine layout\n- Card-based layout with subtle shadows\n- Navy (#1B2A4A), coral (#E8634A), teal (#2A9D8F) accent palette\n- Use rounded corners (8px) on cards\n- Larger title font for mobile readability\n- Structured, authoritative visual hierarchy\n- Generous padding and line spacing for mobile screens\n```\n\n**`{PLATFORM_STYLE_ADDON}`** for X (append to any base style):\n```\nAdditional X\u002FTwitter adaptation:\n- ALL text must be in English (except entity proper nouns)\n- Optimized for timeline scroll — key info visible at small preview size\n- High contrast text for readability on mobile\n```\n\n### Generating Images\n\nUse the same methods as Step 4 (gen-infographic):\n\n**Option A** — Native tool (if supported):\nGenerate each image using built-in image generation capability.\n\n**Option B** — Python script batch mode:\nBuild a manifest JSON and run:\n```bash\ncd {SKILL_DIR} && python3 skills\u002Fgen-infographic\u002Fscripts\u002Fgen_infographic.py --batch {CWD}\u002Fsocial\u002Fmanifest_images.json\n```\n\nManifest entries support `\"aspect_ratio\": \"3:4\"` for Xiaohongshu images.\n\n#### Cover-Hook for Xiaohongshu Carousels\n\nFor Xiaohongshu channels with `image_count >= 2` AND style `recommendation` or `single-topic`, the **first image** of the carousel is the discovery-feed thumbnail and MUST use the `cover-hook` style addon (regardless of the channel's regular `image_style`):\n\n- Image 1 → use `{PLATFORM_STYLE_ADDON}` for `cover-hook`. Content = post title + ONE strongest data point. No bullet points, no list of items.\n- Image 2..N → use the channel's regular `image_style` (e.g., `newspaper`). Content = the per-item news cards as before.\n\nThis applies because the first image is what stops the scroll in the discovery feed; an information-dense newspaper card is unreadable as a thumbnail. Channels that already declare `image_style: cover-hook` explicitly should apply it to ALL images (rare — typically reserved for single-image posts).\n\n---\n\n## Output Files\n\nAll output goes to `{CWD}\u002Fsocial\u002F` directory.\n\n### Naming Convention\n\n```\nsocial\u002F\n├── social_{DATE}_{channel_id}.md              # Copy file\n├── social_{DATE}_{channel_id}_cover.png       # Single\u002Fcover image\n├── social_{DATE}_{channel_id}_{N}.png         # Carousel image N\n└── social_{DATE}_manifest.json                # Output index\n```\n\n### Manifest Format\n\n> **MANDATORY SCHEMA — DO NOT IMPROVISE FIELD NAMES OR PATHS**\n>\n> The manifest is consumed by downstream tools that match on exact field\n> names and assume flat filenames. Past LLM-generated output has drifted\n> in ways that silently break consumers (`channel_id` instead of `id`,\n> `copy` instead of `copy_file`, paths prefixed with `social\u002F`). This\n> section is the contract — produce it byte-for-byte as specified.\n\n**Required top-level shape:**\n- `channels` MUST be a JSON **array** (list). Never a dict keyed by id.\n\n**Required per-channel fields** — use these exact names, no aliases:\n\n| Field | Type | Required | Notes |\n|-------|------|----------|-------|\n| `id` | string | Yes | Channel identifier. **Field name is `id`, NOT `channel_id`.** |\n| `platform` | string | Yes | `x` or `xiaohongshu` |\n| `style` | string | Yes | Style name |\n| `lang` | string | Yes | `en`, `zh`, `ja`, etc. |\n| `copy_file` | string | Conditional | **Filename only** (no directory prefix). Field name is `copy_file`, NOT `copy`. **Omit this field if `skipped: true`.** |\n| `images` | array\u003Cstring> | Conditional | **Filenames only** (no directory prefix). Empty list `[]` if no images. **Omit this field if `skipped: true`.** |\n| `items_used` | number | No | Count of source items included |\n| `skipped` | boolean | No | Set to `true` for conditional channels that did not meet their gate (e.g. viral_only with no item ≥ min_score). When `true`, omit `copy_file` and `images`. |\n| `skip_reason` | string | Conditional | Required when `skipped: true`. Short explanation, e.g. `\"max score 7.8 \u003C required 8.5\"`. |\n\n**Path rules — applies to `copy_file` and every entry in `images`:**\n- Write the **bare filename** as it appears under `social\u002F` (e.g. `social_2026-04-18_xhs_zixun_zh.md`).\n- Do **NOT** include any directory component — no `social\u002F`, no `.\u002F`, no absolute path.\n- Wrong: `\"copy_file\": \"social\u002Fsocial_2026-04-18_xhs_zixun_zh.md\"` ❌\n- Right: `\"copy_file\": \"social_2026-04-18_xhs_zixun_zh.md\"` ✅\n\n**Canonical example** (copy this shape exactly):\n\n```json\n{\n  \"date\": \"2026-04-14\",\n  \"channels\": [\n    {\n      \"id\": \"x_insider_en\",\n      \"platform\": \"x\",\n      \"style\": \"insider\",\n      \"lang\": \"en\",\n      \"copy_file\": \"social_2026-04-14_x_insider_en.md\",\n      \"images\": [\"social_2026-04-14_x_insider_en_cover.png\"],\n      \"items_used\": 3\n    },\n    {\n      \"id\": \"xhs_kepu_zh\",\n      \"platform\": \"xiaohongshu\",\n      \"style\": \"educational\",\n      \"lang\": \"zh\",\n      \"copy_file\": \"social_2026-04-14_xhs_kepu_zh.md\",\n      \"images\": [\n        \"social_2026-04-14_xhs_kepu_zh_1.png\",\n        \"social_2026-04-14_xhs_kepu_zh_2.png\",\n        \"social_2026-04-14_xhs_kepu_zh_3.png\",\n        \"social_2026-04-14_xhs_kepu_zh_4.png\"\n      ],\n      \"items_used\": 5\n    },\n    {\n      \"id\": \"xhs_zhongcao_viral_zh\",\n      \"platform\": \"xiaohongshu\",\n      \"style\": \"single-topic\",\n      \"lang\": \"zh\",\n      \"skipped\": true,\n      \"skip_reason\": \"max score 7.8 \u003C required 8.5\"\n    }\n  ]\n}\n```\n\n**Forbidden variants** (all of these have been observed in real output and\nbreak downstream consumers — do not produce them):\n\n```json\n\u002F\u002F ❌ WRONG — \"channel_id\" is not a recognized field\n{ \"channel_id\": \"xhs_zixun_zh\", ... }\n\n\u002F\u002F ❌ WRONG — \"copy\" is not a recognized field\n{ \"id\": \"xhs_zixun_zh\", \"copy\": \"...\", ... }\n\n\u002F\u002F ❌ WRONG — paths must be bare filenames\n{ \"copy_file\": \"social\u002Fsocial_2026-04-18_xhs_zixun_zh.md\",\n  \"images\": [\"social\u002Fsocial_2026-04-18_xhs_zixun_zh_1.png\"] }\n\n\u002F\u002F ❌ WRONG — channels must be a list, not a dict keyed by id\n{ \"channels\": { \"xhs_zixun_zh\": { ... } } }\n```\n\nBefore writing the manifest file, mentally diff your output against the\ncanonical example above. If any field name, structure, or path shape\ndiffers, fix it before writing.\n\n---\n\n## Workflow Summary\n\n1. Check if social content is enabled (`SOCIAL_ENABLED=true`)\n2. Load channel configuration (JSON file or env vars)\n3. For each channel:\n   a. **Conditional gate**: if the channel has a `conditional` field, evaluate the gate. If it fails, write a manifest entry with `skipped: true` + `skip_reason` and continue to the next channel — do NOT generate copy or images.\n   b. Read the channel's template file\n   c. Select top items from report data (score filter + item limit)\n   d. Generate copy following template rules and character limits\n   e. Write copy to `social\u002F{DATE}_{channel_id}.md`\n   f. If `image: true` — build image prompts and generate platform-adapted images. For XHS carousels with style `recommendation` or `single-topic`, the FIRST image uses the `cover-hook` style addon; subsequent images use the channel's regular `image_style`.\n   g. Write images to `social\u002F{DATE}_{channel_id}_{N}.png`\n4. Write manifest to `social\u002F{DATE}_manifest.json`\n\n---\n\n## Notes\n\n- Channels are fully independent — each reads from the same daily data but produces separate output\n- Multiple channels can target the same platform with different styles, languages, or content focus\n- **Image language follows the platform**: X images are always English, Xiaohongshu images are always Chinese — regardless of the channel `lang` setting for copy\n- **Image style follows the persona**: each persona\u002Fstyle has a recommended image style that matches its voice (see Persona–Image Style Mapping). Channels can override via `image_style` field\n- All content must respect platform character limits — validation is mandatory\n- Entity names are proper nouns and must NOT be translated regardless of `lang` setting\n- When the same item appears in multiple channels, each channel generates its own adapted version independently\n","## Objective\n\nTransform the daily AI news report into platform-optimized social media content. Generates ready-to-post copy and adapted images for multiple platforms, with support for multiple accounts and styles per platform.\n\n**Phase 1 scope**: Generate copy files + images. No auto-publish (future phase).\n\n---\n\n## Supported Platforms\n\n### X \u002F Twitter\n\n| Constraint | Value |\n|------------|-------|\n| Single tweet | 280 characters max |\n| Thread | Unlimited tweets (recommended 5-15) |\n| Images per tweet | Up to 4, 16:9 or 1:1 |\n| Hashtags | 2-3 per tweet |\n| Mentions | @handle format |\n\n### Xiaohongshu (Little Red Book)\n\n| Constraint | Value |\n|------------|-------|\n| Title | 20 characters max |\n| Body | 1000 characters max |\n| Images | Up to 9 per post, 3:4 or 1:1 (carousel) |\n| Tags | 5-10 # tags at end of body |\n| Emoji | Heavy use expected (platform culture) |\n\n---\n\n## Style Definitions\n\n### Custom Personas & Styles\n\nTemplates define the voice, tone, and format for each channel. This repo ships with **one example template per platform** as a starting point:\n\n- **X**: `templates\u002Fx\u002Finsider.md` (Tech Insider persona)\n- **Xiaohongshu**: `templates\u002Fxiaohongshu\u002Feducational.md`\n\nTo create your own persona or style:\n\n```bash\n# X persona\ncp skills\u002Fgen-social\u002Ftemplates\u002Fx\u002Finsider.md skills\u002Fgen-social\u002Ftemplates\u002Fx\u002Fmy-persona.md\n\n# Xiaohongshu style\ncp skills\u002Fgen-social\u002Ftemplates\u002Fxiaohongshu\u002Feducational.md skills\u002Fgen-social\u002Ftemplates\u002Fxiaohongshu\u002Fmy-style.md\n```\n\nEdit the copy, then set your channel config `style` field to match the filename (e.g. `\"style\": \"my-persona\"`). Custom templates in these directories are gitignored — your personas stay local.\n\n### X Styles\n\nEach X style has a distinct **persona** — a consistent voice and perspective that makes the account feel like a real person, not a news feed.\n\n**Available styles:**\n\n| Style | Persona | Template | Tone | Default Items | Min Score |\n|-------|---------|----------|------|---------------|-----------|\n| `briefing` | Daily Briefing | `templates\u002Fx\u002Fbriefing.md` | Clean scannable index + infographic image, neutral | 5 | 6 |\n| `insider` | Razor | `templates\u002Fx\u002Finsider.md` | Devastating one-liners, deadpan, says the quiet part loud | 3 | 7 |\n| `commentary` | Builder | `templates\u002Fx\u002Fcommentary.md` | First-person practical, opinionated hot takes, @levelsio meets @karpathy | 3 | 8 |\n| `thread` | Hype-Free Analyst | `templates\u002Fx\u002Fthread.md` | Data-driven thread, contrarian, pattern recognition, @Benedict Evans | 5 | 6 |\n\n### Xiaohongshu Styles\n\n**Available styles:**\n\n| Style | Template | Tone | Default Items | Min Score |\n|-------|----------|------|---------------|-----------|\n| `news-briefing` | `templates\u002Fxiaohongshu\u002Fnews-briefing.md` | Telegraph speed-scan, priority indicators | 5-8 | 5 |\n| `educational` | `templates\u002Fxiaohongshu\u002Feducational.md` | Structured explainer, numbered, \"one article to understand it all\" | 3-5 | 6 |\n| `recommendation` | `templates\u002Fxiaohongshu\u002Frecommendation.md` | Enthusiastic discovery, heavy emoji, \"must see!\" | 3 | 7 |\n\n---\n\n## Channel Configuration\n\nA **channel** is the core abstraction: one channel = one platform + one style + one language + content selection rules. Each channel produces an independent set of output files.\n\n### Channel Config File\n\nLocated at `~\u002F.config\u002Fmorning-ai\u002Fsocial_channels.json` (or path set via `SOCIAL_CHANNELS_FILE`).\n\n```json\n[\n  {\n    \"id\": \"x_insider_en\",\n    \"platform\": \"x\",\n    \"style\": \"insider\",\n    \"lang\": \"en\",\n    \"items\": 3,\n    \"min_score\": 7,\n    \"image\": true,\n    \"image_aspect\": \"16:9\"\n  },\n  {\n    \"id\": \"x_thread_en\",\n    \"platform\": \"x\",\n    \"style\": \"thread\",\n    \"lang\": \"en\",\n    \"items\": 5,\n    \"min_score\": 6,\n    \"image\": true,\n    \"image_aspect\": \"16:9\"\n  },\n  {\n    \"id\": \"xhs_kepu_zh\",\n    \"platform\": \"xiaohongshu\",\n    \"style\": \"educational\",\n    \"lang\": \"zh\",\n    \"items\": 5,\n    \"min_score\": 6,\n    \"image\": true,\n    \"image_aspect\": \"3:4\",\n    \"image_count\": 4\n  },\n  {\n    \"id\": \"xhs_zhongcao_zh\",\n    \"platform\": \"xiaohongshu\",\n    \"style\": \"recommendation\",\n    \"lang\": \"zh\",\n    \"items\": 3,\n    \"min_score\": 7,\n    \"image\": true,\n    \"image_aspect\": \"3:4\",\n    \"image_count\": 3\n  }\n]\n```\n\n### Channel Fields\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `id` | string | Yes | Unique channel identifier, used in output filenames |\n| `platform` | string | Yes | `x` or `xiaohongshu` |\n| `style` | string | Yes | Style name (see Style Definitions above) |\n| `lang` | string | Yes | Language code: `en`, `zh`, `ja`, etc. |\n| `items` | number | No | Max items to include (default: from template) |\n| `min_score` | number | No | Minimum score threshold (default: from template) |\n| `image` | boolean | No | Generate images for this channel (default: `false`) |\n| `image_aspect` | string | No | Image aspect ratio: `16:9`, `1:1`, `3:4` (default: platform default) |\n| `image_count` | number | No | Number of carousel images for xiaohongshu (default: 1) |\n| `image_style` | string | No | Override image style: `classic`, `dark`, `glassmorphism`, `newspaper`, `tech`, `cover-hook` (default: persona's recommended style). Note: `cover-hook` is special — it is intended only for the FIRST image of a Xiaohongshu carousel (the thumbnail in the discovery feed). Subsequent images should use the channel's regular style. |\n| `include_types` | array | No | Filter by content types, e.g. `[\"model\", \"product\"]` (default: all) |\n| `kol_voice_only` | boolean | No | If `true`, only items with `is_kol_voice: true` are eligible for selection. Used by the dedicated KOL channel so that KOL original commentary becomes the post's main topic, not embedded inside an unrelated post. (default: `false`) |\n| `conditional` | string | No | Conditional run gate. Currently supported: `viral_only` (max score ≥ `min_score`) and `kol_voice_available` (at least one item with `is_kol_voice: true` and `score ≥ min_score`). If the gate fails, the channel produces an empty manifest entry (no copy file, no images) and downstream consumers (e.g. foreman publish adapter) should skip the run gracefully. |\n\n### Quick Setup (Single Channel via Env Vars)\n\nWhen only one channel is needed, use env vars instead of a JSON file:\n\n```bash\nSOCIAL_PLATFORM=x\nSOCIAL_STYLE=insider\nSOCIAL_LANG=en\n```\n\nThis creates a single channel with id `{platform}_{style}_{lang}`.\n\n---\n\n## Content Selection Rules\n\nFor each channel, select items from the daily report data:\n\n1. **Filter by score**: only items with `importance >= min_score`\n2. **Filter by type**: if `include_types` is set, only those content types\n3. **Filter by KOL voice flag**: if `kol_voice_only: true` is set, only items where `is_kol_voice: true`\n4. **Sort by score**: highest first\n5. **Limit**: take top N items (from channel `items` setting or template default)\n6. **Translate**: if source data language differs from channel `lang`, translate content. Entity names (proper nouns) stay unchanged.\n\n### Conditional Channels (Pre-Selection Gate)\n\n**This check runs BEFORE the 5 steps above.** Some channels only make sense on certain days (e.g. a viral-only channel that should only post when there's a genuinely big story). These channels declare a `conditional` field — the value tells the pipeline what gate to apply:\n\n| `conditional` value | Gate logic |\n|---|---|\n| (omitted) | Always run (default) |\n| `viral_only` | Channel runs ONLY if `max(item.importance for item in today's data) >= channel.min_score`. If no item clears the threshold, the channel is skipped. |\n| `kol_voice_available` | Channel runs ONLY if at least one item has `is_kol_voice: true` AND `score >= channel.min_score`. If no qualifying KOL voice exists today, the channel is skipped. Used by the dedicated KOL channel so that on quiet KOL days the post is not forced. |\n\n**When a conditional channel is gated off:**\n\n1. Do NOT generate a copy file or images for this channel\n2. Still emit a manifest entry, but with a `skipped: true` field and a `skip_reason` explaining why (e.g. `\"max score 7.8 \u003C required 8.5\"`)\n3. Required manifest entry shape for skipped conditional channels:\n   ```json\n   {\n     \"id\": \"xhs_zhongcao_viral_zh\",\n     \"platform\": \"xiaohongshu\",\n     \"style\": \"single-topic\",\n     \"skipped\": true,\n     \"skip_reason\": \"max score 7.8 \u003C required 8.5\"\n   }\n   ```\n4. Downstream publish adapters (e.g. foreman `daily-publish-xhs-2-viral`) detect `skipped: true` and mark their run as SKIPPED rather than FAILED.\n\n**Why this matters**: it lets us schedule a 12:00 viral-only post on the cron without generating empty\u002Flow-quality posts on slow news days. The viral channel only fires content when there's something worth firing about.\n\n---\n\n## Copy Generation\n\nFor each channel:\n\n1. Read the template: `{SKILL_DIR}\u002Fskills\u002Fgen-social\u002Ftemplates\u002F{platform}\u002F{style}.md`\n2. Select items using Content Selection Rules above\n3. Generate copy following the template's format rules, character limits, and tone\n4. Validate character counts against platform limits\n\n### Post-Generation Checklist\n\n- [ ] Character count within platform limits (280\u002Ftweet for X, 20 title + 1000 body for Xiaohongshu)\n- [ ] Language matches channel `lang` setting\n- [ ] Entity names preserved as proper nouns (not translated)\n- [ ] Source links included where template requires them\n- [ ] Hashtags\u002Ftags present and relevant\n- [ ] No score numbers displayed in copy (scores are internal only)\n\n---\n\n## Image Generation\n\nSocial images reuse the existing image generation infrastructure (`lib\u002Fimage_gen.py`) and the same providers (Gemini\u002FGPT\u002FMiniMax).\n\n### Image Language Rules\n\nImage text language **must match the target platform**, not the report source language:\n\n| Platform | Image Language | Header Text |\n|----------|---------------|-------------|\n| **X** | **English only** | \"MorningAI\" |\n| **Xiaohongshu** | **Chinese only** | \"MorningAI\" |\n\nAll card titles, bullet points, section headers, and any text rendered on the image must be in the platform's language. Entity names (proper nouns like OpenAI, DeepSeek) remain unchanged.\n\n### Persona–Image Style Mapping\n\nEach persona\u002Fstyle has a **recommended image style** that matches its voice. This overrides the global `IMAGE_STYLE` setting for social images.\n\n#### X Styles\n\n| Persona | Recommended Image Style | Images | Why |\n|---------|------------------------|--------|-----|\n| **briefing** (Daily Briefing) | `classic` | 1 cover + per-category (model\u002Fproduct\u002Fbenchmark\u002Ffunding) | Clean editorial, professional — cover indexes the day, per-category images go deeper |\n| **insider** (Tech Insider) | `tech` | 0 | Razor is pure text — images dilute the punchline |\n| **commentary** (Builder) | `dark` | 0 | Builder takes stand alone — bold text, no visual crutch |\n| **thread** (Hype-Free Analyst) | `classic` | 1 cover | Clean editorial magazine — serious, data-focused, no visual noise |\n\n#### Xiaohongshu Styles\n\n| Style | Default Image Style | Images | Why |\n|-------|---------------------|--------|-----|\n| **recommendation** | `glassmorphism` | 3 carousel | Frosted glass, warm tones — lifestyle\u002Fdiscovery aesthetic |\n| **educational** | `classic` | 4 carousel | Clean editorial — structured, authoritative content |\n| **news-briefing** | `newspaper` | 1 | Classic newsprint — information-dense, professional |\n\n> **IMPORTANT**: If the channel config has an explicit `image_style` field, that takes absolute priority over the defaults above. Do NOT include style labels or content-type annotations in image prompts.\n\n#### Briefing Per-Category Images\n\nThe **briefing** channel generates additional per-category images beyond the cover, mirroring how `gen-infographic` handles per-type infographics:\n\n| Image | Filename | Generated When |\n|-------|----------|----------------|\n| Cover | `social_{DATE}_x_briefing_en_cover.png` | Always |\n| Model | `social_{DATE}_x_briefing_en_model.png` | ≥1 Model item with score ≥ min_score |\n| Product | `social_{DATE}_x_briefing_en_product.png` | ≥1 Product item with score ≥ min_score |\n| Benchmark | `social_{DATE}_x_briefing_en_benchmark.png` | ≥1 Benchmark item with score ≥ min_score |\n| Funding | `social_{DATE}_x_briefing_en_funding.png` | ≥1 Funding item with score ≥ min_score |\n\nPer-category images:\n- Same classic style as cover, 16:9 landscape\n- Header: \"MorningAI — {Type} Updates\" (no date — consistent with infographic per-type images)\n- Include ALL qualifying items of that type (not limited to the channel `items` cap)\n- Each card: entity + event + 2-3 bullet points\n\nThe recommended style is a default — channels can override via `image_style` field in the channel config. If not set, the persona's recommended style is used. If no persona mapping exists, falls back to the global `IMAGE_STYLE` setting.\n\n### Platform-Specific Image Adaptation\n\n**X images**:\n- Aspect ratio: 16:9 (landscape) or 1:1 (square)\n- **All text in English** — titles, bullets, headers, everything\n- Header: \"MorningAI\"\n- Apply the persona's recommended image style (see mapping above)\n- Single image per tweet (or up to 4 for threads)\n\n**Xiaohongshu images**:\n- Aspect ratio: 3:4 (portrait) or 1:1 (square)\n- **All text in Chinese** — titles, bullets, headers, everything\n- Header: \"MorningAI\"\n- Apply the style's recommended image style (see mapping above), plus Xiaohongshu-specific adaptations:\n  - Larger font sizes for mobile readability\n  - Rounded card corners (16px)\n  - Emoji-style bullet markers\n- Carousel strategy (when `image_count > 1`):\n  - Image 1: Cover overview — top headlines, eye-catching title\n  - Image 2-N: Detail pages — 1-2 items per image with expanded bullet points\n  - Last image: Follow\u002Fsubscribe CTA (optional)\n\n### Image Prompt Template\n\n```\n{ASPECT} infographic, {HEADER_TEXT} {YYYY-MM-DD}, ALL text content in {LANG}.\n\nTotal news items: {N}\n\nNews cards (display EXACTLY {N} cards):\n\nCard 1: {Entity name} {Event subject} {Core event verb phrase}\n- {Point 1}\n- {Point 2}\n- {Point 3}\n\n(... list according to actual item count ...)\n\nCRITICAL RULES:\n- ALL text on this image MUST be in {LANG} — titles, bullet points, headers, labels, everything\n- Entity names are proper nouns (OpenAI, DeepSeek, Cursor) — keep as-is, do NOT translate\n- Do NOT display ANY platform names on the image (no \"小红书\", \"Xiaohongshu\", \"特刊\", \"Twitter\", \"X\" etc.) — the image is content, not an ad for the platform\n- Header text: \"{HEADER_TEXT}\"\n- Each card title MUST include: Entity name + Event subject + Event description\n- Display complete titles, do NOT truncate\n- Do NOT display score numbers, score badges, or importance markers\n- Do NOT invent items not listed\n- Display ALL bullet points for each card\n- Maximize content area — card titles and bullet points are the primary focus\n\nANTI-AI-SLOP RULES (mandatory — ref: huashu-design):\n- NO purple\u002Flavender\u002Fviolet gradients — this is the #1 \"AI-generated\" tell\n- NO emoji as bullet markers or icons — use typographic bullets (·, —, or numbered)\n- NO rounded-corner cards with colored left border accent — the 2020-2024 AI slop archetype\n- NO Inter\u002FRoboto\u002FArial\u002Fsystem fonts as display — use serif display fonts (Noto Serif, Source Serif, Georgia)\n- NO neon glow, glassmorphism, or frosted glass effects\n- NO decorative icons per heading — if an icon doesn't carry information, remove it\n- NO flat digital color blocks — use paper\u002Fmaterial texture feel\n- Color restraint: black + cream\u002Fwhite + ONE accent color max. Do NOT invent extra colors\n- Typography IS the visual language — let font weight, size, and spacing create hierarchy, not color\u002Fshape decoration\n- One detail at 120%, everything else at 80% — not uniformly polished, but sharp where it counts\n- Describe mood, not pixel coordinates — \"feels like a morning broadsheet\" beats \"title at top, 36pt, centered\"\n\n{STYLE_BLOCK}\n{PLATFORM_STYLE_ADDON}\n```\n\n**Variable substitution:**\n- `{HEADER_TEXT}` → \"MorningAI\" for X, \"MorningAI\" for Xiaohongshu\n- `{LANG}` → \"English\" for X, \"Chinese\" for Xiaohongshu\n- `{STYLE_BLOCK}` → from the persona's recommended image style (see `skills\u002Fgen-infographic\u002FSKILL.md` Style Presets)\n\n**`{PLATFORM_STYLE_ADDON}`** for Xiaohongshu — **use the matching style variant based on the channel's `image_style` field**:\n\n**When `image_style` = `glassmorphism`:**\n```\nAdditional Xiaohongshu adaptation (glassmorphism):\n- ALL text must be in Chinese (except entity proper nouns)\n- Soft gradient background (lavender to pale rose)\n- Semi-transparent frosted white cards with backdrop blur\n- Use rounded corners (16px) on all cards\n- Larger title font (22pt bold) for mobile readability\n- Warm accent colors: coral (#FF6B6B), soft pink (#FFB4B4), lavender (#E8EAF6)\n- Emoji bullet markers (colored dots or sparkle symbols)\n- Clean, fresh, lifestyle-magazine aesthetic\n- Generous padding and line spacing for mobile screens\n```\n\n**When `image_style` = `newspaper`:**\n```\nAdditional Xiaohongshu adaptation (newspaper):\n- ALL text must be in Chinese (except entity proper nouns)\n- Mood: feels like unfolding a quality morning broadsheet — authoritative, calm, information-dense, zero decoration\n- Warm cream background (#FFF8E7) with subtle paper grain texture — NOT flat digital white\n- Typography IS the design: bold serif headers (Noto Serif CJK \u002F Source Han Serif \u002F Georgia feel), clean sans-serif body\n- Typographic hierarchy through font weight (700 headers, 400 body) and size contrast — NOT through color or shape\n- Thin black hairline rules (1px) between sections, like column dividers in a broadsheet\n- NO card backgrounds, NO rounded corners, NO shadows, NO colored borders — pure typographic layout\n- Color: cream + deep black + crimson (#DC143C) accent ONLY — crimson used sparingly (dateline, one key number, or a thin rule)\n- Bullet markers: typographic only (· or —), NEVER emoji\n- One signature detail at 120%: the headline typography should feel crafted, like a newspaper masthead\n- Generous line spacing (1.6+) for mobile readability, but information-dense — fill the space with content, not decoration\n- DO NOT use gradients, frosted glass, glow effects, or any \"digital\" aesthetic\n- The image should look like it was typeset, not generated\n```\n\n**When `image_style` = `cover-hook`:** (FIRST image of XHS carousel ONLY — this is the discovery-feed thumbnail)\n```\nAdditional Xiaohongshu adaptation (cover-hook):\n- ALL text must be in Chinese (except entity proper nouns)\n- Mood: a newspaper EXTRA edition headline — urgent, bold, one statement that demands attention, but with editorial class, not digital loudness\n- 3:4 single card, super-large title text occupying ≥ 50% of canvas\n- Title text = the post title or its strongest 1-line variant (e.g., \"Cursor 估值飙到 500 亿\")\n- ONE single subtitle line below with the most striking concrete data point (e.g., \"3 年达 20 亿 ARR · 史上最快 B2B\")\n- Newspaper headline poster aesthetic:\n  - Warm cream (#FFF8E7) with bold black serif title, OR deep charcoal (#1A1A1A) with cream\u002Foff-white serif title\n  - Bold serif typography (Noto Serif CJK \u002F Source Han Serif \u002F Georgia feel), weight ≥ 700\n  - Paper grain texture — NOT flat digital color blocks\n- Thin crimson (#DC143C) hairline rule above or below the headline — the ONE signature detail at 120%\n- Optional: small \"MorningAI\" masthead at very top in small caps, like a newspaper nameplate — restrained, not decorative\n- NO bullet points, NO emoji, NO icons, NO small annotations — single statement only\n- NO body text, NO list of items, NO date stamps — only the headline + one subtitle line\n- NO gradients, NO glow, NO frosted glass, NO rounded corners — this is typeset, not generated\n- The cover should look like a broadsheet front page that was photographed, not a Canva template\n```\n\n**When `image_style` = `classic`:**\n```\nAdditional Xiaohongshu adaptation (classic):\n- ALL text must be in Chinese (except entity proper nouns)\n- Off-white background (#F5F5F0), clean editorial magazine layout\n- Card-based layout with subtle shadows\n- Navy (#1B2A4A), coral (#E8634A), teal (#2A9D8F) accent palette\n- Use rounded corners (8px) on cards\n- Larger title font for mobile readability\n- Structured, authoritative visual hierarchy\n- Generous padding and line spacing for mobile screens\n```\n\n**`{PLATFORM_STYLE_ADDON}`** for X (append to any base style):\n```\nAdditional X\u002FTwitter adaptation:\n- ALL text must be in English (except entity proper nouns)\n- Optimized for timeline scroll — key info visible at small preview size\n- High contrast text for readability on mobile\n```\n\n### Generating Images\n\nUse the same methods as Step 4 (gen-infographic):\n\n**Option A** — Native tool (if supported):\nGenerate each image using built-in image generation capability.\n\n**Option B** — Python script batch mode:\nBuild a manifest JSON and run:\n```bash\ncd {SKILL_DIR} && python3 skills\u002Fgen-infographic\u002Fscripts\u002Fgen_infographic.py --batch {CWD}\u002Fsocial\u002Fmanifest_images.json\n```\n\nManifest entries support `\"aspect_ratio\": \"3:4\"` for Xiaohongshu images.\n\n#### Cover-Hook for Xiaohongshu Carousels\n\nFor Xiaohongshu channels with `image_count >= 2` AND style `recommendation` or `single-topic`, the **first image** of the carousel is the discovery-feed thumbnail and MUST use the `cover-hook` style addon (regardless of the channel's regular `image_style`):\n\n- Image 1 → use `{PLATFORM_STYLE_ADDON}` for `cover-hook`. Content = post title + ONE strongest data point. No bullet points, no list of items.\n- Image 2..N → use the channel's regular `image_style` (e.g., `newspaper`). Content = the per-item news cards as before.\n\nThis applies because the first image is what stops the scroll in the discovery feed; an information-dense newspaper card is unreadable as a thumbnail. Channels that already declare `image_style: cover-hook` explicitly should apply it to ALL images (rare — typically reserved for single-image posts).\n\n---\n\n## Output Files\n\nAll output goes to `{CWD}\u002Fsocial\u002F` directory.\n\n### Naming Convention\n\n```\nsocial\u002F\n├── social_{DATE}_{channel_id}.md              # Copy file\n├── social_{DATE}_{channel_id}_cover.png       # Single\u002Fcover image\n├── social_{DATE}_{channel_id}_{N}.png         # Carousel image N\n└── social_{DATE}_manifest.json                # Output index\n```\n\n### Manifest Format\n\n> **MANDATORY SCHEMA — DO NOT IMPROVISE FIELD NAMES OR PATHS**\n>\n> The manifest is consumed by downstream tools that match on exact field\n> names and assume flat filenames. Past LLM-generated output has drifted\n> in ways that silently break consumers (`channel_id` instead of `id`,\n> `copy` instead of `copy_file`, paths prefixed with `social\u002F`). This\n> section is the contract — produce it byte-for-byte as specified.\n\n**Required top-level shape:**\n- `channels` MUST be a JSON **array** (list). Never a dict keyed by id.\n\n**Required per-channel fields** — use these exact names, no aliases:\n\n| Field | Type | Required | Notes |\n|-------|------|----------|-------|\n| `id` | string | Yes | Channel identifier. **Field name is `id`, NOT `channel_id`.** |\n| `platform` | string | Yes | `x` or `xiaohongshu` |\n| `style` | string | Yes | Style name |\n| `lang` | string | Yes | `en`, `zh`, `ja`, etc. |\n| `copy_file` | string | Conditional | **Filename only** (no directory prefix). Field name is `copy_file`, NOT `copy`. **Omit this field if `skipped: true`.** |\n| `images` | array\u003Cstring> | Conditional | **Filenames only** (no directory prefix). Empty list `[]` if no images. **Omit this field if `skipped: true`.** |\n| `items_used` | number | No | Count of source items included |\n| `skipped` | boolean | No | Set to `true` for conditional channels that did not meet their gate (e.g. viral_only with no item ≥ min_score). When `true`, omit `copy_file` and `images`. |\n| `skip_reason` | string | Conditional | Required when `skipped: true`. Short explanation, e.g. `\"max score 7.8 \u003C required 8.5\"`. |\n\n**Path rules — applies to `copy_file` and every entry in `images`:**\n- Write the **bare filename** as it appears under `social\u002F` (e.g. `social_2026-04-18_xhs_zixun_zh.md`).\n- Do **NOT** include any directory component — no `social\u002F`, no `.\u002F`, no absolute path.\n- Wrong: `\"copy_file\": \"social\u002Fsocial_2026-04-18_xhs_zixun_zh.md\"` ❌\n- Right: `\"copy_file\": \"social_2026-04-18_xhs_zixun_zh.md\"` ✅\n\n**Canonical example** (copy this shape exactly):\n\n```json\n{\n  \"date\": \"2026-04-14\",\n  \"channels\": [\n    {\n      \"id\": \"x_insider_en\",\n      \"platform\": \"x\",\n      \"style\": \"insider\",\n      \"lang\": \"en\",\n      \"copy_file\": \"social_2026-04-14_x_insider_en.md\",\n      \"images\": [\"social_2026-04-14_x_insider_en_cover.png\"],\n      \"items_used\": 3\n    },\n    {\n      \"id\": \"xhs_kepu_zh\",\n      \"platform\": \"xiaohongshu\",\n      \"style\": \"educational\",\n      \"lang\": \"zh\",\n      \"copy_file\": \"social_2026-04-14_xhs_kepu_zh.md\",\n      \"images\": [\n        \"social_2026-04-14_xhs_kepu_zh_1.png\",\n        \"social_2026-04-14_xhs_kepu_zh_2.png\",\n        \"social_2026-04-14_xhs_kepu_zh_3.png\",\n        \"social_2026-04-14_xhs_kepu_zh_4.png\"\n      ],\n      \"items_used\": 5\n    },\n    {\n      \"id\": \"xhs_zhongcao_viral_zh\",\n      \"platform\": \"xiaohongshu\",\n      \"style\": \"single-topic\",\n      \"lang\": \"zh\",\n      \"skipped\": true,\n      \"skip_reason\": \"max score 7.8 \u003C required 8.5\"\n    }\n  ]\n}\n```\n\n**Forbidden variants** (all of these have been observed in real output and\nbreak downstream consumers — do not produce them):\n\n```json\n\u002F\u002F ❌ WRONG — \"channel_id\" is not a recognized field\n{ \"channel_id\": \"xhs_zixun_zh\", ... }\n\n\u002F\u002F ❌ WRONG — \"copy\" is not a recognized field\n{ \"id\": \"xhs_zixun_zh\", \"copy\": \"...\", ... }\n\n\u002F\u002F ❌ WRONG — paths must be bare filenames\n{ \"copy_file\": \"social\u002Fsocial_2026-04-18_xhs_zixun_zh.md\",\n  \"images\": [\"social\u002Fsocial_2026-04-18_xhs_zixun_zh_1.png\"] }\n\n\u002F\u002F ❌ WRONG — channels must be a list, not a dict keyed by id\n{ \"channels\": { \"xhs_zixun_zh\": { ... } } }\n```\n\nBefore writing the manifest file, mentally diff your output against the\ncanonical example above. If any field name, structure, or path shape\ndiffers, fix it before writing.\n\n---\n\n## Workflow Summary\n\n1. Check if social content is enabled (`SOCIAL_ENABLED=true`)\n2. Load channel configuration (JSON file or env vars)\n3. For each channel:\n   a. **Conditional gate**: if the channel has a `conditional` field, evaluate the gate. If it fails, write a manifest entry with `skipped: true` + `skip_reason` and continue to the next channel — do NOT generate copy or images.\n   b. Read the channel's template file\n   c. Select top items from report data (score filter + item limit)\n   d. Generate copy following template rules and character limits\n   e. Write copy to `social\u002F{DATE}_{channel_id}.md`\n   f. If `image: true` — build image prompts and generate platform-adapted images. For XHS carousels with style `recommendation` or `single-topic`, the FIRST image uses the `cover-hook` style addon; subsequent images use the channel's regular `image_style`.\n   g. Write images to `social\u002F{DATE}_{channel_id}_{N}.png`\n4. Write manifest to `social\u002F{DATE}_manifest.json`\n\n---\n\n## Notes\n\n- Channels are fully independent — each reads from the same daily data but produces separate output\n- Multiple channels can target the same platform with different styles, languages, or content focus\n- **Image language follows the platform**: X images are always English, Xiaohongshu images are always Chinese — regardless of the channel `lang` setting for copy\n- **Image style follows the persona**: each persona\u002Fstyle has a recommended image style that matches its voice (see Persona–Image Style Mapping). Channels can override via `image_style` field\n- All content must respect platform character limits — validation is mandatory\n- Entity names are proper nouns and must NOT be translated regardless of `lang` setting\n- When the same item appears in multiple channels, each channel generates its own adapted version independently\n",{"name":5,"version":36,"description":7},"1.3.0","main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002Focto-patch\u002FMorningAI\u002Fskills\u002Fgen-social",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill gen-social",{"tool":53,"command":54},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill gen-social",{"tool":56,"command":57},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill gen-social","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Focto-patch\u002FMorningAI\u002Fskills\u002Fgen-social\u002FSKILL.md",true,[61,67,71],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"agents\u002Fopenai.yaml","REFERENCE","参考文档",233,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Focto-patch\u002FMorningAI\u002Fskills\u002Fgen-social\u002Fagents\u002Fopenai.yaml",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"templates\u002Fx\u002Fbriefing.md",6057,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Focto-patch\u002FMorningAI\u002Fskills\u002Fgen-social\u002Ftemplates\u002Fx\u002Fbriefing.md",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"templates\u002Fxiaohongshu\u002Fnews-briefing.md",3526,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Focto-patch\u002FMorningAI\u002Fskills\u002Fgen-social\u002Ftemplates\u002Fxiaohongshu\u002Fnews-briefing.md",[76,86,94,102,110,118],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":81,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":85},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":85},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":85},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":85},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":114,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":85},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":122,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":85},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]