← 返回 Skills 市场
shaozrrr

答案之书.skill

作者 SHAO Zhaoru · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
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

  1. Normalize the user input and resolve intents in this order: welcome, fallback, disabled-history notice, daily fortune, contextual switch-book, duplicate check, normal question.
  2. Load per-user state from SQLite before generating any answer.
  3. Reuse last_question only when the input is a switch-book follow-up such as 那用电影版的再测一次.
  4. Block identical questions asked within 300 seconds unless the request is a switch-book follow-up.
  5. Persist only last_question, last_answer, last_book, and last_timestamp after each successful content response.
  6. Default to a random choice between 《电影答案之书》《文学答案之书》 and 《音乐答案之书》 unless the user explicitly specifies a book.
  7. Render every answer with both正文 and 出处:....

Project Files

  • Use main.py as the runtime entry point and local CLI for manual testing.
  • Use service.py for intent orchestration and response composition.
  • Use router.py for three-book routing and switch-book detection.
  • Use storage.py for SQLite persistence and state recovery.
  • Use data/books.json as the built-in answer corpus for the three themed books.
  • Use skill.json and interaction_model.json as the portable metadata and utterance definitions.
  • Use README.md as 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 --interactive for a local REPL.
  • Run python3 -m unittest discover -s tests to 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-skill after 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.
能力标签
crypto
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install book-of-answers-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /book-of-answers-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial public release
元数据
Slug book-of-answers-skill
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

答案之书.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。

💬 留言讨论