Through the local official wecom-cli operate WeCom cloud capabilities. Use it separately from the read-only local database Skill $wecom-local-vault .
Hard boundaries
- Never click, launch, exit, or control the WeCom client, and never call
wecom-cli msgor send messages. - Reads, help, and schema queries can be executed directly; creation, overwriting, updating, inviting, cancellation, and deletion must come from the user's explicit instruction in the current turn.
- Before canceling a meeting/calendar, deleting a to-do, or overwriting an existing document, first confirm the exact target and current state read-only, then obtain the user's explicit confirmation of that target.
- Do not read or output
~/.config/wecom/encrypted credentials, and do not save Bot ID, Secret, internal userid, docid, meetingid, todo_id, or URLs with authorization parameters in replies, logs, reports, or memory. - If
~/.config/wecom/{.encryption_key,bot.enc,mcp_config.enc}already exists, do not re-runwecom-cli initto overwrite the configuration. - Each time, first run the target category's
--help. If it returns "the current enterprise does not support authorization for now," immediately stop that category and do not bypass it using client automation or unofficial protocols. - For remote business results, use
errcode == 0as success; on failure, retry at most once at low frequency. When it returnshelp_instruction, display verbatim as requiredhelp_message。 - Do not automatically delete local upload copies, receipts, or WeCom resources already created after a failure; when cleanup is needed, obtain the user's explicit consent first.
Pre-start checks
SKILL_ROOT="${WECOM_OPERATIONS_SKILL_ROOT:-$HOME/.agents/skills/yichen-wecom-operations}"
python3 "$SKILL_ROOT/scripts/doctor.py"
python3 "$SKILL_ROOT/scripts/doctor.py" --category doc
doctor.py only checks the version, encrypted configuration file permissions, and category availability, and does not read credential contents.
Routing
- Local Markdown, regular documents, smart documents, image evidence: read references/documents.md。
- Schedule/query/cancel meetings, or WeCom calendars: read references/meetings.md。
- Create, query, update, or delete to-dos: read references/todos.md。
Do not read all reference files for unrelated tasks.
Document quick entry
By default, only pre-check and do not produce WeCom write operations:
SKILL_ROOT="${WECOM_OPERATIONS_SKILL_ROOT:-$HOME/.agents/skills/yichen-wecom-operations}"
python3 "$SKILL_ROOT/scripts/create_smartpage.py" \
--source "/absolute/path/report.md" \
--title "报告标题"
Pass only after the user explicitly requests creation in the current turn --execute:
SKILL_ROOT="${WECOM_OPERATIONS_SKILL_ROOT:-$HOME/.agents/skills/yichen-wecom-operations}"
python3 "$SKILL_ROOT/scripts/create_smartpage.py" \
--source "/absolute/path/report.md" \
--title "报告标题" \
--execute
When there are no local images, only create the final smart document; when local images exist, additionally create an explicitly named "image resource" regular document, upload the images and generate WeCom CDN links, then create the final smart document. Both must be disclosed to the user in the result.
Runtime capability check
- Depends on the official WeCom
@wecom/cli, after installation runwecom-cli initto complete the user's own bot configuration. - The authorization scope for documents, to-dos, meetings, calendars, and contacts depends on the enterprise and bot configuration, and must be dynamically checked using
doctor.pyand the target category's--help. - The official CLI can handle text and remote images; local image upload depends on a separately provided helper with
doc +doc_upload_imagecapability, and points to its executable viaWECOM_UPLOAD_HELPER. This repository does not distribute that local extension. - Smart document read-back permission may return
851008; successful creation cannot be passed off as successful read-back verification.
Delivery
Show the user only the readable name, time, status, and final access link. Internal IDs are kept only in the local receipt with permission 0600 , and are not expanded in the conversation.