← Back to Skills Marketplace
答案之书.skill
by
SHAO Zhaoru
· GitHub ↗
· v1.0.0
· MIT-0
89
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install book-of-answers-skill
Description
Route natural-language questions into a three-book answer experience and return one random cited answer with SQLite-backed minimal per-user memory, duplicate...
README (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.
Usage Guidance
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.
Capability Tags
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install book-of-answers-skill - After installation, invoke the skill by name or use
/book-of-answers-skill - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial public release
Metadata
Frequently Asked Questions
What is 答案之书.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... It is an AI Agent Skill for Claude Code / OpenClaw, with 89 downloads so far.
How do I install 答案之书.skill?
Run "/install book-of-answers-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 答案之书.skill free?
Yes, 答案之书.skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 答案之书.skill support?
答案之书.skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 答案之书.skill?
It is built and maintained by SHAO Zhaoru (@shaozrrr); the current version is v1.0.0.
More Skills