Install
$ agentstack add skill-ejjcc-agent-skills-feishu-doc-to-md ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
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 →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_mdraw_mdassets_dirimage_mapcountsunresolved
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 uatto fetch a fresh user tokenbytectl -c openfeishu apiinfoto 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//downloadboard_token: download through authenticated Lark file URLspace/api/file/f/cdp-whiteboard-~noop/
Important:
- Board download through OpenAPI may return
404in 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
bytectlexists 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 withauth.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.mdlean; 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 implementationscripts/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.
- Author: ejjcc
- Source: ejjcc/agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.