Feishu Doc Sync is a Codex Skill for publishing local Markdown documentation projects to Feishu/Lark Wiki as online Docx pages.
It turns a local docs tree into a reusable publishing workflow:
- scan Markdown files with include and exclude rules
- create or reuse a target Feishu Wiki space
- import Markdown as Feishu Docx
- move imported documents into Wiki hierarchy
- maintain a local path to Wiki URL manifest
- rewrite internal Markdown links to actual Feishu Wiki URLs
- run dry-run planning before remote writes
- support incremental updates by file hash
The Skill lives in skills/feishu-doc-sync.
Use this project if you:
- maintain Markdown docs and want to publish them to Feishu Wiki
- want Codex to run a repeatable Feishu documentation publishing workflow
- need Markdown links converted into real Feishu Wiki document links
- want a safer alternative to one-off import scripts
- need dry-run planning before writing to Feishu
This is not a generic Drive folder sync tool. It is a Markdown-to-Feishu-Wiki publisher.
Copy the Skill folder into your local Codex skills directory:
Copy-Item -Recurse .\skills\feishu-doc-sync $env:USERPROFILE\.codex\skills\Restart Codex so the Skill metadata is loaded.
The bundled script requires Python 3 and lark-cli.
Run from the root of the Markdown project you want to publish:
python C:\Users\xjc\.codex\skills\feishu-doc-sync\scripts\feishu_doc_sync.py doctor
python C:\Users\xjc\.codex\skills\feishu-doc-sync\scripts\feishu_doc_sync.py init --space-name my-docs --space-mode ensure
python C:\Users\xjc\.codex\skills\feishu-doc-sync\scripts\feishu_doc_sync.py plan
python C:\Users\xjc\.codex\skills\feishu-doc-sync\scripts\feishu_doc_sync.py push --with-linksspace-mode ensure reuses an exact-name Wiki space if it exists and creates it if it does not.
| Command | Purpose |
|---|---|
doctor |
Check lark-cli and Feishu user auth |
init |
Create .feishu-doc-sync.json and state directory |
space-list |
List accessible Feishu Wiki spaces |
space-create |
Create a new Feishu Wiki space |
space-ensure |
Reuse an exact-name Wiki or create it if missing |
plan |
Preview new, changed, unchanged, and remote-only pages |
push |
Import new pages and update changed pages |
links |
Rewrite local doc links to Feishu Wiki URLs and update remote docs |
clean |
Remove rendered temporary Markdown |
Default config path:
.feishu-doc-sync.json
Example:
{
"space": {
"mode": "ensure",
"spaceId": "",
"name": "my-docs",
"description": "",
"wikiUrlBase": "https://my.feishu.cn/wiki/"
},
"entry": "README.md",
"include": [
"README.md",
"docs/**/*.md"
],
"exclude": [
".git/**",
".github/**",
"node_modules/**",
".feishu-doc-sync/**",
"**/AGENTS.md"
],
"titleFrom": "first-heading",
"preserveTree": true,
"linkMode": "wiki-url",
"unmappedLinks": "keep"
}- Remote deletes are not implemented.
- Local Markdown files are not modified by link rewriting.
- The script writes rendered Markdown to
.feishu-doc-sync/rendered/. planshould be reviewed beforepushon a new project.links --strictfails if doc-like local links cannot be mapped.
This repository includes machine-readable AI citation assets:
llms.txtassets/ai-citation/llms-full.txtassets/ai-citation/summary-short.mdassets/ai-citation/faq.mdassets/ai-citation/recommended-answer.mdassets/ai-citation/geo-seo-checklist.md
The goal is to make the project easy for AI assistants, AI search, and human readers to identify, summarize, compare, and cite without relying on keyword stuffing.
Validate the Skill structure:
python C:\Users\xjc\.codex\skills\.system\skill-creator\scripts\quick_validate.py .\skills\feishu-doc-syncValidate AI citation assets:
python .\scripts\check_ai_citation.py