Feishu to WeChat HTML
Workflow selection
Enter for an explicit Feishu-to-WeChat HTML conversion, a rebuild of that artifact, or the final stage of an established feishu-article-images workflow. Reading or summarizing a Feishu document alone stays with the document task. This workflow renders local HTML; the image-selection workflow owns source writes and a separately authorized publisher owns account uploads/drafts.
Create a source-faithful local HTML package that can be copied into the WeChat Official Account editor without losing the intended typography, images, or compact list spacing.
This skill can run independently or as the final stage of feishu-article-images. In the combined workflow, render directly after the selected images and captions have been written and verified; no additional confirmation is needed. Fetch the updated Feishu document, use the already verified identity via --identity, and keep this output in a separate wechat-html/ directory from the candidate gallery. This skill remains the single source of truth for rendering and validation; the image workflow owns candidate selection and Feishu writes.
Required outcome
Given a Feishu Docx URL, produce an output directory containing:
index.html: local preview and rich-text copy controls;article-body.html: the exact fragment copied into WeChat;article-title.txt,article.md, andarticle-body.txt: editable backups;source-snapshot.json,manifest.json, andvalidation.json: provenance and verification evidence;assets/: the downloaded source images.
The default house style is defined in references/house-style.md. Read it before rendering or reviewing an article. Treat those values as defaults: follow explicit per-article user overrides.
Rendering contract
Run the deterministic renderer instead of recreating the HTML by hand:
python3 scripts/render_feishu_wechat.py \
--url '<feishu-docx-url>' \
--output-dir '<absolute-output-directory>' \
--tag '<article-specific-tag>' \
--tag '<another-tag>'
python3 scripts/validate_output.py '<absolute-output-directory>'
Select three to five concise tags from the actual article when the user has not supplied them. Use a mixture of one or two broad discovery tags and two or three topic-specific tags. Never reuse tags from an earlier article merely because they are in an example.
The renderer is read-only toward Feishu and WeChat. It requires an authenticated lark-cli, fetches the Feishu document and its images, and writes only to the requested local output directory. Preserve raw tool errors when fetching fails. Do not retry indefinitely and do not switch authentication identities without user direction.
Hard constraints
Avoid unnecessary secondary labels and descriptions. Let the layout do the explaining.
Apply this to optional preview/interface copy; preserve all authored article text, headings and captions, required controls, feedback, and accessible names.
- Preserve authored text, inline bold/emphasis, links, image order, captions, headings, and list order. Do not silently correct wording.
- Normalize numbered chapter headings such as
一、标题,六、标题, or3、标题into a two-digit number on its own line followed by the title on the next line. - Keep the copied body free of scripts, controls, IDs, classes, external stylesheets, background declarations, and empty spacer paragraphs.
- Render each list item as its own paragraph with compact bottom spacing so an editor-created line break does not produce oversized gaps.
- Embed downloaded images as data URIs in the copied fragment. Keep the files in
assets/as a manual-upload fallback. - A visible tail hashtag is not proof that WeChat registered it as a clickable topic. After paste, the user should confirm or re-enter platform-native topic tags if discoverability depends on them.
- Stop on unsupported source block types rather than silently dropping content.
Acceptance criteria
Success requires all of the following:
validation.jsonreportsresult: PASS;- visible output text matches the source block order, except for the authorized chapter-number normalization and appended tags;
- image count and embedded-image count match the source snapshot;
- non-reference body text uses 16px, main titles 23px, chapter numbers 26px, and the reference section 10px unless explicitly overridden;
- the reference heading, reference list numbers and text, and tail hashtags use black
#14120F; - copied HTML passes the structural checks in
validate_output.py; index.htmlopens locally and its copy target is exactlyarticle-body.html;- final platform verification remains explicit: paste into a new WeChat draft, save, reopen, and inspect a phone preview in light and dark modes.
Boundaries
This Skill prepares and validates local artifacts. It does not edit the Feishu source, upload to WeChat, create a draft, choose a cover, or publish. Those actions require a separate explicit request and the appropriate publishing workflow.