Skip to content
Back to search

guizang-social-card-skill

Generate Guizang-style social card image sets, Live Photo motion cards, material-first Live Photo puzzle layouts, triple Live Photo collages, long-video-to-Live-Photo treatments, and WeChat official account cover pairs from articles, scripts, screenshots, product notes, subtitles, photos, or user-supplied videos. Use when the user asks for 小红书图文, Rednote/Xiaohongshu images, social cards, carousel images, 3:4 covers, Live Photo, 实况照片, 单视频实况拼图, 二宫格实况拼图, 三连实况拼图, 四宫格实况拼图, 微信公众号封面, WeChat 21:9 + 1:1 covers, Swiss Style, or magazine-style social images.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/op7418-guizang-social-card-skill/badge.svg)](/listings/op7418-guizang-social-card-skill)

HTML

<a href="/listings/op7418-guizang-social-card-skill"><img src="/api/listings/op7418-guizang-social-card-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

方式一:一行命令安装(推荐)

npx skills add https://github.com/op7418/guizang-social-card-skill --skill guizang-social-card-skill

方式二:把下面这段话直接发给 AI

> 帮我安装 `guizang-social-card-skill` 这个 Claude Code skill。请按下面步骤做: > > 1. 确保 `~/.claude/skills/` 目录存在(不存在就创建) > 2. 执行 `git clone https://github.com/op7418/guizang-social-card-skill.git ~/.claude/skills/guizang-social-card-skill` > 3. 验证:`ls ~/.claude/skills/guizang-social-card-skill/` 应该看到 `SKILL.md`、`assets/`、`references/` 三项 > 4. 告诉我装好了,之后我说"做一套小红书图文"之类的话就会触发这个 skill

把这段话复制粘贴给 Claude Code / Cursor / 任何有 shell 权限的 AI Agent,它会自动完成安装。

方式三:手动命令行

git clone https://github.com/op7418/guizang-social-card-skill.git ~/.claude/skills/guizang-social-card-skill

触发方式

装好后,Claude Code 会自动发现并调用这个 skill。触发关键词:

