Build XHS Content Pack
将原始素材转换为结构化内容发布包。优先保留用户的个人判断,再完成拆卡、出图、发布文案、公众号改写与质量检查。
Choose A Mode
- Use
standardby default: create the brief and all card copy first, then wait for user approval before rendering images. - Use
completewhen the user explicitly asks for a one-pass finished package; continue through images, publishing copy, WeChat adaptation, and checks without a review pause. - Use
text-onlywhen the user does not want images; create the brief, card copy, publishing copy, and optional WeChat article only.
Do not render images in standard mode until the user approves the card copy. Respect a user's request to skip files or return content only in chat.
Collect The Input
Use supplied material directly. Ask only when a missing answer would materially change the result. Otherwise state a conservative assumption and continue.
Capture:
- topic
- target audience
- personal judgment or source material
- desired reader action
- requested channels: Xiaohongshu, WeChat, or both
- mode: standard, complete, or text-only
- visual preference or theme when supplied
For URLs, books, news, product specifications, investment, health, legal, or other unstable/high-stakes claims, verify current facts with authoritative sources before writing. Separate source facts, source opinions, and editorial synthesis. Read content_safety.md for sourcing and risk rules.
Build The Package
Follow workflow.md for required file contents and use this default case structure:
text案例/<topic>_<YYYY-MM-DD>/ source/ brief.md platform_rules.md banned_words.md reference/ cards/ cards.json preview.html images/ 01_cover.png 02_problem.png ... preview_contact_sheet.png wechat/ article.md cards.json preview.html images/ publish.md checks.md review.md
If the user requests chat-only output, present the same logical sections without creating this directory.
Create The Brief
Write source/brief.md before writing cards. Resolve:
- Who is this for?
- What would they search for?
- What single idea should they remember?
- Why is the content worth saving?
- What should they do after reading?
- What must not be claimed or invented?
Treat the user's personal judgment as the editorial spine. Do not replace it with generic platform language.
Design The Explanation Chain
Read card_structures.md before creating cards.json.
- Use 8-12 Xiaohongshu cards by default when the material supports that length.
- Make the first card the cover.
- Use the second card for the pain point, misconception, or reader tension.
- Build the middle as an explanation chain, not a sliced article.
- Give each card one job.
- End with an action list, reusable prompt, summary, or risk reminder.
- Keep claims traceable to the source notes.
Use the renderer schema documented in card_structures.md. Keep filenames numerically ordered.
Choose The Visual Theme
Read visual_styles.md before rendering images. Offer four related visual systems that share one editorial identity:
editorial/ 知识杂志reading-card/ 读书卡tech-tutorial/ 科技教程business/ 商务分析
Keep typography, information hierarchy, page numbering, spacing logic, and core accent palette consistent across all four options. If the user has not selected a theme, show the four cover options and ask the user to choose by looking at the previews. In complete mode, select the best fit and report it without pausing. Apply the selected theme consistently to Xiaohongshu and WeChat output unless the user asks for different channel themes.
Render Xiaohongshu Cards
Use deterministic text rendering for knowledge cards so Chinese copy remains legible. The default 1080 x 1800 PNG size is a workflow template, not a claim about a permanent platform requirement.
Run:
bashpython3 scripts/render_cards.py path/to/cards.json --output-dir path/to/images python3 scripts/render_cards.py path/to/cards.json --theme reading-card --output-dir path/to/images python3 scripts/build_preview.py path/to/cards.json --image-dir path/to/images --output path/to/cards/preview.html
The renderer reads themes.json, accepts theme ids or Chinese labels, supports cover, list, steps, compare, quote, and prompt layouts, and creates preview_contact_sheet.png.
If Pillow is unavailable, report the missing dependency and ask before installing it. Do not silently replace readable text cards with image-generation text.
Write The Publishing Copy
Create publish.md with:
- 3-5 title candidates
- image upload order
- one publish-ready body
- focused tags
- source or originality notes when needed
- manual checks before publishing
Do not repeat every card in the body. Add personal judgment, suitable and unsuitable readers, context, limitations, and what required human confirmation.
Create The WeChat Version
When WeChat output is requested:
- Rewrite the material as a coherent article; do not concatenate card copy.
- Add background, transitions, examples, and editorial judgment.
- Identify 3-6 ideas that benefit from visualization.
- Create
wechat/cards.jsonusing a landscape canvas, default 1200 x 675. - Render the article header, process, comparison, key-point, checklist, or summary graphics into
wechat/images/.
Use the same rendering scripts. Treat these dimensions as editable templates.
Validate Before Delivery
Read quality_checks.md and complete checks.md. At minimum verify:
- cover and filename order
- one job per card
- readable text without clipping
- no unsupported claims or fabricated experience
- body does not duplicate the cards
- source and risk notes are present where needed
- preview HTML and contact sheet include every expected image
Open the contact sheet and at least the cover, densest card, comparison card, and prompt card. Fix layout problems before delivery.
Prepare For Review
Create review.md with blank fields for views, likes, saves, comments, reader questions, best-performing card, weak points, and next iteration. When the user later supplies metrics, analyze them without inventing causality.
Reference Routing
- Read workflow.md for package contents and file templates.
- Read card_structures.md before writing renderer JSON.
- Read visual_styles.md before selecting or recommending a theme.
- Read platform_rules.md when choosing channel-specific defaults.
- Read content_safety.md for sourcing, finance, health, legal, and claim boundaries.
- Read quality_checks.md before final delivery.


