Cultural Relics Guide
v1.0.2文物讲解词一键生成。用户只需提供文物名称和 API 信息,系统自动判断讲解风格并生成400-500字的专业讲解词。
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description match implementation: the skill asks the user to supply an API base_url, api_key, and model names via a local config file and then calls that API to produce narration. There are no unrelated dependencies or requested credentials.
Instruction Scope
SKILL.md and the scripts limit actions to reading/writing the local config and prompts, asking the user for relic/museum/profile input, calling the configured model API, and saving the generated text. The code does not read other system files or environment variables.
Install Mechanism
No install spec and the code uses only Python standard library (urllib). Nothing is downloaded or executed from external URLs by the skill itself.
Credentials
The skill does not request environment variables but does persistently store the API key and base_url in config/user_config.json in plaintext. It also allows any arbitrary base_url, so a malicious or misconfigured endpoint provided by the user could receive the inputs (relic name, user question) and the API key. These behaviors are coherent with a local LLM-API client but are security-sensitive; consider file permissions and trust of the endpoint.
Persistence & Privilege
The skill is not force-included (always:false), does not modify other skills or global agent settings, and only writes its own config and output files within its directory structure.
Assessment
This skill appears to do what it says: it asks you to enter an API base URL and API key and then calls that endpoint to generate narration. Before using it: 1) only provide an API key for a trusted service — do not paste production or high-privilege keys; 2) be aware the key is saved in plaintext at config/user_config.json in the skill folder—restrict file permissions or delete the file after use; 3) confirm the base_url you enter is the official endpoint for your provider (a malicious URL could collect your key and inputs); 4) if you prefer not to store the key in a file, consider editing the script to read the key from a secure secret manager or environment variable and avoid committing the config. Also note a minor metadata formatting artifact (Required config paths shown as [object Object]) in the skill registry — this is likely a display glitch but you should verify the actual config path (config/user_config.json) before running.Like a lobster shell, security has layers — review code before you run it.
latest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
Config[object Object]
SKILL.md
文物讲解词一键生成
用户输入文物名称、博物馆和 API 信息 → 系统自动判断风格 → 生成400-500字讲解词
目录结构
narration-generator/
├── SKILL.md # 本文件
├── config/
│ ├── user_config.example.json # 配置模板(示例)
│ ├── user_config.json # 用户配置(实际使用)
│ └── prompts.json # Prompt 模板
└── scripts/
├── narration_generator.py # 主程序
└── utils.py # 公共工具
首次使用配置
1. 编辑配置文件
打开 config/user_config.json,填入您的 API 信息:
{
"api": {
"base_url": "https://your-api.com/v1/chat/completions",
"api_key": "您的API密钥",
"model_narration": "模型名称",
"model_style": "模型名称",
"timeout": 60
}
}
配置说明:
| 字段 | 必填 | 说明 |
|---|---|---|
base_url | ✅ | API 服务器地址 |
api_key | ✅ | API 密钥 |
model_narration | ✅ | 讲解词生成模型 |
model_style | ❌ | 风格判断模型(默认同讲解模型) |
timeout | ❌ | 超时时间(秒),默认60 |
使用方法
交互式运行
cd scripts
python narration_generator.py
程序会引导您:
- 配置 API(如首次使用)
- 输入文物名称和博物馆
- 选择听众类型
- 可选:输入额外问题
- 自动生成讲解词
工作流程
输入文物信息 → 自动判断风格 → 生成讲解词 → 输出结果
自动风格判断
系统根据听众画像自动适配讲解风格(用户无需选择):
| 听众类型 | 系统自动适配风格 |
|---|---|
| 普通游客 | 通识全面型 |
| 儿童 | 儿童探索型 |
| 学者/研究者 | 深度学术型 |
| 自定义描述 | 智能判断 |
输出示例
============================================================
🖼️ 文物讲解词一键生成
============================================================
文物: 后母戊鼎 | 博物馆: 中国国家博物馆 | 听众: 普通游客
确认生成? (Y/n): Y
生成中...
============================================================
这件重达832.84公斤的青铜巨兽,是三千多年前商王朝的国力象征...
(完整讲解词)
------------------------------------------------------------
字数: 512 | 已保存: 讲解词_后母戊鼎.txt
支持的 API
所有兼容 OpenAI API 格式的服务商:
- 火山引擎(豆包)
- DeepSeek
- 阿里云(通义千问)
- OpenAI
- 本地模型(Ollama 等)
技术特点
- 零依赖:仅使用 Python 标准库
- 自动风格适配:根据听众自动判断,用户无需选择
- 配置持久化:API 配置保存后下次无需重复输入
- Prompt 独立:模板与代码分离,易于调整
Files
5 totalSelect a file
Select a file to preview.
Comments
Loading comments…
