Automatically generate 6 types of management reports from Feishu Bitable, send to Feishu group chat or export as DOCX
Feature Overview
This Skill is the Feishu-adapted version of project-tracker. Differences from the Excel version:
- Data source: Read in real time from Feishu Bitable (Bitable), no file upload required
- Default output: Send to Feishu group chat (rich text/card message), can also export DOCX
- Dependencies: Requires use with
feishu-toolkitSkill
6 types of reports
| Report Type | Applicable Scenario | Data Range |
|---|---|---|
| Weekly Progress Brief | Weekly meeting | Last 2 weeks |
| Monthly Management Report | Monthly summary | Last 4 weeks |
| Project Milestone Report | Milestone check | Last 4 weeks |
| Team Performance Analysis | Performance evaluation | Last 4 weeks |
| Risk Alert Special Report | Risk warning | Last 4 weeks |
| Quarterly Reporting Materials | Leadership reporting | Last 6 weeks |
Usage Steps
Step 0: Prerequisites
- Ensure
feishu-toolkitis deployed and running (defaulthttp://127.0.0.1:8002) - Create a Bitable in Feishu, containing two data tables:
Table 1: Work Task Tracking Table Fields include: section, task category, specific task, importance level, lead/support, responsible team, serial number, weekly progress (last week's progress/this week's plan/existing issues)
Table 2: Work Task List Fields include: module, frequency, work task, milestone node plan
- Add the Feishu app as a Bitable collaborator (top right of the document → More → Add document app)
- Get the Bitable
app_token(extract from the Bitable URL:https://xxx.feishu.cn/base/{app_token})
Step 1: Read Feishu data
# 读取数据并输出摘要
python3 scripts/parse_bitable.py --app-token <APP_TOKEN>
# 含任务清单(里程碑数据)
python3 scripts/parse_bitable.py --app-token <APP_TOKEN> --tasklist
# 按团队过滤
python3 scripts/parse_bitable.py --app-token <APP_TOKEN> --team 英大长安
# JSON 格式输出
python3 scripts/parse_bitable.py --app-token <APP_TOKEN> --format json
The data tables are automatically detected—the script identifies the work tracking table and task list table based on field name keywords (section, task category, specific task, etc.). You can also manually specify --tracker-table and --tasklist-table。
Step 2: Generate reports and send to Feishu
# 全部6类报告 → 发送到飞书群聊
python3 scripts/batch_generate_feishu.py --app-token <APP_TOKEN> --chat-id <CHAT_ID>
# 全部6类 → 发送到个人
python3 scripts/batch_generate_feishu.py --app-token <APP_TOKEN> --user-id <USER_OPEN_ID>
# 使用卡片格式(更精美)
python3 scripts/batch_generate_feishu.py --app-token <APP_TOKEN> --chat-id <CHAT_ID> --feishu-format card
# 仅生成指定报告
python3 scripts/batch_generate_feishu.py --app-token <APP_TOKEN> --chat-id <CHAT_ID> --reports weekly risk
Step 2-alt: Export as DOCX
# 全部6类 → 导出到桌面
python3 scripts/batch_generate_feishu.py --app-token <APP_TOKEN> --docx --output-dir ~/Desktop
Step 3: Send existing reports to Feishu separately
# 将已有的 Markdown 报告发送到飞书
python3 scripts/send_feishu.py --input report.md --chat-id <CHAT_ID>
python3 scripts/send_feishu.py --input report.md --chat-id <CHAT_ID> --format card
Environment Variables
| Variable | Required | Description |
|---|---|---|
MINIMAX_API_KEY |
✅ | MiniMax API key |
FEISHU_APP_ID |
✅ | Feishu app App ID |
FEISHU_APP_SECRET |
✅ | Feishu app App Secret |
FEISHU_TOOLKIT_URL |
No | feishu-toolkit address (default http://127.0.0.1:8002) |
MINIMAX_BASE_URL |
No | MiniMax API address (default https://api.minimaxi.com/v1) |
File Structure
project-tracker-feishu/
├── SKILL.md # 本文件
├── scripts/
│ ├── parse_bitable.py # 飞书多维表格数据解析
│ ├── send_feishu.py # 飞书消息发送
│ ├── batch_generate_feishu.py # 批量报告生成(主入口)
│ ├── generate_docx.py # DOCX 生成(复用)
│ └── test_e2e.py # (原版遗留,飞书版不使用)
├── references/
│ ├── analysis-rules.md # 分析规则
│ └── report-templates.md # 报告模板
Differences from the original project-tracker
| Comparison Item | project-tracker | project-tracker-feishu |
|---|---|---|
| Data Source | Excel file (.xlsx) | Feishu Bitable |
| Data reading | openpyxl local parsing | HTTP API remote call |
| Default output | Terminal + DOCX | Feishu message (rich text/card) |
| DOCX support | ✅ (default) | ✅ (optional --docx) |
| Dependencies | openpyxl, python-docx | requests, python-docx, feishu-toolkit |
| Deployment requirements | Python only required | feishu-toolkit service must be running |
Report output specifications
All reports follow these specifications:
- Central enterprise official document style: four-character phrases, parallel structures, layered progression
- No first person: do not use "I", "we", "our department"; always use third person
- Data-driven: all data must come from actual submissions; fabrication is prohibited
- No emojis/exclamation marks: maintain a formal official document style
- Dynamic team analysis: automatically identify all teams in the data and analyze each one
- Milestone references: when node risks are involved, specific time nodes must be cited