Chat/Ask Skill
A simple skill for handling chat conversations and Q&A with OpenClaw.
Description
This skill provides tools for:
- - Chat conversations with OpenClaw
- Asking questions and getting answers
- Managing chat history
- Simple conversation analysis
Tools
chat
Start or continue a chat conversation.
Parameters:
- -
message (string): The message to send in chat - INLINECODE1 (string, optional): Additional context for the conversation
Example:
CODEBLOCK0
ask
Ask a question to OpenClaw.
Parameters:
- -
question (string): The question to ask - INLINECODE3 (boolean, optional): Whether to provide a detailed answer (default: false)
Example:
CODEBLOCK1
chat-history
Manage chat history.
Parameters:
- -
action (string): Action to perform - 'get', 'clear', or 'summary' - INLINECODE5 (number, optional): Number of messages to retrieve (default: 10)
Example:
CODEBLOCK2
Usage
- 1. Start a chat:
CODEBLOCK3
- 2. Ask questions:
CODEBLOCK4
- 3. Manage history:
CODEBLOCK5
How to Call Tools
chat tool
CODEBLOCK6
Example:
CODEBLOCK7
ask tool
CODEBLOCK8
Example:
CODEBLOCK9
chat_history tool
CODEBLOCK10
Examples:
CODEBLOCK11
Response Format
All tools return JSON with:
- -
status: "success" or "error" - INLINECODE7 : ISO format timestamp
- INLINECODE8 : Tool name that was called
- Additional tool-specific fields
chat response
CODEBLOCK12
ask response
CODEBLOCK13
chat_history response
CODEBLOCK14
Configuration
No special configuration required. The skill works out of the box.
Notes
- - Chat history is stored in memory during the session
- For persistent storage, consider integrating with a database
- The skill is designed for simple conversational interactions
聊天/问答技能
一个用于处理与OpenClaw的聊天对话和问答的简单技能。
描述
该技能提供以下工具:
- - 与OpenClaw进行聊天对话
- 提问并获取答案
- 管理聊天历史
- 简单的对话分析
工具
chat
开始或继续聊天对话。
参数:
- - message(字符串):在聊天中发送的消息
- context(字符串,可选):对话的额外上下文
示例:
json
{
message: 你好,最近怎么样?,
context: 只是打个招呼
}
ask
向OpenClaw提问。
参数:
- - question(字符串):要提出的问题
- detailed(布尔值,可选):是否提供详细答案(默认:false)
示例:
json
{
question: 今天天气怎么样?,
detailed: true
}
chat-history
管理聊天历史。
参数:
- - action(字符串):要执行的操作 - get、clear或summary
- limit(数字,可选):要检索的消息数量(默认:10)
示例:
json
{
action: get,
limit: 5
}
使用方法
- 1. 开始聊天:
使用chat工具开始对话
- 2. 提问:
使用ask工具提出具体问题
- 3. 管理历史:
使用chat-history查看或清除对话
如何调用工具
chat工具
bash
python3 scripts/chat_tool.py
[context]
示例:
bash
python3 scripts/chat_tool.py 你好,最近怎么样? 只是打个招呼
ask工具
bash
python3 scripts/ask_tool.py [detailed]
示例:
bash
python3 scripts/ask_tool.py 什么是OpenClaw? true
chat_history工具
bash
python3 scripts/chathistorytool.py [limit]
示例:
bash
获取最近10条消息
python3 scripts/chathistorytool.py get 10
清除历史
python3 scripts/chathistorytool.py clear
获取摘要
python3 scripts/chathistorytool.py summary
响应格式
所有工具返回JSON格式,包含:
- - status:success或error
- timestamp:ISO格式的时间戳
- tool:被调用的工具名称
- 其他工具特定的字段
chat响应
json
{
status: success,
response: 我已收到您的消息...,
timestamp: 2026-03-16T14:30:00.000Z,
tool: chat
}
ask响应
json
{
status: success,
answer: OpenClaw是一个自托管的AI助手...,
detailed: true,
timestamp: 2026-03-16T14:30:00.000Z,
tool: ask
}
chat_history响应
json
{
status: success,
action: get,
history: [...],
count: 5,
limit: 10,
total: 15
}
配置
无需特殊配置。该技能开箱即用。
备注
- - 聊天历史在会话期间存储在内存中
- 如需持久化存储,请考虑集成数据库
- 该技能设计用于简单的对话交互