Back to Skills

md-to-feishu

Convert local Markdown files to Feishu (Lark) documents with automatic image uploading. Uses the feishu-docx CLI tool.

Updated 7/2/2026

Security Assessment

Low Risk(75/100)

Detected risks:

Remote Code Execution([SKILL.md] curl -LsSf https://astral.sh/uv/install.sh | sh)
Security Score75/100

About md-to-feishu

Automates converting a local Markdown file into a Feishu (Lark) document, uploading any referenced local images along the way. It wraps the feishu-docx command-line tool, so the user only needs to supply a Markdown file path; a title is optional because the workflow extracts the first level-one heading as the title, or generates a descriptive one when no heading exists.

Execution begins by resolving the runtime environment, trying options in order and using the first that works: uvx (preferred, with a --python 3.11 flag when the default Python is older), an already-installed feishu-docx binary on Python 3.11 or newer, or, failing both, printed installation guidance for uv or pip along with the credential-configuration command. Feishu credentials are set once through feishu-docx config set with an app id and app secret.

Because feishu-docx cannot render Mermaid code blocks, the workflow pre-processes them. It scans the Markdown for fenced mermaid blocks and, when present, copies the file to a temporary sibling copy so the original is never modified, renders each diagram to PNG through the mermaid.ink API (a Mozilla User-Agent header is required, or the service returns 403), saves images with descriptive filenames, and replaces each block with a Markdown image reference. The command runs from the directory where the Markdown lives so relative image paths resolve, converting blocks to Feishu format and uploading local images with a short wait for block consistency. Afterward it deletes the temporary file and rendered PNGs, then reports the number of blocks converted, images uploaded, and the created document id. Authentication failures prompt a reminder to configure credentials.

FAQ

What does the user need to provide?

Only a Markdown file path. A title is optional: the workflow uses the first level-one heading, or generates a concise descriptive title if none exists, unless the user supplies one explicitly.

What are the runtime requirements?

The feishu-docx CLI running on Python 3.11 or newer, invoked preferably through uvx (which can run it directly without a global install) or as an installed binary. Feishu credentials must be configured first with an app id and app secret.

How are Mermaid diagrams handled?

They are pre-processed before upload because feishu-docx cannot render them. Each mermaid block is rendered to a PNG via the mermaid.ink API on a temporary copy of the file and replaced with an image reference, leaving the original file untouched.

Why is a User-Agent header needed for image rendering?

The mermaid.ink API returns a 403 error without one, so requests set a Mozilla User-Agent header when fetching the rendered PNG.

What does it report when finished?

The number of blocks converted and images uploaded, the created document id, and a success or failure status. On authentication errors it reminds the user to configure credentials.

Install md-to-feishu

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill