Only read the workflows needed for the current task; cross-step tasks can read multiple in sequence.
After loading, convert the references/、scripts/、templates/、examples/ relative paths in the workflow according to that
workflow.md directory resolution; when executing scripts, use the resolved actual paths, do not rely on the current shell directory.
Routing
| Intent | Read file |
|---|---|
| Read, summarize, analyze docx/wiki/sheet, read large documents locally by outline/section/keyword, obtain block structure, do not proactively write to disk | references/workflows/read/workflow.md |
Convert document content into Markdown that can be sent directly via IM (doc read --doc-format im-markdown,--lang controls the @mention display language) |
references/workflows/read/workflow.md |
Read with block id (doc read --with-ids / --engine docs_ai), to prepare for precise modifications |
references/workflows/read/workflow.md |
Create documents from scratch (write / draft proposals, PRDs, weekly reports, meeting minutes, reports, tutorials, etc.), choose genre, write DocxXML draft and use doc script initialization and pre-check |
references/workflows/author/workflow.md |
Create docx (including doc create --content create documents with local images/attachments, HTML blocks, whiteboard source files), append, overwrite, replace, delete or move content, precisely rewrite by block id, insert local or clipboard images/attachments (--from-clipboard) |
references/workflows/write/workflow.md |
set, download or delete document cover (doc resource update/download/delete --type cover) |
references/workflows/write/workflow.md |
view historical versions, roll back document (doc history list/revert/revert-status) |
references/workflows/write/workflow.md |
| Import Markdown files as Feishu docx (including Mermaid/PlantUML/SVG to whiteboard) | references/workflows/import/workflow.md |
Export docx/wiki/sheet to local Markdown/PDF/Word/Excel, download or preview images, attachments, comment images or whiteboard thumbnails in documents (doc media-download / doc media-preview) |
references/workflows/export/workflow.md |
Upload, download, overwrite, find and replace or compare cloud drive native .md |
references/workflows/markdown/workflow.md |
Read nodes of an existing mind note, add child nodes or update nodes (mindnote nodes list/create) |
references/workflows/mindnote/workflow.md |
Key boundaries
- "View and summarize" goes through read; only when explicitly required to save to a path does it go through export.
- Writing a document from scratch goes through author; only creating an empty document, writing user-given complete content as-is, or modifying an existing document goes through write.
- Converting Markdown to a readable docx goes through import; storing
.mdsource files as-is into the cloud drive goes through markdown. mindnote nodes createOnly adds/updates nodes in an existing mind note, does not create a new mind note; creating a new mind map goes throughfeishu-cli-visual's whiteboard.- Importing binary files such as DOCX/XLSX goes through
feishu-cli-storage's drive workflow. doc htmlboxbelongs tofeishu-cli-visual; permissions and transferring ownership belong tofeishu-cli-storage。
Execution rules
/wiki/For links or tokens of unknown type, firstdrive inspect --urlparse; for Bitable links usebitable resolve. After parsing a wiki link, distinguish node_token from the underlying document obj_token; when the underlying is sheet/bitable/slides, hand it over to the corresponding skill by type.- Modifying an existing document always uses
doc content-update, do not usedoc import --document-id(only appends to the end of the document); to change a few words use text-level replacement, to change a section or block firstdoc read --with-idsget the block id. Before writing, confirm the target, update mode and scope of impact;content-updatehas no dry-run, when uncertain, first verify on a test document. - Write commands default to Bot identity: documents newly created by the Bot automatically grant the currently logged-in user
full_access(outputpermission_grant); when editing the user's own document and the Bot lacks permission, explicitly--user-access-token "$(feishu-cli auth token --as user)". Read commands prefer User, fall back to Bot. - Handle results by exit code: 2 = ambiguous arguments or targeting (selector matches multiple places, dialect placeholder cannot be written back, local file does not exist), fix the arguments and retry;
1 with failure details (
doc import'sfailures、content-update'spartial_success, local resourcefailed) means fill in according to the details, do not re-import the whole document; 10 = dangerous operation missing--yes(doc delete、doc history revert)。 - Before import, read
references/workflows/import/references/doc-guide.md。 - When the user explicitly specifies recipients, authorize as requested; otherwise, follow the write workflow to read the effective
owner_email/transfer_ownership, and only handle it when an owner is configured. If no notification is requested, return the document link in the current session.
When delete or overwrite commands return exit code 10, confirm the target and impact with the user, then append the global --yes and rerun; do not add it yourself. For identity or scope errors (such as 99991663/99991668/99991672/99991679), read ../feishu-cli-platform/references/workflows/auth/references/identity.md; to determine success or failure, write scripts, or handle confirmation gates, read ../feishu-cli-platform/references/workflows/auth/references/agent-contract.md。