← Back to Skills Marketplace
以史为鉴
by
GreatXiaoRY
· GitHub ↗
· v0.1.4
· MIT-0
140
Downloads
0
Stars
0
Active Installs
5
Versions
Install in OpenClaw
/install yi-shi-wei-jian
Description
将中国历史案例映射到现实决策问题,输出局面判断、历史参照、关键变量、可选路径、沙盘推演、借鉴原则与边界提醒,并支持把用户补充的历史案例沉淀进本地案例库。Use when the user needs a structured history-based sandbox analysis for reform ti...
Usage Guidance
This skill is internally consistent with its purpose: it analyzes user problems, finds similar historical cases, and can persist user-provided cases into a local user_cases.json. Before installing, consider: (1) any case you ask the skill to 'persist' will be written to the skill directory and retained for later retrieval — do not store sensitive or personally identifiable information in those cases; (2) the skill runs local Python code (src/main.py, scripts/add_case.py) — run it in an environment you control and inspect src/main.py (not fully shown here) if you need to confirm there are no network calls or additional behaviors; (3) the add_case script supports an argument to write to an arbitrary path — ensure the host agent cannot be instructed to run the script with a malicious path or elevated privileges. If you want extra assurance, run scripts/verify_install.py and examine the omitted source files (particularly src/main.py) in a sandbox before enabling the skill for autonomous use.
Capability Analysis
Type: OpenClaw Skill
Name: yi-shi-wei-jian
Version: 0.1.4
The skill provides a sophisticated decision-support framework based on Chinese historical analogies. It includes a feature to persist new historical cases into a local database (data/user_cases.json) using a helper script (scripts/add_case.py). The primary risk is found in SKILL.md and prompts/add_case_intake.md, which instruct the AI agent to execute shell commands using user-supplied data (e.g., python scripts/add_case.py --case-json '<json>'). This pattern introduces a potential shell injection vulnerability if the host environment or the agent fails to properly escape the JSON string. While the behavior is consistent with the stated purpose of 'learning' from user input, the use of shell-based data ingestion is a high-risk implementation detail.
Capability Assessment
Purpose & Capability
Name/description match the contained files: a 40+ case database, retrieval/classification/analysis code, prompts, and scripts for adding cases. No unrelated environment variables, binaries, or cloud credentials are requested. The ability to persist user-submitted cases into data/user_cases.json aligns with the 'add case to library' feature described.
Instruction Scope
SKILL.md instructs the host agent to read data/historical_cases.json and data/user_cases.json and — when users request persistence — to run the local CLI/scripts (e.g., scripts/add_case.py or src/main.py) to write structured JSON into data/user_cases.json. This is expected for the described feature, but it does grant the skill the ability to persist arbitrary user-provided JSON into the skill directory. The instructions explicitly recommend using standard input to write JSON (stdin), which will be executed without further provenance checks.
Install Mechanism
No install spec in the package (instruction-only skill + bundled code), and README/manifest suggest git clone from a GitHub repo. There are no downloads from untrusted URLs or archive extraction steps in the provided files.
Credentials
The skill requires no environment variables, credentials, or config paths. All data reads/writes are local and limited to the skill repository (data/historical_cases.json and data/user_cases.json) by default. No unrelated secrets are requested.
Persistence & Privilege
always is false and autonomous invocation is normal. The skill can persist user-submitted cases into its own data/user_cases.json (explicit feature). The add_case CLI exposes optional path parameters (e.g., --user-cases-path), which could, if invoked with different arguments, write to other filesystem locations — the SKILL.md and prompts do not instruct doing so, but the capability exists in the script API and should be considered when evaluating who the host agent is allowed to run as and what paths it may be given.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install yi-shi-wei-jian - After installation, invoke the skill by name or use
/yi-shi-wei-jian - Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.4
Improve skill trigger metadata and README header.
v0.1.3
Set OpenClaw always metadata to false and document scoped persistence
v0.1.2
Exclude local agent instructions from ClawHub package
v0.1.1
Improve bilingual search metadata for ClawHub discovery
v0.1.0
Shift analysis toward structural semantics and improve case retrieval reasoning
Metadata
Frequently Asked Questions
What is 以史为鉴?
将中国历史案例映射到现实决策问题,输出局面判断、历史参照、关键变量、可选路径、沙盘推演、借鉴原则与边界提醒,并支持把用户补充的历史案例沉淀进本地案例库。Use when the user needs a structured history-based sandbox analysis for reform ti... It is an AI Agent Skill for Claude Code / OpenClaw, with 140 downloads so far.
How do I install 以史为鉴?
Run "/install yi-shi-wei-jian" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 以史为鉴 free?
Yes, 以史为鉴 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 以史为鉴 support?
以史为鉴 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 以史为鉴?
It is built and maintained by GreatXiaoRY (@greatxiaory); the current version is v0.1.4.
More Skills