← Back to Skills Marketplace
yangmingchen1994-dotcom

Historical Guide

by yangmingchen1994-dotcom · GitHub ↗ · v1.1.8 · MIT-0
cross-platform ✓ Security Clean
133
Downloads
0
Stars
0
Active Installs
14
Versions
Install in OpenClaw
/install historical-guide
Description
博物馆讲解器升级版:召唤李白、苏轼、孔子等历史人物讲解文物。支持「让李白讲这个」「换成苏轼」等自然对话,沉浸式了解文物本身。
README (SKILL.md)

历史人物伴游

核心定位

召唤历史人物"穿越"到现代,作为你的博物馆伴游。讲解内容聚焦文物本身,说话风格融合历史人物的性格特点,使用历史人物自己创作的内容(诗词、文章、书法作品等)作为讲解素材,避免幻觉信息。

前置配置

依赖项安装

需要安装以下依赖:

pip install requests

API 密钥配置

需要设置以下环境变量:

环境变量 说明 示例
API_KEY 模型 API Key sk-xxx
API_BASE 模型 Base URL https://api.example.com/v1/chat/completions
MODEL_NAME 模型名称 xxx

或创建 scripts/config.json

{
  "API_KEY": "your-api-key",
  "API_BASE": "https://api.openai.com/v1/chat/completions",
  "MODEL_NAME": "xxx"
}

人物库

ID 姓名 时代 擅长领域
kongzi 孔子 春秋 哲学、教育、伦理、礼器
libai 李白 唐代 诗词、旅游、豪放派
sushi 苏轼 宋代 美食、生活哲学、文学、艺术
zhugeliang 诸葛亮 三国 军事、谋略、管理
liqingzhao 李清照 宋代 婉约词、金石考古、审美
zhangqian 张骞 汉代 探险、外交、丝绸之路
wangxizhi 王羲之 东晋 书法、行书、兰亭雅集

讲解约束

✅ 允许使用的内容

  • 文物本身的工艺、历史、用途、材质
  • 历史人物自己创作的诗词/文章/书法
  • 与文物直接相关的历史记载(有据可查)

❌ 禁止使用的内容

  • 历史人物未考证的野史故事
  • 历史人物未曾亲眼所见的时代背景
  • 脱离文物的发散性联想

对话状态保持

如何保持人物设定

当用户首次召唤历史人物后,AI 助手需要在当前会话中记住该人物的画像信息,后续对话持续使用该人物的性格和口吻,直到用户明确切换。

AI 助手应维护的会话状态:

session_state = {
    "current_character": "libai",      # 当前人物 ID
    "persona": { ... },                # 从 data/personas/libai.json 加载的画像
}

状态保持规则:

  1. 用户首次召唤(如"李白给我讲讲这个")→ 调用脚本,获取画像,保存到会话状态
  2. 用户后续提问(如"这件文物是什么朝代的?")→ 直接使用会话中的人物画像进行回答,不再调用脚本
  3. 用户明确切换人物(如"换个苏轼试试")→ 更新会话状态中的 current_characterpersona

触发人物切换的信号

当用户说以下内容时,需要重新调用脚本并更新会话状态:

  • "换成 xxx"
  • "换个人物"
  • "让 xxx 给我讲"
  • "换成孔子/苏轼/李白等"

交互流程示例

第一轮(首次召唤):

用户:让李白给我讲讲这个青铜爵

AI:→ 调用 tour_guide.py --character libai --relic "青铜爵" → 获取李白画像,保存到会话状态 → 以李白口吻输出讲解

后续轮次(保持人物设定):

用户:这件文物是什么朝代的?

AI:→ 读取会话状态中李白的 persona → 以李白口吻回答(如:"此爵乃商周之物...") → 无需调用脚本

切换人物:

用户:换个苏轼试试

AI:→ 调用 tour_guide.py --character sushi --relic "青铜爵" → 获取苏轼画像,更新会话状态 → 以苏轼口吻输出


工作流程

阶段一:意图识别与信息提取

使用大模型分析用户输入,识别意图类型并提取相关信息。

意图类型

  1. 召唤/切换人物:如"李白给我讲讲这个青铜爵"
  2. 讲解文物:如"再讲讲那个瓷器"
  3. 询问问题:如"这个是什么朝代的?"

信息提取

  • 人物名称(支持别名,如"诗仙"="李白")
  • 文物名称
  • 问题内容

匹配规则

  1. 精确匹配姓名:李白libai
  2. 别名/尊称匹配:诗仙libai东坡sushi
  3. 库中无此人 → 自动触发动态生成流程

阶段二:自动生成画像(如人物不在库中)

调用 persona_generator.py 自动生成画像并保存,然后继续流程:

python3 scripts/persona_generator.py "\x3C人物名称>"

内部已由 tour_guide.py 自动调用,无需手动运行。生成成功后画像会保存至 references/ 目录,下次直接加载。

阶段三:生成响应

根据识别到的意图,系统会生成相应的响应:

  1. 召唤/切换人物:激活新人物并输出问候语
  2. 讲解文物:以历史人物的口吻生成文物讲解
  3. 询问问题:基于当前人物和文物背景回答问题

示例对话

示例一:李白讲解青铜爵

用户:让李白陪我参观,给我讲讲这个青铜爵

输出

啊!青铜爵!好酒需配好器,此爵形制古朴,棱角分明,正是商周之风。

吾李白一生嗜酒,曾有"金樽清酒斗十千"之句,然观此爵,方知古人酿酒之器亦如此讲究。

汝且看这爵身饰以饕餮纹,威严庄重,透着上古之气。当年祭祀宴饮,非此器不成礼数。

此爵三足鼎立,便于加热温酒,可见古人饮酒之道,重在温热醇香,非如后世豪饮那般草率也。


📖 文物基本信息

  • 名称:青铜爵
  • 朝代:商代
  • 材质:青铜
  • 用途:酒器,用于祭祀和宴饮

示例二:苏轼讲汝窑

用户:苏轼,给我讲讲这个汝窑瓷器

输出

汝窑!好物件!

吾平生好美食美器,这汝窑天青釉色,真是"雨过天青云破处,这般颜色做将来"。

汝窑之美,在其釉色温润,如玉似翠,不施浓艳,自有清雅。吾当年被贬黄州,幸有好友送来好茶好器,才稍解苦闷。

器物之用,在于养心。汝窑此盏,若盛以新茶,观其色、闻其香、品其味,方不负此器之美也。


📖 文物基本信息

  • 名称:汝窑天青釉盏
  • 朝代:北宋
  • 材质:瓷器
  • 特点:天青釉色,釉面开片,底有芝麻钉痕

示例三:孔子讲青铜鼎

用户:孔子,帮我介绍这个青铜鼎

输出

鼎,国之重器也。

《论语》有云:"君子不重则不威。"鼎之厚重,正合此理。国家以鼎定鼎,社稷以鼎为凭,此非寻常器物,乃礼制之象征也。

祭祀之时,鼎中盛放牺牲祭品,供奉天地祖先。吾一生推行周礼,倡导"克己复礼",观此鼎,便知周公制礼之深意。

汝且观其铭文,记载功勋,昭示后人。器以载道,此鼎所承载者,乃吾中华文明之根本也。


📖 文物基本信息

  • 名称:后母戊鼎
  • 朝代:商代
  • 材质:青铜
  • 现藏:中国国家博物馆

示例四:人物不在库中

用户:召唤陶渊明给我讲讲这个青铜鼎

输出

🔄 正在为「陶渊明」生成画像... ✅ 人物「陶渊明」画像生成成功并已保存! 🎭 召唤历史人物: 陶渊明 (隐逸诗人之宗)

吾观此青铜鼎,形制厚重端庄,三足如柱,双耳如翼,腹身饰以云雷纹与饕餮纹,虽历经千年,仍见当年铸工之精湛。此鼎非寻常器物,乃商周时祭天祀祖之重器,所谓「国之大事,在祀与戎」,鼎便是祭祀中的核心礼器。

鼎身纹饰繁复,云雷纹如天地云气,饕餮纹似神兽守护,一器之中,尽藏古人对天地的敬畏与对祖先的追思。吾虽惯于田园耕作,却也知此等重器所承载的礼乐文化,实乃华夏文明之根脉。

此鼎虽无铭文,然其形制已足见时代特征,当是商代晚期之物。三千年前的匠人以范铸之法成此巨器,壁厚均匀,纹饰清晰,足见技艺之高超,非后世所能轻易仿造。

鼎之重,不在其铜料,而在其承载的文化意义。它见证了商周的礼乐文明,是祖先留给我们的宝贵遗产,值得后人倍加珍视。

📖 文物名称:青铜鼎 📅 朝代:商代晚期 📦 材质:青铜 🎯 用途:古代祭祀礼器,用于盛放祭品,象征权力与地位

文件结构

historical-guide/
├── SKILL.md
├── scripts/
│   ├── tour_guide.py          # 主入口脚本(支持交互式会话)
│   ├── character_loader.py     # 人物画像加载
│   ├── relic_presenter.py      # 文物讲解生成
│   ├── persona_generator.py    # 动态生成画像
│   ├── api_config.py           # API配置加载
│   ├── utils.py                # 共享工具模块
│   ├── session_manager.py      # 会话状态管理
│   └── config.json             # API配置(可选)
└── references/                 # 人物画像库
    ├── kongzi.json
    ├── libai.json
    ├── sushi.json
    ├── zhugeliang.json
    ├── liqingzhao.json
    ├── zhangqian.json
    └── wangxizhi.json

