← 返回 Skills 市场
答案之书.skill
作者
SHAO Zhaoru
· GitHub ↗
· v1.0.0
· MIT-0
89
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install book-of-answers-skill
功能描述
Route natural-language questions into a three-book answer experience and return one random cited answer with SQLite-backed minimal per-user memory, duplicate...
使用说明 (SKILL.md)
Book of Answers Skill
Core Workflow
- Normalize the user input and resolve intents in this order: welcome, fallback, disabled-history notice, daily fortune, contextual switch-book, duplicate check, normal question.
- Load per-user state from SQLite before generating any answer.
- Reuse
last_questiononly when the input is a switch-book follow-up such as那用电影版的再测一次. - Block identical questions asked within 300 seconds unless the request is a switch-book follow-up.
- Persist only
last_question,last_answer,last_book, andlast_timestampafter each successful content response. - Default to a random choice between
《电影答案之书》、《文学答案之书》and《音乐答案之书》unless the user explicitly specifies a book. - Render every answer with both正文 and
出处:....
Project Files
- Use
main.pyas the runtime entry point and local CLI for manual testing. - Use
service.pyfor intent orchestration and response composition. - Use
router.pyfor three-book routing and switch-book detection. - Use
storage.pyfor SQLite persistence and state recovery. - Use
data/books.jsonas the built-in answer corpus for the three themed books. - Use
skill.jsonandinteraction_model.jsonas the portable metadata and utterance definitions. - Use
README.mdas the repository-level setup and usage guide.
Runtime Rules
- Detect fallback input when the message contains no Chinese or alphabetic characters and is effectively digits or symbols only.
- Prefer explicit book selection when the user names
电影、文学or音乐in the same request. - Keep response formatting stable for normal answers:
我感受到了你的困惑。
正在为你翻开 [book_name]...
它给你的指引是:
「 [答案正文] 」
出处:[出处]
Validation
- Run
python3 main.py --user-id demo-user "明天会好吗"for a direct single-turn test. - Run
python3 main.py --user-id demo-user --interactivefor a local REPL. - Run
python3 -m unittest discover -s teststo validate key intent and state flows. - Run
python3 /Users/shaozhaoru/.codex/skills/.system/skill-creator/scripts/quick_validate.py /Users/shaozhaoru/Documents/book-of-answers-skillafter editing skill metadata.
安全使用建议
This skill is coherent and appears offline-only: it reads data/books.json and writes a small local SQLite DB. Before installing, review data/books.json (it contains many quotes and sources) to ensure you’re comfortable with the content and any copyright considerations. If you don’t want the DB in the skill directory, set ANSWER_LIBRARY_DB to a controlled path. You can run the provided unit tests (python3 -m unittest discover -s tests) locally to validate behavior. If you plan to allow autonomous agent invocation, note the agent may call the skill automatically (disable-model-invocation is not set here) — if you want to restrict that, change the skill settings. Otherwise, there are no unexpected network calls, secret requirements, or install-time downloads in this package.
能力标签
能力评估
Purpose & Capability
Name/description, SKILL.md, and the included Python modules (router.py, service.py, storage.py) consistently implement a three-book routing answer skill. No unrelated credentials, binaries, or external services are requested.
Instruction Scope
Runtime instructions are limited to reading the built-in books.json, routing logic, and minimal SQLite-backed per-user state. The code does not access other system paths, network endpoints, or environment variables beyond the documented optional overrides.
Install Mechanism
No install spec or remote downloads; code is provided in the skill bundle and declares no external runtime dependencies. No archive extraction or third-party package installation is requested.
Credentials
No required environment variables or secrets. Two optional env vars (ANSWER_LIBRARY_DB and ANSWER_LIBRARY_BOOKS) are documented and serve clear, proportional purposes (override DB location and books file).
Persistence & Privilege
Skill persists minimal per-user state (last_question, last_answer, last_book, last_timestamp) to a local SQLite DB in the skill's data directory by default. This is consistent with its stated anti-duplicate and switch-book features; consider where that DB will be created and whether that location is acceptable.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install book-of-answers-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/book-of-answers-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial public release
元数据
常见问题
答案之书.skill 是什么?
Route natural-language questions into a three-book answer experience and return one random cited answer with SQLite-backed minimal per-user memory, duplicate... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 89 次。
如何安装 答案之书.skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install book-of-answers-skill」即可一键安装,无需额外配置。
答案之书.skill 是免费的吗?
是的,答案之书.skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
答案之书.skill 支持哪些平台?
答案之书.skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 答案之书.skill?
由 SHAO Zhaoru(@shaozrrr)开发并维护,当前版本 v1.0.0。
推荐 Skills