- "帮我做一套小红书图文 / Xiaohongshu 图文" - "帮我做一套 Rednote 卡片" - "做一个公众号 21:9 头图 + 1:1 分享卡" - "生成一套 social cards / 杂志风社交卡片" - "把这篇文章做成轮播图文 / 教程拆页" - "做一套瑞士风的小红书测评 / IKB 风格图文" - "把这段视频做成小红书 Live Photo / 三连实况拼图" - "做一个微信公众号文章内 3 秒 Live Photo"

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 338 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: guizang-social-card-skill
  3. description: Generate Guizang-style social card image sets, Live Photo motion cards, material-first Live Photo puzzle layouts, triple Live Photo collages, long-video-to-Live-Photo treatments, and WeChat official account cover pairs from articles, scripts, screenshots, product notes, subtitles, photos, or user-supplied videos. Use when the user asks for 小红书图文, Rednote/Xiaohongshu images, social cards, carousel images, 3:4 covers, Live Photo, 实况照片, 单视频实况拼图, 二宫格实况拼图, 三连实况拼图, 四宫格实况拼图, 微信公众号封面, WeChat 21:9 + 1:1 covers, Swiss Style, or magazine-style social images.
  4. ---
  5. # Guizang Social Card Skill
  6. Create polished social card packages for Xiaohongshu/Rednote, WeChat Official Account, article covers, and platform thumbnails.
  7. This skill is self-contained. It borrows visual principles from the Guizang PPT style system, but it must not edit the original PPT skill, its templates, or its references. If the original PPT skill is available, you may read it for reference only.
  8. Generated work must live in a task folder, not in the skill root. Default to `local-tests/<slug>/` inside this repository, or use the explicit output folder requested by the user. Do not create root-level task folders such as `social-card-*`, `livephoto-*`, `wechat-*`, `output/`, or loose rendered assets next to `SKILL.md`.
  9. ## What To Produce
  10. Use this skill for:
  11. - Social card / carousel image sets: cover plus content pages, especially Xiaohongshu/Rednote 3:4.
  12. - Short Live Photo motion cards when the user asks for Live Photo / 实况照片 and supplies video evidence or screen recordings.
  13. - Material-first Live Photo puzzle layouts when the user has high-quality video assets and wants single-video, two-grid, three-grid, or four-grid motion cards with little or no added text.
  14. - Triple Live Photo collages when the user has three short videos, three results, three viewpoints, or a high-information comparison that should stay inside one image-card unit.
  15. - Long-video intake for Live Photo: diagnose whether to trim, speed up, split into a triple collage, or ask the user for a specific time range before rendering.
  16. - WeChat Official Account cover pairs: one `21:9` main cover plus one `1:1` square cover, composed together in the same HTML for visual checking.
  17. - Screenshot-heavy product posts, article covers, tutorial carousels, outdoor/lifestyle notes, AI/product update explainers.
  18. - Social images that need Guizang-style Swiss or editorial magazine layouts.
  19. Do not use this skill for:
  20. - Full slide decks or horizontal PPT websites. Use the PPT skill for that.
  21. - Long-form video generation. Use a video skill for that. This skill only supports short, layout-bound Live Photo cards that replace a still image slot with video.
  22. - Pure image editing with no layout or article extraction requirement.
  23. ### Rednote Category Capability (capability circle)
  24. The 11 most-common Rednote (小红书) categories fall into three buckets. See `references/category-cookbook.md` for the recipe-by-recipe routing.
  25. **Strong end-to-end** (text, structure, and image story all in scope):
  26. - 旅行 (Travel), 职场 (Workplace), 推荐 (Recommended, after specifying a subtype).
  27. **Strong on text & structure; image needs to come from the user or a sourced library:**
  28. - 游戏 (Game), 影视 (Film/TV), 美食 食谱方向 (Food — recipes only), 彩妆 教程方向 (Makeup — tutorials only), 健身 (Fitness), 家居 (Home), 穿搭 精选方向 (Outfit — capsule/essay only).
  29. **Outside scope — push back honestly rather than promise a result:**
  30. - 美食 菜品大片摆盘 (food-photography showcase).
  31. - 穿搭 日常 OOTD 全身 (daily OOTD body shots; we cannot generate or simulate).
  32. - 情感 梦核 / 氛围感装饰风 (dreamcore / aesthetic-light styling — clashes with both Editorial and Swiss).
  33. - Y2K / 千禧辣妹 / 哥特萝莉 / kawaii decorated aesthetics.
  34. - Pure photography showcase posts where the image is the entire deliverable.
  35. When a request falls in the third bucket, name what we cannot do at intake — do not silently retrofit a layout that misses the user's intent.
  36. ## Core Principle
  37. Expression comes first. The goal is not to squeeze text into posters; it is to turn the source into a clear visual argument.
  38. For each page, decide:
  39. - What should the viewer understand in one glance?
  40. - What evidence, screenshot, or image supports it?
  41. - Which words must be large, and which can become captions or metadata?
  42. - What can be removed because it belongs in the post body, not the image?
  43. ## Required References
  44. Read these files as needed:
  45. - `references/platform-specs.md` for exact ratios, output sizes, and naming.
  46. - `references/style-system.md` for Guizang editorial and Swiss visual rules.
  47. - `references/theme-presets.md` when choosing electronic-magazine palettes or Swiss accent palettes.
  48. - `references/layout-recipes.md` when selecting carousel/social-card/WeChat page structures.
  49. - `references/components.md` for the shared component spec: font stacks, type scale, minimum readable sizes, Chinese title length bands, Swiss card-fill mutual-exclusion rule, image-container ratio classes, spacing tokens, and Lucide icon rules.
  50. - `references/background-systems.md` when building electronic-magazine WebGL/ink/paper backgrounds.
  51. - `references/portrait-fill.md` when adapting layouts to 3:4 and avoiding under-filled vertical space.
  52. - `references/content-planning.md` for cover hooks, page breakdown, and copy compression.
  53. - `references/production-workflow.md` for HTML/CSS rendering and image handling.
  54. - `references/live-photo-production.md` when the user asks for Live Photo / 实况照片 / 三连实况拼图, supplies video assets for a social card, or wants Xiaohongshu / WeChat motion-card delivery. It covers information budget, single vs triple Live Photo, long-video intake, and platform publishing reminders.
  55. - `references/image-overlay.md` whenever text sits on top of a photo: photo qualification, localized tint fallback, and face / subject avoidance via multimodal subject mapping.
  56. - `references/screenshot-treatment.md` when the user supplies an app / web / code / dashboard screenshot — picks `.frame-shot` over `.frame-img`, sets corners/shadow/bg/inset, decides on `.device-browser` or `.device-phone` chrome.
  57. - `references/map-component.md` when the content has spatial relationships (travel route, store locations, walking tour) — real routes default to Mapbox Static or OSM static tiles; schematic SVG is only for conceptual / illustrative maps. Pins are HTML overlays; never use live JS maps.
  58. - `references/title-shortener.md` when the task is a WeChat 21:9+1:1 cover pair, or any cross-platform reuse — derives the 1:1 short title from the long one (5-step extraction, 4 patterns, anti-patterns, sizing on `.poster.square`).
  59. - `references/category-cookbook.md` to route a user-named Rednote category (旅行 / 职场 / 游戏 / 影视 / 彩妆 / 美食 / 穿搭 / 家居 / 健身 / 情感 / 推荐) to applicable recipes and to confirm scope.
  60. - `references/qa-checklist.md` before delivering final images.
  61. ## Workflow
  62. ### 1. Intake
  63. Gather only the missing information that changes the output:
  64. - Target platforms and ratios.
  65. - Source text, subtitles, article, or title.
  66. - **Rednote category** — if the user names one of the 11 common types (旅行 / 职场 / 游戏 / 影视 / 美食 / 彩妆 / 穿搭 / 家居 / 健身 / 情感 / 推荐), route via `references/category-cookbook.md` to find the right recipes and to confirm the request is inside the capability circle (see "Rednote Category Capability" above). If a request lands in the outside-scope bucket, surface that to the user **before** designing, do not silently retrofit.
  67. - Supplied images/screenshots and where each should appear. **For News / Tutorial / Data / Review content, actively prompt for screenshots or photos** — they are the evidence layer. A poster with no real artifact tends to read as filler.
  68. - Supplied video assets, if the user asks for Live Photo. Treat user-provided video as the normal path; web-sourced free video is only for demo/promo cases or when the user explicitly asks for sourced material. Confirm the target platform because duration differs: Xiaohongshu supports `5s`; WeChat Official Account Live Photo should stay at `3s` and must be uploaded from iPhone. Before cutting, read `references/live-photo-production.md` and classify the request as single Live Photo, triple collage, or long-video intake. If the source is too long or contains multiple usable moments, do a low-cost diagnosis first, then ask once whether to trim, speed up, split into multiple wells, or use a user-specified time range. If the source is shorter than the target duration, ask whether to provide a longer clip, accept a shorter Live Photo, or explicitly allow a hold/slowdown. If the important focus is ambiguous, suggest possible crop/enlarge options but let the user decide before executing.
  69. - **If the user supplies only text (no images at all), ask once before designing:**
  70. ```
  71. 这篇我需要 1-2 张图。三种走法:
  72. A. 你自己有照片 / 截图,传给我(推荐——最不"AI 感")
  73. B. 我去 Pexels / Unsplash / Flickr 帮你找
  74. C. 用 AI 生成
  75. ```
  76. Recommend A in one line — your own photo is what makes a poster not look AI-generated. Accept whatever the user picks (including "都行你看着办") and proceed. **Do not re-prompt later, do not keep nudging toward A across multiple turns.** This question is one-shot.
  77. - Preferred style if specified: Swiss Style, magazine/editorial, tech, outdoor, etc.
  78. - Hard constraints: title text, no image on 1:1 cover, must include a hardware photo, keep screenshot readable, and so on.
  79. If the user has already supplied enough context, proceed with reasonable assumptions.
  80. If the content involves current product releases, policies, prices, claims, or news, verify unstable facts with browsing and cite sources in the final response.
  81. ### 2. Extract The Story
  82. Turn the source into a page plan before designing.
  83. For Rednote:
  84. - Page 1 is the cover hook.
  85. - Pages 2-N each carry one idea only.
  86. - Use 5-9 pages for most posts. Compress or combine pages when lower areas become empty.
  87. - Keep the post body for nuance; images should carry hooks, comparisons, checklists, and sharp takeaways.
  88. For WeChat:
  89. - Always produce a paired system: `21:9` main cover and `1:1` square cover.
  90. - Build both covers in the same HTML file and add a combined preview section so their visual relationship can be checked together.
  91. - `21:9` keeps the full or near-full title, subtitle, and one strong visual relation.
  92. - `1:1` uses a simplified short title derived from the long title: big centered type, no image by default, no cramped subtitles.
  93. ### 3. Choose Style Mode
  94. Pick one mode per package. **The two systems are not bound to specific content types** — what changes is the visual stance, not which topic you can talk about. A workplace essay can be Editorial; a travel ledger can be Swiss. Pick by the feeling you want, not by category lookup.
  95. **Editorial Magazine x E-ink** brings:
  96. - Serif/Songti display + quiet sans body, paper + ink palette.
  97. - Atmosphere layer (paper grain / ink wash / WebGL canvas) over a warm paper base.
  98. - Ledger rows, marginalia, pull quotes, large photo wells — magazine-feature feel.
  99. - Best when you want the page to feel slow, considered, hand-set.
  100. **Swiss International** brings:
  101. - Inter / Helvetica feel, very light display at large sizes, mono labels at small.
  102. - Strict left-aligned grid, hairline rules, one high-saturation accent.
  103. - Card-fill matrices, KPI towers, h-bar charts, numbered statements — system / data feel.
  104. - Best when you want the page to feel engineered, quantified, decisive.
  105. If both feel viable for a piece of content, the question becomes editorial intent: "is this a feature story or a release note?" That decides the mode, not the topic itself.
  106. Do not mix the two visual systems inside the same image set unless the user explicitly asks for a hybrid.
  107. Then pick one theme:
  108. - Editorial Magazine x E-ink uses one of 6 magazine palettes: Ink Classic, Indigo Porcelain, Forest Ink, Kraft Paper, Dune, or Midnight Ink (the only dark variant; reserved for game key art / night photography / cinematic covers).
  109. - Swiss International uses one of 4 accent palettes: IKB Blue, Lemon Yellow, Lemon Green, or Safety Orange.
  110. Read `references/theme-presets.md` for exact CSS tokens. Do not invent arbitrary colors unless the user has a strict brand requirement.
  111. ### 4. Plan Pages
  112. Create a concise internal plan:
  113. ```text
  114. Page 01 / cover / hook / image source / layout intent
  115. Page 02 / point / key copy / visual evidence / layout intent
  116. ...
  117. ```
  118. When the user asks for approval, show this plan before rendering. Otherwise use it internally and proceed.
  119. Use `references/layout-recipes.md` to choose page structures. Avoid making every page a repeated title-plus-card layout.
  120. For 3:4 images, check `references/portrait-fill.md` before coding. A short table or ledger must be expanded into a full portrait composition with a quote column, image evidence, marginalia, larger rows, or a background hero zone.
  121. Audience-facing copy must describe the user's actual scene, not the production method. Internal terms such as `3s`, `5s`, `Live Photo`, `triple collage`, `information budget`, `long-video intake`, `speed-up`, `highlight detection`, `one action point`, or `layout template` may guide planning, filenames, QA notes, and delivery summaries, but they must not become the H1, hook, or main body copy unless the user is explicitly making an instructional post about those concepts. Before rendering, read every visible headline once as a real viewer: if it sounds like a task requirement, replace it with scene-specific copy.
  122. Do not add non-template ornaments just to satisfy an automated density warning. Extra rulers, side bars, pseudo time axes, decorative labels, or invented badges must come from an existing layout recipe or a user request. If a density warning appears, fix it by choosing a better recipe, resizing real content, or accepting the advisory warning with a visual rationale; do not put meaningless UI on the card.
  123. For Live Photo cards, plan them as normal social cards first, then decide the motion role: one action point, one small process, a before/after change, three parallel results, or ambience/evidence. The only structural change is that one or more image wells become video wells. Keep the same ratio, crop, safe-area, typography, and style mode rules; apply the still-image crop logic to the video stream. The first frame must pass the same checks as a static image: no excessive crop, key UI/content remains readable, and the card still follows the chosen layout recipe. Read `references/live-photo-production.md` before rendering.
  124. For material-first Live Photo puzzle cards, let the video assets lead. Use little or no copy: one short headline is enough for a single-video cover, and two-grid / three-grid / four-grid versions should usually have no added text. When a single-video cover adds text on top of the footage, use the M16 Image-Led Cover / text-on-image rules: subject map first, safe quiet zone, Editorial serif/Songti title at regular-medium weight, paper-cream text, and no default full-canvas mask. Do not invent extra kicker, meta, hairlines, labels, rulers, badges, subtitles, or explanatory production terms just to make the overlay feel designed. If only one headline is available, make the typography carry the layout: phrase-aware line break, restrained size, tracking, alignment, and placement. Treat source-embedded text as part of the footage; only avoid adding new text unless the user asks.
  125. ### 4.5. Copy The Seed Template
  126. Do not write HTML from scratch. Pick one seed template based on the style mode chosen in Step 3:
  127. - Editorial Magazine × E-ink → copy `assets/template-editorial-card.html` into the task folder as `index.html`.
  128. - Swiss International → copy `assets/template-swiss-card.html` into the task folder as `index.html`.
  129. The seed already wires up: font loading, theme tokens, all three poster sizes (`.poster.xhs` / `.poster.square` / `.poster.wide`), the pair-preview frame, grain/background layers, and all class definitions referenced by the layout recipes.
  130. Set the palette with `data-theme` on the `<html>` element (all palettes are inlined in the template's `GZ:TOKENS` block — never edit that block or write hex values in posters; see `references/theme-presets.md` for the semantic colour variables):
  131. - Editorial: `<html data-theme="ink-classic | indigo-porcelain | forest-ink | kraft-paper | dune | midnight-ink">`.
  132. - Swiss: `<html data-theme="ikb | lemon | lemon-green | safety-orange">` (the old `data-accent="… | lemon-yellow | …"` still works).
  133. - The user gave a brand or logo colour: run `node <SKILL_ROOT>/scripts/gz-theme.mjs brand "#4D6BFE" --family magazine` (or `--family swiss`), paste the printed `[data-theme="brand"]{…}` at the end of the page `<style>`, and set `data-theme="brand"`. Never use the raw colour; if the script refuses, fall back to a preset.
  134. - Chinese text is never italic (Chinese fonts have no italic glyphs; the browser slants them artificially). Italic belongs to Latin text set in Playfair Display (`.h-sub`, `em` inside an English line).
  135. Replace the single placeholder poster after `<!-- POSTERS_HERE -->` with one `<section class="poster ...">` block per page, each carrying the HTML skeleton from a chosen Layout Recipe (M01-M16 for Editorial, S01-S12 for Swiss). Never load the wrong template's class system: Editorial recipes assume serif display + ledger/marginalia/pipeline-v; Swiss recipes assume Inter + card-fills + matrix/h-bar/kpi-tower. Mixing them silently breaks the layout.
  136. ### 5. Build And Render
  137. Default implementation pattern:
  138. - Create a task folder under `local-tests/<slug>/` by default, or inside the user-requested output folder. Never put generated task folders, rendered images, MOV files, `.pvt` packages, or downloaded sources in the skill root next to `SKILL.md`.
  139. - Put source images in `assets/`.
  140. - Start from the seed template copied in Step 4.5, not a blank file. Prefer changing only the `<!-- POSTERS_HERE -->` region page-to-page. If a task needs custom layout CSS, add one clearly named task-scoped block in the copied file and keep semantic defaults reset (`figure { margin:0; }`, no browser-default spacing surprises).
  141. - Install dependencies once in the skill root: `npm install` (Playwright for rendering and validation, subset-font for font embedding).
  142. - Render with `node <SKILL_ROOT>/scripts/render.mjs <task-dir>`. It embeds the fonts the page actually uses (offline, repeatable), waits for the frozen background and icons, writes `output/<poster-id>.png` plus the pair preview, and fails if an image is not its board size. User-registered local fonts (`node <SKILL_ROOT>/scripts/gz-fonts.mjs add …`) are embedded too and never leave the machine.
  143. - Inspect the rendered PNGs.
  144. - Keep `node validate-social-deck.mjs <task-dir>` available for auto-check passes. It checks overflow (R1), footer collision (R2), Swiss bold display (R3), minimum font size (R4), 4-band density (R5), `.h-xl` line caps (R6), browser-default figure margin drift (R7), visual bounds / bottom whitespace (R8), and title-to-content gaps (R9). Exit code 1 on any FAIL — fix before final delivery when auto-check is requested. WARN is advisory but read it.
  145. Live Photo branch:
  146. - Decide the information budget before rendering: `3s` fits one action point; `5s` fits one small process; triple collage fits three parallel clips but not a complex story; long videos require diagnosis before editing.
  147. - For long sources, avoid claiming precise automatic highlight detection. Probe duration/resolution, make a sparse contact sheet, and choose between trim, speed-up, split/triple collage, or asking the user for a time range.
  148. - Extract a first frame from each video well, place it in the final static card layout, and show/inspect that preview before making `.pvt`. This catches crop and hierarchy issues with much lower token and render cost.
  149. - Render the paired MOV at the platform duration: `5s` for Xiaohongshu, `3s` for WeChat Official Account.
  150. - Extract the key JPG from a readable representative frame.
  151. - Package `JPG + MOV` into `.pvt` with `makelive`; AirDrop the `.pvt` as one item for iPhone tests.
  152. - Validate dimensions, duration, frame count, package contents, and motion quality. Prefer a contact-sheet frame strip for visual checks so only the final tiled image needs human/model inspection. Use `references/live-photo-production.md` for exact commands and failure-mode checks.
  153. Do not place visible instructions, keyboard shortcuts, or usage explanations inside the images.
  154. For Editorial Magazine x E-ink, use a layered background system. Prefer a subtle WebGL ink-flow canvas or a frozen procedural canvas plus paper grain. Read `references/background-systems.md`; do not rely on a flat beige background, and do not add page-wide grid/dot backgrounds.
  155. ### 6. Image And Screenshot Handling
  156. When the user provides screenshots:
  157. - Preserve screenshot content unless the user asks for redesign.
  158. - Prefer programmatic framing: target-ratio canvas, safe padding, clean background, readable screenshot.
  159. - Do not stretch screenshots.
  160. - If screenshot clarity matters, enlarge the screenshot area and reduce nearby text.
  161. #### Text-On-Image Composition
  162. Whenever a poster places text on top of a photo (full-bleed cover, large image well, generated-image overlay), follow `references/image-overlay.md`:
  163. - **Selection first, tint only if needed.** A photo covering ≥60% of the canvas must first pass the quiet-zone and light tests in `image-overlay.md`. Compose without a mask first; if the thumbnail check fails, add only a localized, image-toned tint around the title area. Do not default to full-canvas falloffs.
  164. - **Subject mapping is mandatory.** Before placing the title, read the image with the Read tool, describe in plain language where the subject's face/focal feature sits, and record the subject map as an HTML comment next to the hero block. Place text only in the documented safe zones.
  165. - **Crop discipline — set `object-position` inline on every photo.** The template default (`center 50%`) is a fallback, not a recommendation. For every `<img>`, decide based on subject location and write it inline: e.g. `style="object-position:center 62%"` for mid-body subjects, `center 30%` for sky-heavy landscapes with horizon-line subjects, `center 70%` for foreground gear. See the table in `references/components.md` for ranges and `image-overlay.md` for face-photo specifics. Skipping this silently crops subjects out of frame on tall ratios (`r-3x4`, `r-21x9`).
  166. - **Thumbnail test.** Downscale the rendered PNG to 360 px wide and confirm the title is still legible. If the title fights the photo, move the title, swap the photo, or add a localized image-toned tint; if the photo looks dead, the tint is too heavy or the photo was wrong for text-on-image.
  167. Editorial dark covers (e.g. game journals on key art) and Swiss covers with hero photos both require these checks. Skipping them is a known failure mode (see `style-system.md` Anti-Pattern D).
  168. When the user has no images:
  169. - This branch only runs if the Step 1 "三选一" gate landed on B (web-sourced) or C (AI-generated). Never silently fall into B or C — the user picked one.
  170. - For C (AI-generated): use generated bitmaps only where they add real value, usually 1-2 pages. Generate images that match the page's visual role, not generic decoration. Keep generated images free of embedded titles, page numbers, logos, or fake UI labels unless explicitly needed.
  171. - For B (web-sourced): see the Web-Sourced Images section below.
  172. #### Web-Sourced Images (fallback when user has none)
  173. When the user has no screenshots/photos and a generated bitmap would not fit the page's role (e.g. Editorial atmosphere shot, outdoor / lifestyle backdrop, game cover art, real-world product shot), fetch from the web instead of leaving the page thin.
  174. Policy: **grab first, disclose after, let the user decide on attribution.** Do not pre-filter sources by guessed license — the user is the rights holder of the final composition and decides what is acceptable.
  175. Recommended sources, in order of preference. **All five below are free-tier libraries with no required licensing fees**; we do not pull from paid stock sites (视觉中国 / Getty / 站酷海洛 etc.).
  176. 1. **Unsplash** — `https://unsplash.com/s/photos/<keyword>`. Strong for outdoor / lifestyle / atmospheric backdrops. English keywords work best. License is permissive but verify case by case.
  177. 2. **Pexels** — `https://www.pexels.com/search/<keyword>/` or `https://www.pexels.com/zh-cn/search/<keyword>/`. **Supports Chinese keyword search natively** — fills Unsplash's gap on 国内场景 (中文街景 / 国风物件 / 本地地名). Use this first when the subject is China-specific or the keyword is Chinese. Free under Pexels License.
  178. 3. **Flickr CC-licensed pool** — `https://www.flickr.com/search/?text=<keyword>&license=2%2C3%2C4%2C5%2C6%2C9`. The license filter (`license=2,3,4,5,6,9`) restricts to Creative Commons photos. Fills the "documentary realness" gap: street photography, people-in-context, real interiors, non-styled scenes that Unsplash/Pexels lack. Always preserve CC attribution if the user opts in.
  179. 4. **Wallhaven** — `https://wallhaven.cc/search?q=<keyword>`. Strong for game / anime / wallpaper themes. Content is user-uploaded, rights are unverified.
  180. 5. **Direct web search** — when a specific subject is needed (a product render, a game still, a historical photo). Use WebFetch / WebSearch to find a candidate URL.
  181. Editorial-mode picking order: **Pexels (if keyword is Chinese / China-specific) → Unsplash → Flickr CC (if you need real-life feel) → direct search**. Swiss mode rarely needs any of these — product renders, UI screenshots, and keyshot-style images should be user-supplied or AI-generated, not stock.
  182. How to fetch:
  183. - Use WebFetch or `curl` to download the image into the task folder's `assets/` directory.
  184. - Name the file by purpose, not by hash: `assets/hero-mountain.jpg`, `assets/ui-pulse-card.png`.
  185. - Record the source URL in a `assets/SOURCES.md` file next to the images (one line per file: `hero-mountain.jpg ← <url>`). Always do this even if the user declines attribution in the final image — it preserves provenance for the human author.
  186. After fetching, surface the provenance to the user **before** finalizing the design:
  187. ```
  188. 我从 <site> 取了这些图:
  189. - assets/hero-mountain.jpg — <url>
  190. - assets/ui-pulse-card.png — <url>
  191. ⚠️ 版权未经核实。请你判断是否可用。
  192. 是否需要在图文中标注来源?
  193. - 要:我把 "Photo · <site> · @<author>" 加到对应页脚 / 角标。
  194. - 不要:原样使用,不加注释。
  195. ```
  196. If the user picks "标注" — add a small `mono` caption (Swiss: `.t-meta` 18-20px in corner; Editorial: `.label` next to the image well). Never crowd the caption into the layout's focal area.
  197. If the user picks "不标注" — proceed silently. The provenance still lives in `assets/SOURCES.md` for the user's own records.
  198. If an image is only one element among many in a composite (e.g. one of nine photos in a matrix), the user may reasonably skip attribution. Do not force a credit label that breaks the layout.
  199. ### 7. Deliver
  200. **Show user first, validate on request.** Auto-running the validator after every render takes too long and delays the user from seeing results. Default flow:
  201. 1. After rendering completes, immediately show the user the rendered images inline (absolute paths) with a one-sentence summary of what was built.
  202. 2. Ask one question: **"先你自己看,还是我先自动核查一遍?"** (Do you want to review first, or should I run the auto-check?)
  203. 3. If the user says "我自己看" / "先给我" / "no need" — stop here, let them inspect, and respond to whatever they raise.
  204. 4. If the user says "你查吧" / "auto-check" / "yes" — only then run `node validate-social-deck.mjs <task-dir>`, fix any FAIL, and re-render before final delivery. Mention density/cap WARNs.
  205. Never silently run the validator before showing the user — it costs minutes per pass and the user often spots issues faster.
  206. Final response (after the user has reviewed or asked for auto-check) should include:
  207. - Output folder path.
  208. - Rendered images shown inline with absolute paths when useful.
  209. - A short note on dimensions and verification (or "not yet validated, awaiting your review").
  210. - For any image fetched from the web: source URL + site + the attribution decision the user made.
  211. - For Live Photo: the `.pvt` package path, the debug `JPG + MOV` pair, target platform duration, and validation summary.
  212. - For Live Photo publishing: remind the user of two things: platform limits (`5s` Xiaohongshu, `3s` WeChat Official Account) and publish path (AirDrop the `.pvt` package as one item to iPhone, then publish from the matching mobile app path; desktop/web upload paths generally cannot recognize `.pvt` as a publishable Live Photo).
  213. - If the user cannot use the iPhone/AirDrop publishing path (e.g. desktop-only workflow, Android, or a platform that does not support Live Photo), offer a degraded delivery: export a short looping GIF or a silent MP4 clip from the same MOV source. The GIF/MP4 keeps the motion evidence but loses the Live Photo tap-to-play experience. Confirm with the user before switching to this fallback.
  214. - Any unresolved risks, such as source images being low resolution.
  215. ## Non-Negotiables
  216. - Never edit the original Guizang PPT skill or any upstream skill copied from elsewhere.
  217. - Never create generated work in the skill root. All task artifacts must be under `local-tests/<slug>/` by default, or under a user-requested output folder. Root-level generated folders like `social-card-*`, `livephoto-*`, `wechat-*`, and loose output assets are forbidden.
  218. - Do not create random decorative SVG ovals, blobs, rain drops, stickers, or meaningless circles.
  219. - Do not use nested cards or generic SaaS card layouts as the default.
  220. - Do not let text overflow, touch the edge, or collide with the footer band. Pin `.foot` with `margin-top: auto` inside a flex column, never with `position: absolute` over growing content.
  221. - When content overflows, measure the amount before editing. Small overflows should get small fixes: `1-40px` means nudge/tighten, `40-90px` means local compaction, `90-160px` means slight title or paragraph compression, and only `160px+` should trigger recipe changes or content removal. After fixing, check R8 bottom whitespace so the page does not swing from overflow to a giant empty lower band.
  222. - Do not let a title touch the next content block. Main display titles should usually keep at least `28px` below; local headings should keep at least `16px`. Use validator R9 before relying on visual inspection.
  223. - Do not let text become too small to read on mobile.
  224. - Do not write inline `font-size` + `font-weight` on display titles in Swiss. Use the typed classes (`.h-hero` / `.h-statement` / `.h-xl` / `.num-mega`). A 80-120px headline at weight 700-900 is not Swiss; "the larger, the lighter" is a hard rule.
  225. - Do not deliver Editorial posters with a flat paper background, mono labels on every row, and no atmosphere layer. Run the Editorial Identity Test in `references/style-system.md` — a serif title alone does not make a poster Editorial.
  226. - Do not fake data, release details, or percentages.
  227. - Do not crop faces, key UI text, or hardware/product details unless the user explicitly accepts it.
  228. - Do not turn a video card into a fake still sequence without saying so. If a source is shorter than the target duration, ask for a longer source, use a shorter platform-safe duration, or explicitly document any hold/slowdown.
  229. - Do not skip the first-frame preview for Live Photo. Video is an image well with motion; its first frame must satisfy the static 3:4 layout and crop rules before rendering the MOV.
  230. - Do not let result videos scroll through section boundaries in a shallow crop; this creates the "overlapping video" failure. Inspect contact sheets and choose a stable time window before packaging.
  231. - Do not guess the user's visual priority when enlarging/cropping video for readability. Offer the crop/enlarge tradeoff and apply it after the user confirms, unless the request already makes the focal region explicit.
  232. - Do not reuse a 21:9 cover by blindly cropping it into 1:1. Compose each ratio separately.
  233. - **3:4 卡必须吃满画布**。Content (text + image + data) 必须覆盖 ≥75% 画布高度。任何 >15% 画布高度的纯空白带都需要"留白理由":(a) hero image 自带呼吸、(b) 单句宣言式 hero statement、(c) 段落顶/底 leading & trailing whitespace(前后总和 ≤15%)。**禁止用 `<div style="flex: 1"></div>` 上下夹击把内容塞到中段**——杂志页留白逻辑不适用于社交卡(杂志靠对开页吸收留白,社交卡逐张独立刷,欠填看着像 PPT 漏排)。Recipe-by-recipe 最小密度见 `references/layout-recipes.md` 每条 recipe 的「Minimum density」段。Render 后必须跑 `qa-checklist.md` 的 4 横带密度检查。
README.md · README · 382 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Guizang Social Card Skill · 小红书图文 / 公众号封面对
  2. ![GitHub stars](https://img.shields.io/github/stars/op7418/guizang-social-card-skill?style=flat-square)
  3. ![License](https://img.shields.io/github/license/op7418/guizang-social-card-skill?style=flat-square)
  4. ![Skill](https://img.shields.io/badge/Skill-Agent-111111?style=flat-square)
  5. ![Social Cards](https://img.shields.io/badge/Social-Cards-FF4D6D?style=flat-square)
  6. ![Live Photo](https://img.shields.io/badge/Live%20Photo-Motion%20Cards-002FA7?style=flat-square)
  7. ![Claude Code](https://img.shields.io/badge/Claude%20Code-Supported-6B5B95?style=flat-square)
  8. ![Codex](https://img.shields.io/badge/Codex-Supported-222222?style=flat-square)
  9. [English README](./README.en.md)
  10. 一个适配 Claude Code / Codex 等 Agent 环境的图文卡片技能,用于从文章、文案、截图、产品笔记、字幕、照片或用户视频生成**小红书 / Rednote 图文组图**、**Live Photo 动态卡**与**公众号 21:9 + 1:1 封面对**。
  11. 内置两套视觉系统,共用一份图文工作流:
  12. - **电子杂志风(Editorial)**。像 *Monocle* / *Kinfolk* / *Cereal* 那样克制的版面,适合叙事、生活方式、旅行、阅读、影视、个人观察。
  13. - **瑞士国际主义(Swiss)**。网格、单一锚点色、直角发丝线、极致字号对比,适合产品测评、数据、方法论、教程、AI 工具。
  14. > 这个 Skill 是 [guizang-ppt-skill](https://github.com/op7418/guizang-ppt-skill) 的姊妹项目,共享美学语言但独立维护。PPT 解决"横向翻页演讲",这里解决"静态信息流图文"。
  15. ![Guizang Social Card Skill 效果展示](https://github.com/user-attachments/assets/d370abcc-1fc4-4de1-903a-09020a6556ce)
  16. ## 30 秒开始
  17. ```bash
  18. npx skills add https://github.com/op7418/guizang-social-card-skill --skill guizang-social-card-skill
  19. ```
  20. 也可以直接把这段话发给有 shell 权限的 AI Agent:
  21. ```text
  22. 帮我安装 guizang-social-card-skill。请把 https://github.com/op7418/guizang-social-card-skill 克隆到 ~/.claude/skills/guizang-social-card-skill,安装完成后检查 SKILL.md、assets/、references/ 是否存在。
  23. ```
  24. 已经安装过的话,用这段话更新:
  25. ```text
  26. 帮我更新 guizang-social-card-skill。请进入 ~/.claude/skills/guizang-social-card-skill 执行 git pull,然后告诉我当前最新 commit。
  27. ```
  28. 安装后直接对 Agent 说:
  29. ```text
  30. 帮我基于这篇文章做一套瑞士风小红书图文,5 张,IKB 蓝。
  31. ```
  32. 也可以试这些请求:
  33. ```text
  34. 基于这份产品测评做一套小红书 3:4,标题用电子杂志风。
  35. 帮我把这篇文章做成公众号封面对:21:9 头图 + 1:1 分享卡,视觉保持一致。
  36. 我有 3 张露营照片,帮我做一套全图风格的小红书图文。
  37. 把这段游戏攻略文案做成一套小红书图文,需要从 wallhaven 拿点游戏原画。
  38. 我有一段咖啡视频,帮我做成小红书 5 秒 Live Photo 卡片,文字压在安静区域。
  39. 把这三个游戏片段做成三连 Live Photo 拼图,用 Swiss 风介绍攻略要点。
  40. ```
  41. ## 效果
  42. - 🖋 **双视觉系统**:电子杂志风做氛围与叙事,瑞士风做事实与结构,两套共用同一份工作流
  43. - 📐 **3 个画板尺寸**:`.poster.xhs` 1080×1440(小红书 3:4)、`.poster.wide` 2100×900(公众号 21:9)、`.poster.square` 1080×1080(公众号 1:1)
  44. - 🎬 **Live Photo 动态卡**:支持单视频、二宫格、三宫格、四宫格、三连拼图、长视频低成本诊断;小红书按 `5s`,微信公众号文章内按 `3s`
  45. - 🧩 **28 个版式骨架**:Editorial 16 个(`M01-M16`,含 Image-Led Cover、Pipeline、Before/After 等)+ Swiss 12 个(`S01-S12`,含 KPI Tower、H-Bar Chart、Matrix + Hero 等)
  46. - 🎨 **10 套主题预设**:Editorial 6 套(墨水经典、靛蓝瓷、森林墨、牛皮纸、沙丘、**Midnight Ink** 暗色)+ Swiss 4 套锚点色(IKB Klein Blue、柠檬黄、柠檬绿、安全橙)
  47. - 🖼 **图源工作流**:用户图优先;无图时按 Unsplash → Pexels → Flickr CC → Wallhaven → 直接搜索的优先级取图,落本地 + 自动写 `SOURCES.md`
  48. - 🌫 **WebGL 墨流背景**:杂志风 hero 页可挂动态墨流;低性能或截图时可禁用
  49. - 🪧 **文字压图 + 主体避让**:满铺图先做 quiet-zone 与主体映射,文字避开人脸、产品和关键动作;需要时只加局部 tint,不默认全图遮罩
  50. - 🧰 **截图美化资产**:9 张 WebP 真实材质背景(Editorial 5 / Swiss 4),配套 `.frame-shot` / `.device-browser` / `.device-phone` 工具类
  51. - 🗺 **地图组件**:MapLibre + OSM 真实瓦片,支持多 pin + 连线,适合旅行攻略
  52. - ✅ **校验脚本**:`validate-social-deck.mjs` 自动检测溢出、字号上限、4 横带密度、footer 碰撞
  53. - 📄 **单文件 HTML + Playwright 渲染**:不需要前端构建链,`node scripts/render.mjs` 直接出 PNG
  54. ## Live Photo 效果与版式
  55. Live Photo 在这个 Skill 里的定位是"把用户提供的视频装进社交卡版式",不是让 Agent 随机找公开视频,也不是长视频正片剪辑。先让首帧按静态卡片成立,再让 `3s/5s` 的动作补充信息。
  56. | 版式 | 效果 | 适合 |
  57. |------|------|------|
  58. | 单视频动态卡 | 一段视频裁成 `3:4` 吃满画布;需要文字时只放一组短标题,按 `M16 Image-Led Cover` / `image-overlay` 的主体避让、quiet-zone、字体与局部 tint 规则处理 | 咖啡、旅行、健身动作、产品状态、游戏瞬间 |
  59. | 二宫格 / 三宫格 / 四宫格拼图 | 多个视频井拼成一张 Live Photo,通常不加文字,让高质量素材自己说话 | 旅行风景、穿搭精选、空间细节、菜品过程、运动动作 |
  60. | 三连 Live Photo 拼图 | 三段几秒素材并列,提高短时长内的信息密度;只在必要时加一行真实场景标题 | 攻略步骤、前后对比、多视角展示、模型测试结果 |
  61. | 长视频诊断 | 对超长素材做稀疏抽帧 / contact sheet,判断更适合裁哪段、倍速、拆分,还是请用户指定时间段 | 用户给了 1-3 分钟素材但还没选片段 |
  62. | 平台发布包 | 输出调试用 `JPG + MOV`,以及 iPhone 测试/发布用 `.pvt` 包 | 小红书、微信公众号文章内 Live Photo |
  63. 信息量判断是第一步:微信 `3s` 更适合一个动作点或一次状态变化;小红书 `5s` 可以容纳一个小过程;三连拼图适合三个并列结果,不适合讲一个必须顺序理解的长故事。
  64. ## Live Photo 生成指南
  65. 1. **确认平台和素材**:用户视频是默认输入;公开视频素材只用于 demo / 宣传测试。先确认小红书、微信公众号文章内,还是本地测试。
  66. 2. **判断信息量**:问自己 `3s/5s` 内观众能看到什么。如果需要解释、音频或完整教程才能懂,就不应该硬塞进 Live Photo。
  67. 3. **选择结构**:单个强素材用单视频动态卡;多个好素材用二宫格 / 三宫格 / 四宫格;三个并列结果用三连;长视频先做低成本诊断。
  68. 4. **先做静态卡检查**:首帧必须像一张合格社交卡。检查裁切、主体、文字位置、平台安全区,不要把制作要求写成观众可见文案。
  69. 5. **再生成动态资产**:在任务文件夹输出预览视频、关键 JPG、MOV 和 `.pvt`;不要把生成结果写到 Skill 根目录。
  70. 6. **交付时提醒发布路径**:小红书按 `5s`,微信公众号文章内按 `3s`;通常需要把 `.pvt` 作为一个包传到 iPhone,再从对应 App 发布,电脑端/网页端一般不能直接发布 Live Photo。
  71. 可直接这样让 Agent 做:
  72. ```text
  73. 把这个咖啡视频做成小红书 5 秒 Live Photo,标题只放一组,避开杯子和手。
  74. 这四段旅行视频素材质量很好,帮我做成四宫格 Live Photo,不加文字。
  75. 这段 2 分钟游戏视频先做 contact sheet,帮我判断适合截哪 5 秒做攻略 Live Photo。
  76. ```
  77. ## 适合 / 不适合
  78. **✅ 合适**:小红书图文组图 / Live Photo 动态卡 / 公众号封面对 / 微信朋友圈封面 / 视频号封面 / 文章配图 / 教程拆页 / 数据回顾 / 旅行攻略 / 产品测评 / 截图说明
  79. **❌ 不合适**:横向翻页 PPT(用 [guizang-ppt-skill](https://github.com/op7418/guizang-ppt-skill))/ 长视频正片剪辑 / 纯图片修图 / 无版式诉求的纯文字编辑
  80. ## 11 个小红书品类适配
  81. 按"能力圈"分三档,详见 [`references/category-cookbook.md`](./references/category-cookbook.md):
  82. **端到端强势**(文 / 结构 / 图都在能力圈内):
  83. - 旅行、职场、推荐(指定子类后)
  84. **文与结构强势,图依赖用户或搜图源:**
  85. - 游戏、影视、美食(食谱方向)、彩妆(教程方向)、健身、家居、穿搭(精选方向)
  86. **能力圈外,主动说清**(不强行接):
  87. - OOTD 实拍流 / 梦核 / 仿胶片调色 / 真实测肤美妆等强烈依赖摄影或后期的细分赛道
  88. ## 常见使用场景
  89. | 任务 | 推荐方式 |
  90. |------|---------|
  91. | 长文章 → 小红书图文 | 抽核心观点,Editorial 走叙事节奏,Swiss 走拆条数据 |
  92. | 产品测评 / 工具回顾 | Swiss + IKB 蓝,优先 `S09 KPI Tower` / `S10 H-Bar Chart` |
  93. | 旅行 / 生活方式分享 | Editorial + Midnight Ink 或 Dune,`M16 Image-Led Cover` 满铺主图 |
  94. | 公众号封面对 | 同一份内容渲两块:`.poster.wide` 21:9 + `.poster.square` 1:1,视觉一致 |
  95. | 截图教程 / 工具说明 | `.frame-shot` + `.device-browser` 包壳,优先 Swiss 网格底 |
  96. | 游戏攻略 / 影视回顾 | Editorial + Midnight Ink,从 Wallhaven 取游戏原画做满铺 |
  97. | 用户视频 → Live Photo | 先判断 `3s/5s` 信息量,再选单视频 / 拼图 / 三连 / 长视频诊断 |
  98. | 数据回顾 / 年终总结 | Swiss + Lemon 或 Safety Orange,矩阵 + ledger 组合 |
  99. ## 为什么是单文件 HTML 渲 PNG
  100. - **Agent 友好**:HTML + CSS 是文本,Agent 能直接写、读、改、验证
  101. - **版式精确**:CSS Grid + 严格字号 / 留白 / 网格,远超 Markdown 排版能力
  102. - **图源开放**:可以接 Unsplash / Pexels / Wallhaven / Mapbox / OSM 等任意网络资源
  103. - **质量可校验**:`validate-social-deck.mjs` 用 Playwright 跑真实 DOM 测量,不是猜
  104. - **交付简单**:`output/*.png` 直接发,不需要部署、不需要导出工具
  105. - **动态卡可落地**:Live Photo 分支输出 `JPG + MOV + .pvt`,并记录小红书 / 微信的时长限制和手机端发布路径
  106. ## 平台支持
  107. | 平台 | 状态 | 说明 |
  108. |------|------|------|
  109. | Claude Code | 支持 | 原生 Skill 工作流,适合生成 + 迭代图文 |
  110. | Codex | 支持 | 适合长流程图文生成、调用图片源、做视觉检查 |
  111. | Cursor / 其他本地 Agent | 可用 | 需要能读写文件 + 执行 shell |
  112. | 普通 Chatbot | 不推荐 | 没有文件系统和渲染管线时无法稳定出图 |
  113. ## 安装
  114. ### 方式一:一行命令安装(推荐)
  115. ```bash
  116. npx skills add https://github.com/op7418/guizang-social-card-skill --skill guizang-social-card-skill
  117. ```
  118. ### 方式二:把下面这段话直接发给 AI
  119. > 帮我安装 `guizang-social-card-skill` 这个 Claude Code skill。请按下面步骤做:
  120. >
  121. > 1. 确保 `~/.claude/skills/` 目录存在(不存在就创建)
  122. > 2. 执行 `git clone https://github.com/op7418/guizang-social-card-skill.git ~/.claude/skills/guizang-social-card-skill`
  123. > 3. 验证:`ls ~/.claude/skills/guizang-social-card-skill/` 应该看到 `SKILL.md`、`assets/`、`references/` 三项
  124. > 4. 告诉我装好了,之后我说"做一套小红书图文"之类的话就会触发这个 skill
  125. 把这段话复制粘贴给 Claude Code / Cursor / 任何有 shell 权限的 AI Agent,它会自动完成安装。
  126. ### 方式三:手动命令行
  127. ```bash
  128. git clone https://github.com/op7418/guizang-social-card-skill.git ~/.claude/skills/guizang-social-card-skill
  129. ```
  130. ### 触发方式
  131. 装好后,Claude Code 会自动发现并调用这个 skill。触发关键词:
  132. - "帮我做一套小红书图文 / Xiaohongshu 图文"
  133. - "帮我做一套 Rednote 卡片"
  134. - "做一个公众号 21:9 头图 + 1:1 分享卡"
  135. - "生成一套 social cards / 杂志风社交卡片"
  136. - "把这篇文章做成轮播图文 / 教程拆页"
  137. - "做一套瑞士风的小红书测评 / IKB 风格图文"
  138. - "把这段视频做成小红书 Live Photo / 三连实况拼图"
  139. - "做一个微信公众号文章内 3 秒 Live Photo"
  140. ## 使用流程
  141. Skill 本身是结构化工作流,Agent 会按 7 步走:
  142. 1. **Intake** — 抓 4 件事:目标平台 / 风格 / 内容素材 / 用户图。无图时一次性给 A/B/C 三选(自己拍图 / AI 生图 / 网络取图),不二次劝导
  143. 2. **Style & Theme** — 选 Editorial 还是 Swiss,再从 10 套预设里选主题色。不允许随手写 hex,品牌色走受约束生成
  144. 3. **Layout Selection** — 根据内容结构从 28 个版式骨架里挑、粘、改文案。Editorial 16 个 / Swiss 12 个
  145. 4. **Asset Prep** — 取图(Unsplash / Pexels / Flickr CC / Wallhaven / 直接搜索),落本地 + 写 `SOURCES.md`;问用户要不要标来源
  146. 5. **Compose & Render** — 拷种子模板 → 替换 `<!-- POSTERS_HERE -->` → `node scripts/render.mjs <任务目录>`
  147. 6. **Deliver & Review** — 先把 PNG 给用户看,询问"你自己看还是我先帮你跑 validator",默认不自动核查
  148. 7. **Iterate** — 用户提反馈,改 inline 样式或 swap 版式 / 替图,重渲
  149. Live Photo 请求会在第 5 步进入动态分支:先判断 `3s/5s` 内能承载的信息量,抽首帧或稀疏 contact sheet 检查裁切,再输出 `JPG + MOV + .pvt`。交付时会提醒平台限制和发布路径:小红书 `5s`,微信公众号文章内 `3s`,通常需要把 `.pvt` 传到 iPhone 后从对应 App 发布。
  150. 详细说明见 [`SKILL.md`](./SKILL.md)。深度细节去看对应 `references/*.md`。
  151. ## 校验脚本
  152. ```bash
  153. node validate-social-deck.mjs path/to/task-dir
  154. ```
  155. 9 条规则,基于 Playwright 真实渲染测量,不是静态扫描:
  156. - **R1** Overflow — 任何 section 超出 `.poster` 立刻报错,并给出超出像素对应的修正阶梯
  157. - **R2** Footer Collision — 内容压到底部 footer / page-number
  158. - **R3** Swiss Bold Display — Swiss 大标题违反"越大越细"时报警
  159. - **R4** Min Readable Font — 正文、说明、标签字号低于手机可读下限
  160. - **R5** 4-Band Density — 1440 高画布切 4 横带,每带应有内容或主动留白理由
  161. - **R6** H-XL Line Cap — `.h-xl` / `.h-display` / `.h-statement` 行数超出画板预算
  162. - **R7** Figure Margin Drift — 浏览器默认 `<figure>` margin 造成版式漂移
  163. - **R8** Visual Bounds — 测量真实可见内容的上/下边界,报告视觉超出和底部空白
  164. - **R9** Title Gap — 标题与下一块内容之间的距离过小,避免贴在一起
  165. `SKILL.md` 第 7 步明确**默认不自动跑** validator —— 等用户先看完图再问,避免每轮多花数十秒。
  166. ## 主题色预设
  167. 从 [`references/theme-presets.md`](./references/theme-presets.md) 里选一套——**不允许随手写 hex 值**,保护美学比给自由更重要。所有主题的文字色、线条色和强调色小字都按同一套对比度规则(WCAG + APCA)算出来。
  168. ### Editorial 6 套
  169. | 主题 | 色调 | 适合场景 |
  170. |------|------|---------|
  171. | 🖋 **墨水经典 Ink Classic** | `#0a0a0b` / `#f1efea` | 通用默认、商业话题、不知道选啥时最稳 |
  172. | 🌊 **靛蓝瓷 Indigo Porcelain** | `#0a1f3d` / `#f1f3f5` | 科技、研究、AI、技术分享 |
  173. | 🌿 **森林墨 Forest Ink** | `#1a2e1f` / `#f5f1e8` | 自然、可持续、户外、非虚构 |
  174. | 🍂 **牛皮纸 Kraft Paper** | `#2a1e13` / `#eedfc7` | 怀旧、人文、阅读、文学 |
  175. | 🌙 **沙丘 Dune** | `#1f1a14` / `#f0e6d2` | 艺术、设计、创意、时尚 |
  176. | ⚫ **午夜墨 Midnight Ink** | `#0e0d0c` / `#ece2cf` / `#d4a04a` | 游戏 key art / 夜景 / 影调封面 / 黑神话 · 艾尔登法环类深色题材 |
  177. ### Swiss 4 套
  178. | 主题 | 锚点色 | 适合场景 |
  179. |------|--------|---------|
  180. | 🔵 **克莱因蓝 IKB** | `#002FA7` | 通用默认、商业发布、AI 产品、方法论 |
  181. | 🟡 **柠檬黄 Lemon** | `#FFD500` | 年轻、运动、零售、消费品、Y2K |
  182. | 🟢 **柠檬绿 Lemon Green** | `#C5E803` | 生态、健康、Z 世代、绿色品牌 |
  183. | 🟠 **安全橙 Safety Orange** | `#FF6B35` | 警示、新闻、工业、活力主题 |
  184. 切主题只需把种子模板第一行 `<html data-theme="…">` 改成主题 id,全部主题都已内置在模板里。瑞士风旧的 `data-accent="…"` 写法仍然有效。
  185. 用户给了品牌色或 logo 主色时,运行 `node scripts/gz-theme.mjs brand "#FF2442" --family magazine`(瑞士风用 `--family swiss`),把输出的主题贴进页面。脚本会把品牌色收进这套风格允许的明度和彩度范围,达不到可读性要求就拒绝,这时回到预设。
  186. ## 出图
  187. 第一次使用先在 skill 目录装依赖:
  188. ```bash
  189. npm install
  190. node scripts/render.mjs path/to/task-dir
  191. ```
  192. 渲染脚本会按页面实际用到的字把字体子集化内置进 HTML(首次会下载字体到本机缓存),等背景定格、图标就绪后,按画板原尺寸把每张卡片截成 `output/<id>.png`,并核对尺寸。本机登记的商业字体(`node scripts/gz-fonts.mjs add …`)也会内置,不会上传。
  193. ## 目录结构
  194. ```
  195. guizang-social-card-skill/
  196. ├── SKILL.md ← Skill 主文件:7 步工作流
  197. ├── README.md ← 本文件
  198. ├── HANDOFF.md ← 交接文档:事实 + 版本历史
  199. ├── PRODUCT.md ← 产品文档:思考 + 决策 + roadmap
  200. ├── validate-social-deck.mjs ← Playwright 版式校验脚本
  201. ├── scripts/ ← Live Photo 打包 / 抽帧 / 文档测试脚本
  202. ├── assets/
  203. │ ├── template-editorial-card.html ← Editorial 种子(6 主题 / 3 画板)
  204. │ ├── template-swiss-card.html ← Swiss 种子(4 accent / 3 画板)
  205. │ ├── magazine-bg-webgl.js ← WebGL 墨流背景
  206. │ └── screenshot-backgrounds/ ← 9 张截图舞台底(WebP)
  207. │ ├── style-a/ ← Editorial 5 套
  208. │ └── style-b/ ← Swiss 4 套
  209. └── references/
  210. ├── platform-specs.md ← 平台 × 分辨率 × 命名
  211. ├── style-system.md ← 两种风格的硬规则与反模式
  212. ├── theme-presets.md ← 10 套色票详解
  213. ├── layout-recipes.md ← 28 个版式骨架(M01-M16 + S01-S12)
  214. ├── components.md ← 字体 / 卡片 / 间距 / 图标
  215. ├── background-systems.md ← 墨流 / 网格 / 纸纹层
  216. ├── portrait-fill.md ← 3:4 板的留白对策
  217. ├── content-planning.md ← 钩子 / 拆页 / 文案压缩
  218. ├── category-cookbook.md ← 11 个小红书品类路由表
  219. ├── image-overlay.md ← 文字压图 + 主体避让规则
  220. ├── screenshot-treatment.md ← `.frame-shot` 工具类 + 截图美化
  221. ├── map-component.md ← `.map-block` MapLibre 地图
  222. ├── title-shortener.md ← 1:1 封面的短标题策略
  223. ├── production-workflow.md ← Playwright 渲染管线
  224. ├── live-photo-production.md ← Live Photo 生产 / 拼图 / 长视频 / 发布规范
  225. └── qa-checklist.md ← 质量检查清单
  226. ```
  227. ## 核心设计原则
  228. 1. **克制优于喊话** — 信息流里克制色板反而最显眼,不要堆饱和度
  229. 2. **结构优于装饰** — 字号 + 字体对比 + 网格留白撑起信息层级,不靠阴影和卡片
  230. 3. **版式优于自由** — 28 个版式骨架先选后改,不要发明不存在的页面
  231. 4. **图片优先用户的** — Intake 时一次性给 A/B/C,不二次劝导用户拍图
  232. 5. **选图与避让优先** — 满铺图先确认 quiet zone,文字避开主体(人脸 / 产品 / 文字密集区),必要时才加局部 tint
  233. 6. **越大越细** — Swiss `.h-xl` 字号上去 → 字重必须下来。Editorial 同此原则
  234. 7. **默认不自动核查** — 把"先看图、再决定要不要 validate"做成工作流,省每轮几十秒
  235. 8. **Skill 是产品不是 Prompt** — 有 PRODUCT.md、有版本号、有 CHANGELOG、有能力边界
  236. 9. **本地测试不进 git** — 所有 demo / 冒烟测试归 `local-tests/`,被 gitignore
  237. 10. **视频先当卡片** — Live Photo 第一帧必须先像一张好社交卡,可见文案描述真实场景,不要把制作术语写上画面
  238. ## 视觉参考
  239. - *Monocle* / *Kinfolk* / *Cereal* 杂志的版式与字距
  240. - Massimo Vignelli / Helvetica Forever / 瑞士国际主义网格系统
  241. - Apartamento / The Gentlewoman 的图文比与人物纪实
  242. - 小红书 / Rednote 信息流里"克制反而吃香"的内容样本
  243. - 歸藏的图文卡片实践
  244. ## Roadmap
  245. - 补充更多 Editorial 长内容下的字号上限冒烟测试
  246. - 扩展 Swiss 数据类版式(更多图表骨架)
  247. - AI 出图后处理:渲染后主动询问是否做局部修复 / 整张重出
  248. - 增加更多小红书品类的官方推荐版式包(目前 11 个里 7 个端到端可用)
  249. - 扩充 Live Photo 示例库:单视频、拼图、游戏攻略、生活方式、产品更新
  250. - 整理 WorkBuddy 等平台上架版本
  251. ## FAQ
  252. **可以批量出图吗?**
  253. 可以。一个 task 目录下的 `index.html` 包含多个 `.poster`,`node scripts/render.mjs` 会逐个截 PNG。一次出小红书 3-9 张组图很常见。
  254. **为什么不允许自定义颜色?**
  255. 和 PPT skill 同样的理由——这个 Skill 的核心价值是稳定产出。自由选色会破坏整体风格,只允许从 10 套预设里挑。
  256. **能用其他模型生图吗?**
  257. 可以。生图本身不在 Skill 范围内,但 SKILL.md Step 4 写清了取图协议:用户图 → AI 生图 → 网络取图。AI 生图能力依赖你当前 Agent 接的模型。
  258. **支持 Live Photo 吗?**
  259. 支持。小红书按 `5s` 规划,微信公众号文章内按 `3s` 规划。可以做单视频、二宫格、三宫格、四宫格、三连拼图,也能对长视频先做稀疏抽帧诊断。发布通常需要手机端路径,桌面端一般不能直接识别 `.pvt` 为可发布 Live Photo。
  260. **Codex 写出来不合规怎么办?**
  261. v0.12 起把"种子模板与 components.md 表格保持一致"做成了硬规则。如果还是出现违规,大概率是 seed template 默认值与 `references/style-system.md` 不一致——开 Issue 给我们。
  262. **怎么更新到最新版?**
  263. 重新运行安装命令,或在本地 skill 目录执行 `git pull`。
  264. **支持英文图文吗?**
  265. 支持。Editorial 的 Playfair Display + Noto Serif、Swiss 的 Inter + Helvetica 都同时覆盖中英文。版式骨架未做语言绑定。
  266. ## 贡献
  267. Bug、排版问题、新版式需求——欢迎开 Issue 或 PR。改动请优先:
  268. - 改种子模板时,同步更新 `references/components.md` 的对照表(字号 / 字距 / 字重)
  269. - 新增版式时,在 `references/layout-recipes.md` 加完整 recipe(文案上限 + minimum density)
  270. - 主题、字号、字体和背景特效来自共享设计系统,模板里 `GZ:FONTS` / `GZ:TOKENS` / `GZ:EFFECTS` 区块、`theme-presets.md` 的 `GZ:THEMES` 区块和 `scripts/gz-*.mjs`、`scripts/render.mjs` 是生成的,不要手改;新主题色或字号调整请提 Issue
  271. - 新增 Swiss 规则时,同步更新 `validate-social-deck.mjs` 的对应规则
  272. - 踩过的坑写到 `references/qa-checklist.md`
  273. - 测试与 demo 一律放在 `local-tests/` 下,不要污染 skill 根目录
  274. ## License
  275. AGPL-3.0 © 2026 [op7418](https://github.com/op7418)
  276. 本项目采用 **GNU AGPL-3.0** 协议,要点:
  277. 1. **必须署名** — 保留版权声明
  278. 2. **衍生品必须开源** — 任何修改版本、Fork、二次分发,必须以 AGPL-3.0(或兼容协议)公开发布,提供完整源代码
  279. 3. **网络服务也要开源** — 即使你只是把修改版本部署成 SaaS / Web 服务给别人用而不分发代码,也要公开源代码(这是 AGPL 区别于 GPL 的核心)
  280. 4. **不允许闭源、专有化、仅付费分发**
  281. 完整条款见 [`LICENSE`](./LICENSE)。

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.