markdown-platform-pack
Skill3 starsChanged 5 months agoMITView on GitHub
Convert Markdown into platform-ready Word output for Xiaohongshu or WeChat by rasterizing tables and fenced code blocks into images, rewriting a temporary Markdown file, and exporting a Word document.
In this repository8 other files it gives its agents.
- agent-pipeline-orchestrationSkill
- ai-news-digestSkill
- api-data-researchSkill
- grok-x-searchSkill
- miniapp-figma-alignmentSkill
- social-content-parserSkill
- video-to-textSkill
- weijincha-content-checkSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 21 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when a Markdown article must be imported into a platform that does not handle Markdown tables or code blocks well, …
- Distinctive: line 18
Keep Chinese text readable.
- Distinctive: line 20
Prefer a single block per image.
- Distinctive: line 22
Create a temporary Markdown file.
- Distinctive: line 24
Keep normal paragraphs unchanged.
- Distinctive: line 28
Keep headings, lists, quotes, links, and images.
- Distinctive: line 29
Use a local temporary environment if the default toolchain drops images or mangles Chinese glyphs.
- Distinctive: line 30
Keep the environment beside the article or task folder, not in a global location.
- Very specific: line 31
Prefer python-docx when the normal export path strips images or breaks Chinese text.
- Distinctive: line 37
Use Chinese-capable fonts for both image rendering and Word export.
- Distinctive: line 38
Keep image paths relative to the temporary Markdown file.
- Distinctive: line 40
Leave inline Markdown, headings, quotes, and lists intact unless the platform breaks them.
- Distinctive: line 41
Do not convert inline code spans unless the platform specifically requires it.
- Distinctive: line 42
Do not leave raw table syntax or fenced code blocks in the import-ready Markdown.
- Distinctive: line 46
Before handing off, check:
- Very specific: line 55
Use scripts/export_platform_pack.py for the repeatable path.
- Distinctive: line 65
If the user needs a Xiaohongshu-specific file, replace every table and code fence first.
- Distinctive: line 69
Do not leave raw tables or fenced code blocks in the import version.
- Distinctive: line 70
Do not use fonts that cannot render Chinese.
- Distinctive: line 71
Keep the temporary Markdown beside the source article.
- Distinctive: line 72
Write image paths relative to the temporary Markdown file.
- Distinctive: line 73
Keep the Word export pipeline local to the task folder when a temporary venv is needed.
- Distinctive: line 74
If a block is too wide, shorten the picture-only version before rendering.
- Very specific: line 75
If the Word export path drops images, switch to a local Python python-docx pipeline.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Markdown Platform Pack
Use this skill when a Markdown article must be imported into a platform that does not handle Markdown tables or code blocks well, especially Xiaohongshu or WeChat Word import flows.
Workflow
- Find unsupported Markdown blocks by block range, not by global string replace.
- Tables
- Fenced code blocks
- Any block that must survive as an image
- Render each unsupported block to a PNG.
- Keep Chinese text readable.
- Use platform-safe fonts.
- Prefer a single block per image.
- Create a temporary Markdown file.
- Replace each original block with the PNG reference.
- Keep normal paragraphs unchanged.
- Preserve the original article order.
- Export the temporary Markdown to Word.
- Keep headings, lists, quotes, links, and images.
- Use a local temporary environment if the default toolchain drops images or mangles Chinese glyphs.
- Keep the environment beside the article or task folder, not in a global location.
- Prefer
python-docxwhen the normal export path strips images or breaks Chinese text.
- Deliver the Word file plus the generated images.
Export Notes
- Use Chinese-capable fonts for both image rendering and Word export.
- Keep image paths relative to the temporary Markdown file.
- Preserve the original article order and section structure.
- Leave inline Markdown, headings, quotes, and lists intact unless the platform breaks them.
- Do not convert inline code spans unless the platform specifically requires it.
- Do not leave raw table syntax or fenced code blocks in the import-ready Markdown.
Validation
Before handing off, check:
- The temporary Markdown has no raw tables or fenced code blocks.
- The generated images open correctly and Chinese text renders cleanly.
- The Word file contains the images, not just image links.
- The Word file preserves headings, lists, quotes, and links in readable form.
Local Script
Use scripts/export_platform_pack.py for the repeatable path.
Typical flow:
python3 scripts/export_platform_pack.py input.md --output-md input.xiaohongshu.tmp.mdThen export the temporary Markdown to Word with the project's local docx pipeline.
If the user needs a Xiaohongshu-specific file, replace every table and code fence first.
Rules
- Do not leave raw tables or fenced code blocks in the import version.
- Do not use fonts that cannot render Chinese.
- Keep the temporary Markdown beside the source article.
- Write image paths relative to the temporary Markdown file.
- Keep the Word export pipeline local to the task folder when a temporary venv is needed.
- If a block is too wide, shorten the picture-only version before rendering.
- If the Word export path drops images, switch to a local Python
python-docxpipeline.
Outputs
Preferred outputs, in order:
*.tmp.mdfor the import-ready intermediate file- PNGs for tables and code blocks
*.docxfor the platform import file
When to use
- User asks to convert Markdown into a Word document for Xiaohongshu or WeChat
- User asks to preserve Markdown structure while removing unsupported blocks
- User asks to make a document import-safe for a platform with limited formatting
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

