Feishu Chat Importer

v1.0.0

Convert Feishu chat history exports into OpenClaw episodic memory format. Parses feishu_chat_YYYYMMDD.json files, normalizes messages, and writes daily episo...

0· 56·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for arkerro/feishu-chat-importer.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Feishu Chat Importer" (arkerro/feishu-chat-importer) from ClawHub.
Skill page: https://clawhub.ai/arkerro/feishu-chat-importer
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install feishu-chat-importer

ClawHub CLI

Package manager switcher

npx clawhub@latest install feishu-chat-importer
Security Scan
VirusTotalVirusTotal
Pending
View report →
OpenClawOpenClaw
Benign
medium confidence
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.
Assessment
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).

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

📥 Clawdis
OSWindows · Linux · macOS
Binspython3
latestvk97dt20ta4n19xjxdwepptc9dx851gdv
56downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0
Windows, Linux, macOS

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: <chat_id> (2026-03-19)
- Messages: <count>
- 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
    }
  }
]

Comments

Loading comments...