Xiaohongshu card production skill

把已批准的小红书草稿、单一分析参考和真实产品素材变成可审查卡片:先完成 DAI 与 image plan,再按确定性、完整效果或可分离图层模式制作,机械验证 PNG 与清单并运行合规检查。精确文字和真实 UI 不交给模型猜测;AI 生图需要单独配置和授权。

by tsingyuai·Apache-2.0 license·★ 2,000 Stars on the repo·GitHub ↗

Use now

Inside this skill

SKILL.md · the author's own words
# Xiaohongshu card production

Read [visual-production-contract.md](references/visual-production-contract.md), [rendering.md](references/rendering.md), and [visual-review…

## Required inputs

Require before rendering:

- approved draft, exact card copy, account role, reader, and one-sentence user value;
- verified Product facts and Product-owned screenshots or brand assets;
- one validated `visual-reference-selection.json` when external visual research is used;
- output directory in the calling `memory/xhs-replicate/` run;
- target canvas, card count, rights/privacy boundaries, and whether paid image generation is approved.

The selected public reference is analysis-only. Learn hierarchy, proof-zone proportion, density, and reading rhythm; never copy its wording…

Word-for-word excerpt, not a result. Read the full SKILL.md ↓

Files of Xiaohongshu card production

tsingyuai/main1 file shown
SKILL.md
Show the full text65 lines

Xiaohongshu card production

Read visual-production-contract.md, rendering.md, and visual-review-rubric.md. Keep DAI and compliance rules from deai.md and quality-gates.md.

Required inputs

Require before rendering:

  • approved draft, exact card copy, account role, reader, and one-sentence user value;
  • verified Product facts and Product-owned screenshots or brand assets;
  • one validated visual-reference-selection.json when external visual research is used;
  • output directory in the calling memory/xhs-replicate/ run;
  • target canvas, card count, rights/privacy boundaries, and whether paid image generation is approved.

The selected public reference is analysis-only. Learn hierarchy, proof-zone proportion, density, and reading rhythm; never copy its wording, logo, proprietary UI, exact composition, distinctive decoration, or full sequence. Rejected candidates contribute no visual rules.

1. Lock copy and evidence

Run DAI on title, caption, card copy, CTA, and tags. Every Product claim needs a current evidence source. Delete unsupported claims instead of weakening them with defensive filler.

Write image-plan.md using image-plan.md. Lock every visible string before rendering. Do not add cards merely to match the reference.

2. Capture real Product evidence

Use screenshot-assets for real Product UI, website, code, or data. Keep the original screenshot as evidence. Do not ask an image model to recreate Product UI, logos, citations, statistics, or source text and present it as real.

3. Choose one production mode

  • deterministic: HTML/CSS, Canvas, SVG, or Pillow owns layout and exact text. Preferred for Chinese copy, dense diagrams, real screenshots, and repeatable series.
  • separable-layer: the image model creates only a background, texture, or illustration without text/UI; deterministic rendering places approved copy and Product evidence.
  • complete-effect: the image model proposes a whole visual direction. Generated text, UI, logos, evidence, and sensitive claims must be replaced or the candidate rejected.

Image generation is optional and separately authorized. If neither OPENAI_API_KEY nor GEMINI_API_KEY is configured, show the user the exact steps in CONFIGURATION.md and offer deterministic rendering or a no-image handoff. Never silently retry or request a key in conversation.

4. Test a three-card vertical slice

Before expanding a large pack, render:

  1. hook/cover;
  2. independently useful method/checklist/comparison;
  3. real Product evidence when the content makes a Product claim.

Show the actual images in the conversation. A filesystem path alone is not a visual review. Check phone-size readability, hierarchy, Product truthfulness, privacy, and copying boundaries.

5. Validate and review

Create visual-manifest.json, then run:

python executors/xhs-render-cards/scripts/validate_social_card_pack.py --package <visual-package>

Run the existing DAI and compliance checks with make lint-post POST=<post-directory>. Inspect every final image at full size and as a contact sheet. Write visual-review.md with sources, selected mode, generated assets, replacement decisions, dimensions, privacy, copyright, factual and mobile-readability results.

Only reviewed files under render/ may enter the human publishing package. Rendering never authorizes upload or publication.

Stop rules

Stop on missing Product evidence, ambiguous rights, unreviewed reference selection, exposed private data, fake UI, malformed text, provider failure, or repeated candidate failure. One targeted retry may replace an explicitly authorized work-in-progress candidate; do not loop or create duplicate publishable assets.

1---
2name: xhs-render-cards
3description: "把已批准的小红书草稿、单一分析参考和真实产品素材变成可审查卡片:先完成 DAI 与 image plan,再按确定性、完整效果或可分离图层模式制作,机械验证 PNG 与清单并运行合规检查。精确文字和真实 UI 不交给模型猜测;AI 生图需要单独配置和授权。"
4---
5 
6# Xiaohongshu card production
7 
8Read [visual-production-contract.md](references/visual-production-contract.md), [rendering.md](references/rendering.md), and [visual-review-rubric.md](references/visual-review-rubric.md). Keep DAI and compliance rules from [deai.md](references/deai.md) and [quality-gates.md](references/quality-gates.md).
9 
10## Required inputs
11 
12Require before rendering:
13 
14- approved draft, exact card copy, account role, reader, and one-sentence user value;
15- verified Product facts and Product-owned screenshots or brand assets;
16- one validated `visual-reference-selection.json` when external visual research is used;
17- output directory in the calling `memory/xhs-replicate/` run;
18- target canvas, card count, rights/privacy boundaries, and whether paid image generation is approved.
19 
20The selected public reference is analysis-only. Learn hierarchy, proof-zone proportion, density, and reading rhythm; never copy its wording, logo, proprietary UI, exact composition, distinctive decoration, or full sequence. Rejected candidates contribute no visual rules.
21 
22## 1. Lock copy and evidence
23 
24Run DAI on title, caption, card copy, CTA, and tags. Every Product claim needs a current evidence source. Delete unsupported claims instead of weakening them with defensive filler.
25 
26Write `image-plan.md` using [image-plan.md](references/image-plan.md). Lock every visible string before rendering. Do not add cards merely to match the reference.
27 
28## 2. Capture real Product evidence
29 
30Use [screenshot-assets](../screenshot-assets/SKILL.md) for real Product UI, website, code, or data. Keep the original screenshot as evidence. Do not ask an image model to recreate Product UI, logos, citations, statistics, or source text and present it as real.
31 
32## 3. Choose one production mode
33 
34- `deterministic`: HTML/CSS, Canvas, SVG, or Pillow owns layout and exact text. Preferred for Chinese copy, dense diagrams, real screenshots, and repeatable series.
35- `separable-layer`: the image model creates only a background, texture, or illustration without text/UI; deterministic rendering places approved copy and Product evidence.
36- `complete-effect`: the image model proposes a whole visual direction. Generated text, UI, logos, evidence, and sensitive claims must be replaced or the candidate rejected.
37 
38Image generation is optional and separately authorized. If neither `OPENAI_API_KEY` nor `GEMINI_API_KEY` is configured, show the user the exact steps in [`CONFIGURATION.md`](../../CONFIGURATION.md) and offer deterministic rendering or a no-image handoff. Never silently retry or request a key in conversation.
39 
40## 4. Test a three-card vertical slice
41 
42Before expanding a large pack, render:
43 
441. hook/cover;
452. independently useful method/checklist/comparison;
463. real Product evidence when the content makes a Product claim.
47 
48Show the actual images in the conversation. A filesystem path alone is not a visual review. Check phone-size readability, hierarchy, Product truthfulness, privacy, and copying boundaries.
49 
50## 5. Validate and review
51 
52Create `visual-manifest.json`, then run:
53 
54```powershell
55python executors/xhs-render-cards/scripts/validate_social_card_pack.py --package <visual-package>
56```
57 
58Run the existing DAI and compliance checks with `make lint-post POST=<post-directory>`. Inspect every final image at full size and as a contact sheet. Write `visual-review.md` with sources, selected mode, generated assets, replacement decisions, dimensions, privacy, copyright, factual and mobile-readability results.
59 
60Only reviewed files under `render/` may enter the human publishing package. Rendering never authorizes upload or publication.
61 
62## Stop rules
63 
64Stop on missing Product evidence, ambiguous rights, unreviewed reference selection, exposed private data, fake UI, malformed text, provider failure, or repeated candidate failure. One targeted retry may replace an explicitly authorized work-in-progress candidate; do not loop or create duplicate publishable assets.
65 

Discussion

Alternatives

STEP 0: STALE-CLONE SELF-CHECK — RUN BEFORE READING BELOWResearch what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube, TikTok, Hacker News, Polymarket, GitHub, and the web. Includes a doctor health check to diagnose broken or missing sources.Marketing · MITApifyScrapes social platforms, business data, and e-commerce via Apify actors — Instagram, LinkedIn, TikTok, YouTube, Facebook, Google Maps, Amazon, and web crawls — filtering in code. USE WHEN scrape Instagram, scrape LinkedIn, scrape TikTok, scrape YouTube, scrape Facebook, Google Maps leads, Amazon reviews, business intelligence, multi-platform social listening, competitive analysis, lead generation, social monitoring, Apify actors, web crawl, extract contacts. NOT FOR X/Twitter account operations like posting, threads, or bookmarks (those need a dedicated X API client), 4-tier progressive scraping with proxy escalation (use BrightData), or real-Chrome bot bypass and computer use (use Interceptor).Marketing · MITrun-wechat-article-loop — 公众号长文闭环微信公众号长文增长闭环 —— 从读者问题与复刻锚选题、写出可验证的公众号长文、预览与合规检查、同步微信草稿、三重确认下受控发布,到回收阅读与转化数据并复盘。用户要求写公众号、把内容改成公众号、同步或发布微信草稿、查看公众号数据或复盘时使用。Marketing · Apache-2.0Twitter/X SkillSearch and retrieve content from Twitter/X. Get user info, tweets, replies, followers, communities, spaces, and trends via twitterapi.io. Use when user mentions Twitter, X, or tweets.Marketing · Apache-2.0