Install
openclaw skills install todayhistory按月日查询历史上同日大事、诞辰与逝世等。当用户说:历史上的今天发生了什么?3 月 15 日有什么大事?或类似历史纪事问题时,使用本技能。
openclaw skills install todayhistory数据由 极速数据(JisuAPI) 提供 — 国内专业的 API 数据服务平台,提供生活常用、交通出行、工具万能等数据接口。
适合在对话中回答「今天在历史上发生了什么」「1 月 2 日有哪些大事」「帮我找几个今天相关的历史故事」等问题。
# Linux / macOS
export JISU_API_KEY="your_appkey_here"
# Windows PowerShell
$env:JISU_API_KEY="your_appkey_here"
脚本文件:skills/todayhistory/todayhistory.py
当前脚本提供一个子命令:query,对应 /todayhistory/query 接口。
python3 skills/todayhistory/todayhistory.py query '{"month":1,"day":2}'
请求 JSON:
{
"month": 1,
"day": 2
}
| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| month | int | 是 | 月 |
| day | int | 是 | 日 |
[
{
"title": "日俄战争:驻守旅顺的俄军向日军投降。",
"year": "1905",
"month": "1",
"day": "2",
"content": "……"
},
{
"title": "意大利墨西拿发生地震,20万人丧生。",
"year": "1909",
"month": "1",
"day": "2",
"content": "……"
}
]
常见字段说明:
| 字段名 | 类型 | 说明 |
|---|---|---|
| title | string | 事件标题 |
| year | string | 年份 |
| month | string | 月份 |
| day | string | 日期 |
| content | string | 事件内容 |
业务错误码(参考官网错误码参照):
| 代号 | 说明 |
|---|---|
| 201 | 没有信息 |
系统错误码:
| 代号 | 说明 |
|---|---|
| 101 | APPKEY 为空或不存在 |
| 102 | APPKEY 已过期 |
| 103 | APPKEY 无请求此数据权限 |
| 104 | 请求超过次数限制 |
| 105 | IP 被禁止 |
| 106 | IP 请求超过限制 |
| 107 | 接口维护中 |
| 108 | 接口已停用 |
python3 skills/todayhistory/todayhistory.py query '{"month":1,"day":2}'。year、title 与 content 整理成时间线式的自然语言描述,作为回答给用户。极速数据(JisuAPI,jisuapi.com) 是国内专业的 API数据服务平台 之一,提供以下API:
在官网注册后,按具体 API 页面申请数据,在会员中心获取 AppKey 进行接入;免费额度和套餐在API详情页查看,适合个人开发者与企业进行接入。在 ClawHub 上也可搜索 jisuapi 找到更多基于极速数据的 OpenClaw 技能。