← 返回 Skills 市场
arkerro

Feishu Chat Importer

作者 arkerro · GitHub ↗ · v1.0.0 · MIT-0
win32linuxdarwin ✓ 安全检测通过
62
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install feishu-chat-importer
功能描述
Convert Feishu chat history exports into OpenClaw episodic memory format. Parses feishu_chat_YYYYMMDD.json files, normalizes messages, and writes daily episo...
使用说明 (SKILL.md)

Feishu Chat History Importer

Import Feishu chat history exports into OpenClaw episodic memory. Converts feishu JSON exports into daily episodic summaries that the Dreaming system can process and display in Imported Insights and Memory Palace views.

Quick Start

# Dry run — preview what would be imported
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --dry-run

# Import all Feishu chats
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history

# Import only chats since a date
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --since 2026-03-01

# Verbose — show every message
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --dry-run --verbose

How It Works

  1. Read feishu_chat_YYYYMMDD.json files from the source directory
  2. Group messages by date (from create_time / millisecond timestamp)
  3. Normalize each message to {role, content, timestamp}
    • sender.sender_type = "user" → role = user
    • sender.sender_type = "app" → role = assistant (Feishu bot = AI)
  4. Write daily episodic summaries to memory/episodic/YYYY-MM-DD.md
  5. Dreaming processes episodic files → appears in Imported Insights + Memory Palace

Output Format

Writes to memory/episodic/YYYY-MM-DD.md:

## Feishu Chat: \x3Cchat_id> (2026-03-19)
- Messages: \x3Ccount>
- Participants: user_id, app_id

### user (首长):
message content here...

### assistant (飞书机器人):
message content here...

Key Concepts

  • Daily grouping: All messages from the same YYYYMMDD file land in the same episodic file
  • Deduplication: Chat IDs tracked — re-running never creates duplicates
  • Role mapping: User messages → user, App/bot messages → assistant
  • Content extraction: Handles text and post msg_type automatically
  • OPENCLAW_WORKSPACE: Set this env var to point imports to the right agent workspace

Source Format

Expects Feishu export files named feishu_chat_YYYYMMDD.json with this structure:

[
  {
    "message_id": "om_xxx",
    "chat_id": "oc_xxx",
    "create_time": "1773899372102",
    "msg_type": "text|post",
    "sender": {
      "id": "ou_xxx",
      "sender_type": "user|app"
    },
    "body": {
      "content": "{\"text\":\"message text\"}"  // text type
      // or
      "content": "{\"title\":\"\",\"content\":[[{\"tag\":\"text\",\"text\":\"...\"}]]}"  // post type
    }
  }
]
安全使用建议
This skill appears to do exactly what it claims (parse feishu_chat_YYYYMMDD.json files and write daily episodic markdown). Before installing or running it: 1) Run a dry-run first (the CLI supports --dry-run) and point --dir to a safe test folder. 2) Ensure the correct Python executable is available: the metadata requires python3 but batch.py invokes 'python' — on systems without a 'python' symlink this may fail; either install a 'python' binary or edit batch.py to call 'python3'. 3) Set OPENCLAW_WORKSPACE explicitly to the intended workspace before importing so files are written where you expect (the skill currently references this env var but doesn't declare it). 4) Inspect or back up your workspace/memory/episodic directory if you have existing data — the skill appends to files and uses a simple marker to deduplicate. 5) Because the skill reads arbitrary JSON files from a directory you provide and writes to your workspace, avoid pointing it at sensitive system directories. The scripts contain no network calls or credential handling, but if you need higher assurance, review the included Python files yourself (they are short and human-readable).
能力评估
Purpose & Capability
Name/description align with the included scripts: both parse Feishu export JSON files and write daily episodic markdown into the agent workspace. Required binary (python3) is reasonable. Minor mismatch: the batch driver launches the parser via subprocess using the 'python' command, while the metadata requires 'python3' — this may fail on systems where 'python' is not present or points to Python 2.
Instruction Scope
SKILL.md and the scripts only read Feishu JSON files from a user-specified directory, normalize/group messages, and write markdown files into the workspace memory/episodic directory. There are no instructions to read unrelated system files, network endpoints, or external services.
Install Mechanism
No install spec; the skill is instruction + local Python scripts. This is low-risk compared to remote installers or archive downloads since code is bundled with the skill. The scripts are plain Python, not obfuscated.
Credentials
SKILL.md and the batch script reference the OPENCLAW_WORKSPACE environment variable to locate the target workspace, but the skill's declared requirements list no required env vars. That mismatch means important behavior (where files get written) depends on an undeclared env var. The skill writes files to the user's workspace directory (filesystem access) which is necessary for its purpose but worth noting.
Persistence & Privilege
always is false, the skill does not request permanent or elevated platform privileges, and it does not modify other skills or system-wide settings. It writes episodic files only under the workspace path.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-chat-importer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-chat-importer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of feishu-chat-importer. - Converts Feishu chat history exports into OpenClaw episodic memory format. - Parses feishu_chat_YYYYMMDD.json files, normalizes messages, and groups them by date. - Writes daily episodic summaries to memory/episodic/ for use in Imported Insights and Memory Palace. - Supports dry run, date filtering, and verbose import options. - Maps user and app messages to user and assistant roles accordingly. - Ensures deduplication and proper content extraction for both text and post message types.
元数据
Slug feishu-chat-importer
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Feishu Chat Importer 是什么?

Convert Feishu chat history exports into OpenClaw episodic memory format. Parses feishu_chat_YYYYMMDD.json files, normalizes messages, and writes daily episo... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 62 次。

如何安装 Feishu Chat Importer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-chat-importer」即可一键安装,无需额外配置。

Feishu Chat Importer 是免费的吗?

是的,Feishu Chat Importer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Feishu Chat Importer 支持哪些平台?

Feishu Chat Importer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(win32, linux, darwin)。

谁开发了 Feishu Chat Importer?

由 arkerro(@arkerro)开发并维护,当前版本 v1.0.0。

💬 留言讨论