Notify Feishu Completion
Overview
Send the required Feishu application-bot completion message after a chat turn or qualifying Codex change is finished. Use the bundled script so token retrieval, message shape, and API calls stay consistent.
Workflow
- Confirm whether the active project rules require notification after every completed chat turn. If they do, send even for question-only turns. Otherwise, send only after completing and pushing, or otherwise finishing, a code, asset, UI, documentation, or project change.
- Determine the message fields:
- Project: current repository or workspace name. If it is
codex, render it asCodex. - Chat: current chat/thread title. If unavailable, use the visible workspace/chat directory name.
- Session: current task or conversation name. If unavailable, use a concise name derived from the user's task.
- Time: local completion time.
- Project: current repository or workspace name. If it is
- Run
scripts/send_feishu_completion.pyfrom this skill with explicit--project,--chat, and--sessionwhen you know them. - If the script reports missing Feishu environment variables, tell the user the notification could not be sent for that concrete reason. Do not fall back to Slack.
- If Feishu returns an API error, retry once only when the failure looks transient. Otherwise report the failure and continue the final response.
Script Usage
Use:
python3 /Users/pika/.codex/skills/notify-feishu-completion/scripts/send_feishu_completion.py \
--project "ProjectName" \
--chat "ChatName" \
--session "SessionName"
Use --dry-run to validate the generated message without calling Feishu:
python3 /Users/pika/.codex/skills/notify-feishu-completion/scripts/send_feishu_completion.py \
--project "Codex" \
--chat "new-chat" \
--session "Create Feishu notification skill" \
--dry-run
The script sends this exact message shape:
【项目名】【chat 名称】【会话名】变更已完成,【完成时间】
The script reads these environment variables when not in dry-run mode:
FEISHU_APP_ID
FEISHU_APP_SECRET
FEISHU_RECEIVE_ID_TYPE
FEISHU_RECEIVE_ID
Notes
- Send through Feishu only; never use Slack for this completion notification.
- Keep the final user response clear if the notification was sent or could not be sent.
- Prefer passing explicit field values over relying on script inference when the current chat/session names are known.