agentleFS
lgldlklgldlk/lgldlk-agent-skills/skills/markdown-platform-pack/SKILL.md

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.

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
  1. Distinctive:

    Use this skill when a Markdown article must be imported into a platform that does not handle Markdown tables or code blocks well, …

    line 8
  2. Distinctive:

    Keep Chinese text readable.

    line 18
  3. Distinctive:

    Prefer a single block per image.

    line 20
  4. Distinctive:

    Create a temporary Markdown file.

    line 22
  5. Distinctive:

    Keep normal paragraphs unchanged.

    line 24
  6. Distinctive:

    Keep headings, lists, quotes, links, and images.

    line 28
  7. Distinctive:

    Use a local temporary environment if the default toolchain drops images or mangles Chinese glyphs.

    line 29
  8. Distinctive:

    Keep the environment beside the article or task folder, not in a global location.

    line 30
  9. Very specific:

    Prefer python-docx when the normal export path strips images or breaks Chinese text.

    line 31
  10. Distinctive:

    Use Chinese-capable fonts for both image rendering and Word export.

    line 37
  11. Distinctive:

    Keep image paths relative to the temporary Markdown file.

    line 38
  12. Distinctive:

    Leave inline Markdown, headings, quotes, and lists intact unless the platform breaks them.

    line 40
  13. Distinctive:

    Do not convert inline code spans unless the platform specifically requires it.

    line 41
  14. Distinctive:

    Do not leave raw table syntax or fenced code blocks in the import-ready Markdown.

    line 42
  15. Distinctive:

    Before handing off, check:

    line 46
  16. Very specific:

    Use scripts/export_platform_pack.py for the repeatable path.

    line 55
  17. Distinctive:

    If the user needs a Xiaohongshu-specific file, replace every table and code fence first.

    line 65
  18. Distinctive:

    Do not leave raw tables or fenced code blocks in the import version.

    line 69
  19. Distinctive:

    Do not use fonts that cannot render Chinese.

    line 70
  20. Distinctive:

    Keep the temporary Markdown beside the source article.

    line 71
  21. Distinctive:

    Write image paths relative to the temporary Markdown file.

    line 72
  22. Distinctive:

    Keep the Word export pipeline local to the task folder when a temporary venv is needed.

    line 73
  23. Distinctive:

    If a block is too wide, shorten the picture-only version before rendering.

    line 74
  24. Very specific:

    If the Word export path drops images, switch to a local Python python-docx pipeline.

    line 75

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Find unsupported Markdown blocks by block range, not by global string replace.
    • Tables
    • Fenced code blocks
    • Any block that must survive as an image
  2. Render each unsupported block to a PNG.
    • Keep Chinese text readable.
    • Use platform-safe fonts.
    • Prefer a single block per image.
  3. Create a temporary Markdown file.
    • Replace each original block with the PNG reference.
    • Keep normal paragraphs unchanged.
    • Preserve the original article order.
  4. 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-docx when the normal export path strips images or breaks Chinese text.
  5. 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:

  1. The temporary Markdown has no raw tables or fenced code blocks.
  2. The generated images open correctly and Chinese text renders cleanly.
  3. The Word file contains the images, not just image links.
  4. 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.md

Then 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-docx pipeline.

Outputs

Preferred outputs, in order:

  • *.tmp.md for the import-ready intermediate file
  • PNGs for tables and code blocks
  • *.docx for 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.