AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Feishu Doc To Md

skill-ejjcc-agent-skills-feishu-doc-to-md · by ejjcc

Export a Feishu/Lark wiki or docx URL/token into local Markdown with local image assets. Use when the user asks to convert 飞书/Lark 文档为 md, save a wiki/docx as Markdown, or preserve document images locally instead of leaving them remote.

No reviews yet
0 installs
36 views
0.0% view→install

Install

$ agentstack add skill-ejjcc-agent-skills-feishu-doc-to-md

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-ejjcc-agent-skills-feishu-doc-to-md)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Feishu Doc To Md? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

feishu-doc-to-md

Export Feishu/Lark wiki or docx pages into Markdown plus local assets.

When To Use

Trigger this skill when the user wants any of the following:

  • A 飞书/Lark wiki or docx exported to .md
  • Local image assets instead of remote document assets
  • A repeatable Feishu-to-Markdown conversion flow

Quick Start

Normalize PATH before running anything:

export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"

Run the main exporter:

python3 ~/.claude/skills/feishu-doc-to-md/scripts/export_feishu_doc.py "$DOC_URL_OR_TOKEN" --output-dir "$OUTPUT_DIR"

Common choices:

  • Default export dir: omit --output-dir; the script uses ./feishu-exports//
  • Workspace docs dir: pass --output-dir docs
  • Override the output file basename: add --doc-name "Custom Name"

The script prints a JSON summary with:

  • final_md
  • raw_md
  • assets_dir
  • image_map
  • counts
  • unresolved

Validation

After every export, run:

python3 ~/.claude/skills/feishu-doc-to-md/scripts/validate_export.py ""

Treat these as hard failures:

  • unresolved rows in image-map.tsv
  • remaining feishu://... placeholders
  • remaining remote image refs like ``

validate_export.py exits non-zero when any of those are present.

Outputs

The exporter writes:

  • /.raw.md
  • /.md
  • /.assets/images/*
  • /.assets/image-map.tsv

Auth Model

The scripted flow intentionally avoids bytectl openfeishu uapi ... as the primary transport because that path can block on interactive auth in agent sessions.

The exporter uses:

  • bytectl -b -s openfeishu uat to fetch a fresh user token
  • bytectl -c openfeishu apiinfo to read the current authenticated Lark session cookie
  • direct HTTPS requests to Feishu OpenAPI and authenticated Lark file endpoints

Keep this model unless you have revalidated a better one end-to-end.

Current Download Strategy

  • image_token: download through OpenAPI /open-apis/drive/v1/medias//download
  • board_token: download through authenticated Lark file URL space/api/file/f/cdp-whiteboard-~noop/

Important:

  • Board download through OpenAPI may return 404 in real docs even when board assets are visible in the document
  • The current scripted cookie-based board path is the known-good path

Troubleshooting

If the exporter fails before producing JSON:

  • Check bytectl exists and is logged in
  • Run bytectl -b -s openfeishu uat; it must return a token immediately
  • Run bytectl -c openfeishu apiinfo; it must return JSON with auth.cookie

If assets are unresolved:

  • Inspect .assets/image-map.tsv
  • Report the unresolved rows and reasons back to the user
  • Only reach for Playwright or screenshot fallback if the real export actually needs it

If you modify the exporter:

  • Keep SKILL.md lean; put deterministic logic in scripts, not prose
  • Re-run validate_export.py
  • Re-run a real export smoke test on a known Feishu wiki/docx URL

Files To Read

Read these only when needed:

  • scripts/export_feishu_doc.py: main implementation
  • scripts/validate_export.py: export checks

Do not expand this skill by pasting full algorithms into SKILL.md. Script-first is the intended maintenance model.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.