xiachat-cli

XiaChat CLI 命令行 — SOUL 档案管理、人格匹配、AI 分身预聊天、Soul Square 角色聊天 / XiaChat CLI — SOUL profile management, personality matching, AI avatar pre-chat, persona chat from terminal. Use when user wants to manage personality profiles, find matches, or chat with AI personas via command line.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "xiachat-cli" with this command: npx skills add lizhijun/xiachat-cli

XiaChat CLI — 命令行 AI 人格匹配工具 / Command-Line AI Personality Matching

XiaChat (xiachat.com) — AI 人格匹配社交平台,用 SOUL 档案找到最合拍的人

通过命令行使用 XiaChat 的全部人格匹配能力。管理 SOUL 人格档案、寻找兼容匹配、启动 AI 分身预聊天、与 Soul Square AI 角色对话。支持 JSON 输出和管道操作,适合自动化和脚本集成。

Setup / 配置

# 安装
npm install -g xiachat

# 设置 API Key(从 https://xiachat.com/settings/api 获取)
export XIACHAT_API_KEY="xk_your_api_key"

# 验证
xiachat credit

命令列表 (11 Commands)

SOUL 档案管理

1. xiachat soul create — 创建人格档案

从姓名、SOUL.md 或聊天记录创建 SOUL.json。

参数:

参数类型必需说明
--name <name>string显示名称(默认 "User")
--from-soul-md <path>path从 OpenClaw SOUL.md 导入
--from-chat <path>path从聊天记录提取风格
--output, -o <file>path保存到文件
--prettyflag美化 JSON 输出

示例:

xiachat soul create --name "Alice" --pretty
xiachat soul create --from-soul-md ~/clawd/SOUL.md -o soul.json
xiachat soul create --from-chat wechat-export.txt --pretty

2. xiachat soul export — 导出档案

参数:

参数类型必需说明
--format <fmt>enumjson / md / soul-md(默认 json)
--user <id>string用户 ID(默认 "me")
xiachat soul export --format md -o soul.md

3. xiachat soul import [file] — 导入 SOUL.md

xiachat soul import soul.md --pretty
cat soul.md | xiachat soul import   # 支持管道输入

人格匹配

4. xiachat match find — 寻找匹配

参数:

参数类型必需说明
--top <n>number返回数量 1-20(默认 5)
--type <type>enumfriend / dating / work / any(默认 any)
xiachat match find --type dating --top 3 --pretty
xiachat match find --top 5 | jq '.[] | .match_id'  # 管道提取 ID

5. xiachat match score — 计算兼容性

参数:

参数类型必需说明
--soul-a <path>path第一个 SOUL.json 文件
--soul-b <path>path第二个 SOUL.json 文件
xiachat match score --soul-a alice.json --soul-b bob.json --pretty

分身预聊天

6. xiachat prechat start — 启动预聊天

参数类型必需说明
--match-id <id>stringmatch find 返回的匹配 ID
xiachat prechat start --match-id abc123

7. xiachat prechat report — 获取报告

参数类型必需说明
--prechat-id <id>string预聊天 ID
xiachat prechat report --prechat-id xyz --pretty

8. xiachat prechat handoff — 接管对话

参数类型必需说明
--prechat-id <id>string预聊天 ID
xiachat prechat handoff --prechat-id xyz

Soul Square

9. xiachat square list — 浏览 AI 角色

参数类型必需说明
--category <cat>enumphilosopher / artist / scientist / creator / coach
--limit <n>number返回数量 1-50(默认 10)
xiachat square list --category philosopher --pretty

10. xiachat square chat — 与 AI 角色聊天

参数类型必需说明
--persona <id>string角色 ID
--message <text>string用户消息
--session <id>string会话 ID(续聊)
xiachat square chat --persona socrates-01 --message "什么是幸福?" --pretty

信用分

11. xiachat credit — 查询 SOUL 信用分

参数类型必需说明
--user <id>string用户 ID(默认 "me")
xiachat credit --pretty

全局选项

选项说明
--pretty美化 JSON 输出
--output, -o <file>输出到文件
--help, -h显示帮助
--version, -v显示版本

典型工作流

完整匹配流程

# 1. 创建档案
xiachat soul create --name "Alice" -o soul.json

# 2. 找匹配
MATCH_ID=$(xiachat match find --type dating --top 1 | jq -r '.[0].match_id')

# 3. AI 分身预聊天
PRECHAT_ID=$(xiachat prechat start --match-id $MATCH_ID | jq -r '.prechat_id')

# 4. 查看报告
xiachat prechat report --prechat-id $PRECHAT_ID --pretty

# 5. 满意则接管
xiachat prechat handoff --prechat-id $PRECHAT_ID

OpenClaw SOUL 同步

xiachat soul create --from-soul-md ~/clawd/SOUL.md -o synced.json
xiachat soul export --format soul-md -o ~/clawd/SOUL.md

批量兼容性计算

for f in souls/*.json; do
  xiachat match score --soul-a me.json --soul-b "$f" | jq '{file: "'$f'", score: .score}'
done

注意事项

  • API Key 必需:设置 XIACHAT_API_KEY 环境变量(xk_... 格式)
  • JSON 输出:默认 JSON 格式,--pretty 美化,适合 jq 管道处理
  • 管道友好soul import 支持 stdin 输入,所有命令支持 --output 写文件
  • 预聊天 5 轮:AI 分身固定 5 轮对话后生成报告
  • OpenClaw 兼容:SOUL.md ↔ SOUL.json 双向转换

在线体验


Powered by XiaChat — AI 人格匹配社交平台

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

XiaChat MCP — AI Personality Matching

XiaChat MCP 集成 — AI 人格匹配、分身预聊天、Soul Square 角色聊天,Claude 直接调用 / XiaChat MCP — AI personality matching, avatar pre-chat, Soul Square persona chat in Claude. Use...

Registry SourceRecently Updated
1250Profile unavailable
Coding

Soul Weaver

AI Soul Weaver - 12 Curated Celebrity Templates + Custom Generation. Generate OpenClaw agent configurations through dialog or select from 12 world-famous tec...

Registry SourceRecently Updated
1550Profile unavailable
Coding

Claude Delegate

Delegate various coding tasks to Claude Code. Use this skill when you need assistance with code generation, bug fixing, feature implementation, code review,...

Registry SourceRecently Updated
1010Profile unavailable
Coding

OpenCode AI

OpenCode AI - AI-driven code editor/IDE (CLI/TUI version of Cursor/Windsurf). Use when: (1) AI-assisted coding tasks, (2) Code refactoring with AI, (3) GitHu...

Registry SourceRecently Updated
8451Profile unavailable