skills/chatlab-import-cn/SKILL.md
通过 chatlab CLI 安全预览并将本地聊天导出文件导入 ChatLab。当用户要求外部 Agent 从本地 QQ、微信、Telegram、WhatsApp、LINE、Discord、Instagram、Google Chat、ChatLab JSON/JSONL 或其他受支持的聊天导出文件执行首次导入、重新导入或增量更新时使用。
npx skillsauth add hellodigua/chatlab chatlab-import-cnInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
通过 chatlab CLI 导入本地聊天导出文件。始终先预览准确的写入计划。将用户明确提出的导入请求视为授权,预览成功后继续执行,不再请求二次确认。
如果只需分析 ChatLab 中已有的聊天记录,请使用 chatlab-analyze-cn。
安装命令:
npx skills add ChatLab/ChatLab --skill chatlab-import-cn -g
chatlab --help
如果 CLI 未安装,告诉用户运行 npm install -g chatlab-cli。未经批准不要自行安装软件。存在多个候选文件时不要猜测,每条命令中的路径都要加引号。
chatlab import "/absolute/path/to/chat-export.json" --dry-run --json
如果用户选择了已有会话,在预览和正式导入中都加入 --session-id <session-id>。
只总结新建或更新模式、目标会话 ID、扫描消息数、新增消息数、重复消息数,以及匹配方式或新建原因。不要引用消息正文。
根据预览结果决定下一步:
importMode 为 incremental 且 newMessageCount 为 0 时,告诉用户会话已经是最新状态,然后停止。importMode 为 incremental 且存在新增消息时,无需再次确认,自动继续。importMode 为 created 时,自动继续。如果 createReason 为 ambiguous,通过新建会话保护已有会话,并在最终结果中说明原因。--dry-run:chatlab import "/absolute/path/to/chat-export.json" --json
根据最终 JSON 信封报告结果会话 ID、导入模式、新增消息数和重复消息数。
error.hint。FILE_NOT_FOUND 要求正确路径;UNRECOGNIZED_FORMAT 查看 chatlab formats;IMPORT_IN_PROGRESS 稍后重试;INVALID_SESSION_ID 要求有效 ID。development
Convert unsupported local chat exports into validated ChatLab JSONL or JSON by inspecting their structure, writing and running a local Node.js or Python converter, and verifying record counts before import. Use when ChatLab cannot recognize a CSV, HTML, TXT, XML, SQLite/database, vendor-specific JSON/JSONL, archive, or other chat export format, or when a user asks an agent to adapt an unknown chat format for ChatLab.
development
将 ChatLab 暂不支持的本地聊天导出转换为经过验证的 ChatLab JSONL 或 JSON:分析源文件结构,编写并运行本地 Node.js 或 Python 转换脚本,并在导入前核对记录数量。当 ChatLab 无法识别 CSV、HTML、TXT、XML、SQLite/数据库、厂商自定义 JSON/JSONL、压缩包等聊天导出,或用户要求 Agent 适配未知聊天格式时使用。
tools
Safely preview and import local chat export files into ChatLab through the chatlab CLI. Use when a user asks an external agent to import, re-import, or incrementally update ChatLab from a local QQ, WeChat, Telegram, WhatsApp, LINE, Discord, Instagram, Google Chat, ChatLab JSON/JSONL, or other supported chat export.
tools
通过 chatlab CLI 分析本地 ChatLab 聊天记录。当用户要求外部 Agent 检查对话、查找证据、总结话题、比较成员,或基于已导入的 ChatLab 数据分析指定人物或群组关系时使用。