feishu-power-skill
飞书深度自动化 Skill。多维表格批量操作、跨表关联查询、模板化文档生成、零售运营审计、定时报告调度。触发词:飞书自动化、bitable批量、多维表格、飞书报告、跨表查询、数据快照、门店审计、运营诊断、定时报告、报告调度。
- License 许可
- MIT
- 最近更新
- 2026-09-30
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- feishu-power-skill
- author
- ivz
- license
- MIT
- version
- 1.0.0
- platforms
- [ "openclaw", "claude-code" ]
- description
- 飞书深度自动化 Skill。多维表格批量操作、跨表关联查询、模板化文档生成、零售运营审计、定时报告调度。触发词:飞书自动化、bitable批量、多维表格、飞书报告、跨表查询、数据快照、门店审计、运营诊断、定时报告、报告调度。
- dependencies
- [ "requests", "pyyaml" ]
02 资源文件 14
- 参考文档_meta.json137 B
- 参考文档CLAUDE.md3.0 KB
- 参考文档configs/fmcg.yaml1.5 KB
- 参考文档configs/retail_default.yaml2.1 KB
- 参考文档configs/schedule.yaml1.6 KB
- 脚本install.sh5.6 KB
- 参考文档README.md4.1 KB
- 脚本scripts/bitable_engine.py12.4 KB
- 脚本scripts/doc_workflow.py17.9 KB
- 脚本scripts/feishu_api.py9.5 KB
- 脚本scripts/report_generator.py15.2 KB
- 脚本scripts/retail_audit.py23.3 KB
- 参考文档templates/data_summary.md522 B
- 参考文档templates/weekly_report.md454 B
03 SKILL.md 正文
Feishu Power Skill
让 AI agent 像飞书重度用户一样操作飞书。不只是读写文档,而是跨文档工作流 + 多维表格自动化 + 智能报告生成 + 零售运营审计。
安装
# 自动安装(推荐)
bash install.sh
# 手动安装
pip install requests pyyaml
export FEISHU_APP_ID=cli_xxx
export FEISHU_APP_SECRET=xxx
模块
1. Bitable 自动化引擎 (bitable_engine.py)
多维表格的瑞士军刀:批量读写、跨表 JOIN、快照备份、统计分析。
# 批量创建记录
python3 scripts/bitable_engine.py batch-create --app <app_token> --table <table_id> --data records.json
# 批量更新
python3 scripts/bitable_engine.py batch-update --app <app_token> --table <table_id> --data updates.json
# 跨表 JOIN(两张表按字段关联)
python3 scripts/bitable_engine.py join --app <app_token> --left <table1> --right <table2> --on "字段名"
# 数据快照(备份当前状态)
python3 scripts/bitable_engine.py snapshot --app <app_token> --table <table_id> --output snapshots/
# 统计摘要
python3 scripts/bitable_engine.py stats --app <app_token> --table <table_id>
# CSV 导入
python3 scripts/bitable_engine.py import-csv --app <app_token> --table <table_id> --file data.csv
2. 文档工作流引擎 (doc_workflow.py)
Bitable 数据 + 模板 → 飞书文档,一步到位。
# 从 Bitable 数据 + 模板 → 飞书文档
python3 scripts/doc_workflow.py generate \
--app <app_token> --table <table_id> \
--template templates/data_summary.md \
--title "周报标题" \
--group-by "分类字段" \
--local output.md
# 纯模板渲染(不创建飞书文档)
python3 scripts/doc_workflow.py render --template templates/weekly_report.md --context data.json
# 提取 Bitable 上下文(调试用)
python3 scripts/doc_workflow.py context --app <app_token> --table <table_id>
模板语法:
{{变量}}— 简单替换(支持中文字段名、点号路径如{{门店.名称}}){{#each 列表}}...{{/each}}— 循环{{#if 条件}}...{{/if}}— 条件- 内置变量:
{{TODAY}}{{YESTERDAY}}{{WEEK_START}}{{WEEK_END}}{{NOW}}
3. 零售运营审计引擎 (retail_audit.py)
YAML 配置化审计规则,门店健康评分,异常自动诊断。
# Demo 模式(50家模拟门店,快速体验)
python3 scripts/retail_audit.py demo --output report.md
python3 scripts/retail_audit.py demo --publish # 直接发布到飞书
# 从 Bitable 真实数据审计
python3 scripts/retail_audit.py audit \
--app <app_token> --sales-table <table_id> \
--config configs/retail_default.yaml \
--publish
# 查看可用行业配置
python3 scripts/retail_audit.py list-configs
审计规则(YAML 配置化,可按行业切换):
- 售罄率过高/过低
- 目标达成率不足
- 负库存 / 零销售
- 库存周转过慢
- 动销率过低
内置配置:configs/retail_default.yaml(服装)、configs/fmcg.yaml(快消)。复制一份改阈值即可适配其他行业。
4. 定时报告生成器 (report_generator.py)
调度引擎:支持日/周/月频率,YAML 配置任务列表,自动跟踪执行状态。
# 运行所有到期任务
python3 scripts/report_generator.py run --schedule configs/schedule.yaml
# 运行指定任务
python3 scripts/report_generator.py run --schedule configs/schedule.yaml --job daily_audit
# 强制运行(忽略调度时间)
python3 scripts/report_generator.py run --schedule configs/schedule.yaml --job daily_audit --force
# 列出所有任务及状态
python3 scripts/report_generator.py list --schedule configs/schedule.yaml
# 单次审计报告(不需要调度配置)
python3 scripts/report_generator.py audit --demo --output report.md
# 单次模板报告
python3 scripts/report_generator.py template --app <token> --table <id> --template <path> --publish
调度配置示例(configs/schedule.yaml):
jobs:
- id: daily_audit
name: 每日门店审计
type: audit
enabled: true
schedule:
frequency: daily # daily / weekly / monthly
time: "09:00"
params:
app_token: YOUR_APP_TOKEN
sales_table: YOUR_TABLE_ID
config: retail_default.yaml
publish: true
支持的报告类型:audit(审计报告)、template(模板报告)。
5. API 封装层 (feishu_api.py)
Token 自动管理 + Bitable / Docx / Wiki / Drive 全覆盖。其他模块的底层依赖。
也可以在 Python 中直接 import:
import sys; sys.path.insert(0, "scripts")
import feishu_api as api
records = api.bitable_list_all_records(app_token, table_id)
项目结构
feishu-power-skill/
├── SKILL.md # OpenClaw 入口
├── CLAUDE.md # Claude Code 入口
├── README.md # GitHub README
├── install.sh # 安装脚本
├── scripts/
│ ├── feishu_api.py # 飞书 API 封装
│ ├── bitable_engine.py # 多维表格引擎
│ ├── doc_workflow.py # 文档工作流
│ ├── retail_audit.py # 零售审计引擎
│ └── report_generator.py # 定时报告生成器
├── templates/ # 文档模板
│ ├── weekly_report.md
│ └── data_summary.md
└── configs/ # 配置文件
├── retail_default.yaml # 服装行业审计规则
├── fmcg.yaml # 快消行业审计规则
└── schedule.yaml # 报告调度配置
依赖
- Python 3.11+
- requests, pyyaml
- 飞书应用凭证(通过
FEISHU_APP_ID/FEISHU_APP_SECRET环境变量)
测试 Bitable
J2ehbrIvwaM4XXsjoeQckftAnNe — 内置测试表,可用于验证功能。
04 同仓库更多 Skills
xlsx
Open, create, read, analyze, edit, repair, or validate spreadsheet files (.xlsx, .xlsm, .xltx, .csv, .tsv) with zero format loss, with first-class support for Chinese / CJK content. Use whenever the user asks to create, build, modify, fill, analyze, read, repair, validate, or format any spreadsheet, workbook, report, dashboard, budget, financial model, pivot table, or tabular data file. Handles Chinese text, encodings (UTF-8 / GB18030 / GBK), full-width characters, CJK fonts in rendering, and Chinese number/date conventions (¥, 万/亿, 年/月/日). Covers: creating new workbooks from scratch, reading and analyzing existing files, editing existing workbooks while preserving pivot tables / VBA macros / charts / sparklines / conditional formatting / named ranges, formula recalculation and validation, visual review of results, and applying professional formatting. Triggers on 'spreadsheet', 'Excel', 'workbook', '表格', '工作簿', '.xlsx', '.xlsm', '.csv', 'pivot table', '透视表', 'macro', '宏', 'chart', '图表', 'financial model', '财务模型', 'formula', '公式', or any request to produce tabular data.
xlsx-formula-master
你描述需求(人话),它给你 Excel / WPS 公式 + 解释 + 不踩坑的边界条件。 专攻 VLOOKUP / XLOOKUP / INDEX-MATCH / SUMIFS / 数组公式 / 动态数组 / Power Query 等高频但易错场景。 自动适配你的 Excel 版本(2019 / 365 / WPS)——版本不同公式可能不能用。 触发:用户说 "Excel 公式"、"VLOOKUP"、"怎么算"、"WPS 公式"、"求和怎么写"、"匹配数据"、"数据透视"。
self-improving-agent
Self-improving agent system that analyzes conversation quality, identifies improvement opportunities, and continuously optimizes response strategies.
xiaohongshu-content-tools
小红书运营数据工具|当提到小红书关键词搜索,小红书笔记详情及评论,小红书博主作品时使用,可实现爆款挖掘/竞品分析/KOL筛选/趋势洞察,用数据驱动小红书流量增长,告别盲目创作
xfg-ddd-skills
DDD 六边形架构设计与部署技能包。提供 Domain/Case/Infrastructure 层设计模式与代码模板,以及 Docker 环境部署脚本。当用户询问 DDD 架构、设计模式或需要部署项目时调用。
wordpress
WordPress.com API integration with managed OAuth. Manage posts, pages, sites, and content. Use this skill when users want to create, read, update, or delete WordPress.com posts, pages, or manage site content. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.