← 返回 Skills 市场
77
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install feishu-file-renamer
功能描述
批量恢复和重命名飞书机器人下载的哈希文件名,支持群聊、云文档及多维表格映射,自动冲突处理和日志记录。
使用说明 (SKILL.md)
📁 feishu-file-renamer - 飞书文件重命名助手
🎯 功能
解决飞书机器人下载文件时文件名变成哈希值的问题。
核心功能
- 📁 原始文件名恢复 - 从消息元数据提取原名
- 📦 批量重命名 - 一次处理上百个文件
- 🤖 飞书集成 - 消息/群聊/云文档支持
- 📊 多维表格联动 - 从表格读取映射关系
- ⚡ 智能冲突处理 - 自动添加序号
- 📝 重命名日志 - 详细统计和错误报告
🚀 使用方法
命令触发
/rename-file
/feishu-rename
/restore-filename
自然语言触发
重命名文件
恢复文件名
飞书文件
哈希文件名
批量重命名
高级用法
# 单文件
claw skill run feishu-file-renamer \
--file "/tmp/img_v3_xxx.png" \
--name "产品图.png"
# 批量(从消息)
claw skill run feishu-file-renamer \
--message-id "om_x100b520xxx" \
--output-dir "/tmp/renamed"
# 多维表格
claw skill run feishu-file-renamer \
--bitable "APP_TOKEN" \
--table "TABLE_ID"
📋 输出示例
重命名完成
### ✅ 文件重命名完成
**统计结果:**
- ✅ 成功:48
- ❌ 失败:2
- ⏭️ 跳过:0
**重命名日志:** /tmp/rename_log.md
使用方法(无文件时)
### 📁 飞书文件重命名助手
**使用方法:**
方式 1:单文件重命名
claw skill run feishu-file-renamer \
--file "/tmp/img_v3_xxx.png" \
--name "产品图.png"
方式 2:批量重命名
claw skill run feishu-file-renamer \
--message-id "om_x100b520xxx" \
--output-dir "/tmp/renamed"
⚙️ 配置
支持场景
| 场景 | 支持 | 说明 |
|---|---|---|
| 飞书私信 | ✅ | 完全支持 |
| 飞书群聊 | ✅ | 完全支持 |
| 云文档附件 | ✅ | 完全支持 |
| 多维表格 | ✅ | 完全支持 |
文件限制
- 大小:\x3C 100MB
- 数量:无限制
- 格式:所有格式
🔧 技术原理
文件名恢复
// 从消息解析:[img_v3_xxx.png](产品图.png)
function extractFileMappings(message: string): FileMapping[] {
// 正则匹配飞书文件链接格式
const pattern = /\[(img_v3_[^\]]+)\]\(([^\)]+)\)/g;
// 提取哈希文件名和原始文件名
}
冲突处理
// 产品图.png 已存在 → 产品图_1.png
let counter = 1;
while (existsSync(finalPath)) {
finalPath = `${baseName}_${counter}${ext}`;
counter++;
}
📝 使用场景
- 群聊文件整理 - 恢复下载的产品图
- 电商上架 - 批量重命名后上传
- 设计稿归档 - 按项目分类重命名
- 文档管理 - 恢复云文档附件原名
🐛 常见问题
Q: 支持表情包吗?
A: 不支持,飞书 API 限制。
Q: 文件大小限制?
A: 建议 100MB 以内。
Q: 支持子文件夹吗?
A: 支持,使用 --recursive。
Q: 如何恢复原名?
A: 查看重命名日志。
📊 性能指标
| 文件数 | 手动 | Skill | 提升 |
|---|---|---|---|
| 10 | 5 分钟 | 3 秒 | 100x |
| 50 | 25 分钟 | 8 秒 | 187x |
| 100 | 50 分钟 | 15 秒 | 200x |
📄 许可证
MIT License
🔗 相关链接
作者: 郑宇航
版本: 1.0.0
最后更新: 2026-04-06
安全使用建议
Key issues to consider before installing: (1) The documentation advertises Feishu and Bitable integration (message-id, APP_TOKEN) but the shipped code does not call any network APIs or read credentials — this likely means the skill either isn't finished or its docs are misleading. (2) The implementation performs local filesystem renames using paths you provide or that it derives from message text; running it will rename files on disk (it can rename arbitrary files if mappings point to them). Back up important data and test in a sandbox directory first. (3) If you expect automatic fetching from Feishu or a Bitable table, ask the author how credentials are supplied and why no env vars are required; do not supply real production tokens until the skill explicitly documents and uses them. (4) Prefer installing only after the author clarifies whether remote API integration is implemented and what credentials are needed; if you must use it now, review and run the code locally in a controlled environment.
功能分析
Type: OpenClaw Skill
Name: feishu-file-renamer
Version: 1.0.0
The feishu-file-renamer skill is a utility designed to restore original filenames to files downloaded via Feishu (Lark) bots, which often arrive with hashed names. The core logic in `src/index.ts` uses standard Node.js file system operations (`fs.renameSync`, `fs.writeFileSync`) to rename files and generate logs in `/tmp/`. The code includes proper input sanitization using `path.basename` to prevent path traversal attacks and handles filename conflicts gracefully. No evidence of data exfiltration, malicious command execution, or harmful prompt injection was found in the code or documentation.
能力评估
Purpose & Capability
The README and SKILL.md state Feishu message/cloud-document and 多维表格 (Bitable) integration and show command flags like --message-id and --bitable APP_TOKEN. The actual TypeScript code only parses a provided message string and performs local filesystem renames; there are no HTTP calls, no SDK usage, and the package requests no environment variables or credentials. This mismatch suggests either incomplete implementation or misleading documentation: the skill claims cloud integration but does not require or use the tokens that such integration would need.
Instruction Scope
SKILL.md instructs users to invoke the skill with message-id, APP_TOKEN, and to read mappings from Feishu messages or a table. The runtime instructions imply the agent will fetch message contents and table rows. The handler function handleFeishuFileRenamer expects a message string argument (already containing the message text) and never fetches remote data; there are no instructions or code to obtain messages by ID or to call Bitable APIs. Additionally, SKILL.md suggests automatic processing of cloud attachments, but code only renames local files referenced by mappings (and mappings produced by regex extraction).
Install Mechanism
No install spec is provided; this is effectively instruction+source code only. Nothing is downloaded or installed at runtime by an external URL or package manager. That reduces supply-chain risk for installation.
Credentials
The documentation and examples reference APP_TOKEN and running against Feishu/Bitable, which would normally require credentials (env vars). However the skill declares no required env vars and the code does not read any credentials. This is inconsistent: a skill that integrates with Feishu/Bitable should request and use credentials. The absence suggests the docs overpromise or the implementation is incomplete. On the positive side, the code does not attempt to read unrelated environment variables or config paths.
Persistence & Privilege
The skill is not always-enabled, is user-invocable, and does not modify other skills or system-wide config. It writes a log to /tmp/rename_log.md and performs local filesystem renames (renameSync), which is expected given its purpose. No elevated persistence or cross-skill privileges are requested.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install feishu-file-renamer - 安装完成后,直接呼叫该 Skill 的名称或使用
/feishu-file-renamer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
feishu-file-renamer v1.0.0
- Initial release of Feishu file renaming assistant.
- Restores original filenames from Feishu message metadata.
- Supports batch renaming of hundreds of files with conflict resolution.
- Integrates with Feishu private chat, group chat, cloud docs, and Bitable spreadsheets.
- Provides detailed rename logs and error reports for each operation.
- Command-line and natural language triggers available.
元数据
常见问题
Feishu File Renamer 是什么?
批量恢复和重命名飞书机器人下载的哈希文件名,支持群聊、云文档及多维表格映射,自动冲突处理和日志记录。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 77 次。
如何安装 Feishu File Renamer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-file-renamer」即可一键安装,无需额外配置。
Feishu File Renamer 是免费的吗?
是的,Feishu File Renamer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Feishu File Renamer 支持哪些平台?
Feishu File Renamer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Feishu File Renamer?
由 rfdiosuao(@rfdiosuao)开发并维护,当前版本 v1.0.0。
推荐 Skills