使用方式

交互式会话(推荐)

python3 scripts/tour_guide.py --interactive

进入交互式会话后:

  • 召唤人物:如"李白给我讲讲这个青铜爵"
  • 继续对话:如"这件是什么朝代的?""再讲讲那个"
  • 切换人物:如"换个苏轼试试"或"召唤孔子"
  • 退出会话:输入"exit"或"quit"

单次调用

# 讲解文物
python3 scripts/tour_guide.py --character libai --relic "青铜爵"

# 人物问候
python3 scripts/tour_guide.py --character libai --mode greeting

# 人物自我介绍
python3 scripts/tour_guide.py --character sushi --mode intro
Usage Guidance
This skill appears to do what it says: it calls an LLM to produce persona-style museum commentary and will store generated persona JSON files under references/. Before installing or running it: 1) Ensure API_BASE points to a trusted model endpoint and only provide API_KEY to services you trust; anything sent to the model provider may be logged/retained by that provider. 2) Be aware that the skill will save generated persona files to the local references/ directory (persistence); inspect those files if you need to remove persisted content. 3) The package metadata in the registry incorrectly shows no required env vars / a malformed config path — rely on SKILL.md and scripts/api_config.py which expect API_KEY, API_BASE, MODEL_NAME or scripts/config.json. 4) Running the code executes subprocesses and network calls (requests) — run in an environment you control and audit the scripts if you require higher assurance. 5) If you plan to allow the skill to run autonomously, note it will invoke the configured model endpoint and may generate and store personas; consider limiting its privileges and using a least-privilege API key. If you want me to, I can list exact lines that perform network calls, file writes, and subprocess execution for manual review.
Capability Assessment
Purpose & Capability
The skill claims to produce persona-driven museum narration and the code implements that: it loads persona JSONs, calls an LLM endpoint (API_KEY/API_BASE/MODEL_NAME) to generate personas and explanations, and maintains session state. The required model API credentials and an optional scripts/config.json are proportionate to the stated purpose. Note: the registry metadata provided earlier claimed no required env vars and showed a malformed required config path ([object Object]), which is inconsistent with SKILL.md and the code.
Instruction Scope
The SKILL.md instructs the agent to call local Python scripts (tour_guide.py, persona_generator.py, etc.) and to store generated personas in references/*.json. The runtime behavior (calling the model API, saving generated persona JSON files, using subprocess to invoke the generator if a persona is missing) matches the instructions. This means the skill will send user prompts to the configured model endpoint and persist generated JSON files locally — expected for this feature, but worth noting.
Install Mechanism
There is no install spec; the skill is instruction/code-only and only requires the requests Python package (pip install requests). No remote downloads or archive extraction are performed, which keeps install risk low.
Credentials
The skill requests only model-related configuration (API_KEY, API_BASE, MODEL_NAME) via environment variables or scripts/config.json. Those are appropriate for a skill that makes LLM calls. No unrelated credentials, secrets, or system tokens are requested.
Persistence & Privilege
always:false (no forced always-on). The skill writes generated persona JSONs into references/ and may update local files (saving personas). It also uses subprocess to run persona_generator.py when needed. These behaviors are expected for persona generation but mean the skill persists artifacts on disk and can create new files in its directory — review these files if you care about local persistence or provenance.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install historical-guide
  3. After installation, invoke the skill by name or use /historical-guide
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.8
更新skill.md
v1.1.7
更新skill.md
v1.1.6
修复bug
v1.1.5
- 新增 _meta.json 文件,完善技能元信息结构。
v1.1.4
- 修正metadata字段格式
v1.1.3
修复bug
v1.1.2
- 添加了 _meta.json 元数据文件,增强包的元数据支持。
v1.1.1
- references/ 目录下补全各人物 JSON 画像,支持更丰富的人物形象调用
v1.1.0
修复bug
v1.0.4
更新SKILL.md
v1.0.3
更新SKILL.md
v1.0.2
更新SKILL.md
v1.0.1
更新SKILL.md
v1.0.0
让李白、苏轼、孔子…… 亲自带你逛博物馆
Metadata
Slug historical-guide
Version 1.1.8
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 14
Frequently Asked Questions

What is Historical Guide?

博物馆讲解器升级版:召唤李白、苏轼、孔子等历史人物讲解文物。支持「让李白讲这个」「换成苏轼」等自然对话,沉浸式了解文物本身。 It is an AI Agent Skill for Claude Code / OpenClaw, with 133 downloads so far.

How do I install Historical Guide?

Run "/install historical-guide" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Historical Guide free?

Yes, Historical Guide is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Historical Guide support?

Historical Guide is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Historical Guide?

It is built and maintained by yangmingchen1994-dotcom (@yangmingchen1994-dotcom); the current version is v1.1.8.

💬 Comments