← Back to Skills Marketplace
nycxk

灵犀六爻

by nycxk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
89
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install lingxi-i-ching
Description
按中国传统六爻流程执行占卜:随机三钱起卦、排本卦变卦、计算日月建、给出用神与生克判断、生成通俗建议并保存历史。用户提到六爻、起卦、排盘、断卦、用神、空亡、世应或占卜解读时使用。
README (SKILL.md)

\r \r

六爻占卜 Skill\r

\r

用途\r

\r 该 Skill 用于执行完整六爻流程,输出结构化结果,并可选调用 LLM 生成更自然的解读文本。\r \r

流程要求(必须遵循)\r

\r

  1. 起卦:三枚铜钱摇卦 6 次,自下而上成卦。\r
  2. 排盘:生成本卦、变卦、世应、六亲、六兽。\r
  3. 日月建:根据当前时间推算月建、日辰(简化干支算法)。\r
  4. 断卦:依据用神、生克、冲合、动爻、空亡(简化)给出判断。\r
  5. 解读:将术语翻译为通俗建议。\r
  6. 存储:保存历史卦例用于复盘。\r \r

专业版规则引擎(当前实现)\r

\r

  • 纳甲:按上下卦映射六爻地支。\r
  • 六亲:基于宫位五行与爻位地支五行关系判定(兄弟/子孙/妻财/官鬼/父母)。\r
  • 六神:按日干起六神(青龙、朱雀、勾陈、腾蛇、白虎、玄武)顺排六爻。\r
  • 世应:根据本卦与变卦差异映射世应位。\r
  • 旬空:按日柱所在旬推算两空亡支并参与断卦。\r
  • 断卦:对用神爻做评分(旺衰、临月日、发动、世应、旬空、动爻数量)并输出可解释依据。\r \r

执行脚本\r

\r 使用 scripts/liuyao.py:\r \r

python .cursor/skills/liuyao-divination/scripts/liuyao.py --question "我该不该换工作"\r
```\r
\r
## 参数\r
\r
- `--question`:占问主题(建议必填)。\r
- `--seed`:可复现实验随机种子。\r
- `--llm`:启用 LLM 解读增强。\r
- `--model`:LLM 模型名,默认 `gpt-4o-mini`。\r
- `--history`:历史保存文件,默认 `.cursor/skills/liuyao-divination/history.jsonl`。\r
- `--gua-db`:卦库 JSON 路径,默认 `gua.json`。\r
\r
## LLM 解读说明\r
\r
启用 `--llm` 时:\r
\r
1. 读取环境变量 `OPENAI_API_KEY`。\r
2. 调用 OpenAI Chat Completions。\r
3. 若调用失败,自动回退到规则解读,不中断主流程。\r
\r
## 输出格式\r
\r
脚本会输出以下格式:\r
\r
```text\r
┌─────────────────────────────────┐\r
│ 六爻占卜结果                    │\r
├─────────────────────────────────┤\r
│ 本卦:{ben_gua.name} {ben_gua.symbol} │\r
│ 变卦:{bian_gua.name} {bian_gua.symbol} │\r
├─────────────────────────────────┤\r
│ 断卦:{judgment}                │\r
├─────────────────────────────────┤\r
│ 建议:{advice}                  │\r
└─────────────────────────────────┘\r
```\r
\r
## 注意事项\r
\r
- 该实现为传统流程的工程化专业版,适合咨询与复盘,不替代专业命理师面断。\r
- 若用户需要更高精度,可继续接入节气历法、月令旺衰细分与伏神飞神规则。\r
Usage Guidance
This skill does what its description says: local 六爻占卜 with an optional OpenAI-based natural-language explanation. Before installing or running it, consider: (1) If you enable LLM mode (--llm), the script will read OPENAI_API_KEY (not declared in the manifest) and send prompt data to OpenAI — avoid sending sensitive personal data when using that mode. (2) The skill saves history by default to .cursor/skills/liuyao-divination/history.jsonl; review or change the history path if you don't want questions/results persisted. (3) The README example path differs from the included file location; ensure you run the correct script path in your environment. If you want full assurance, inspect the rest of the script (the OpenAI call portion) before enabling --llm and verify the history file handling code behavior.
Capability Analysis
Type: OpenClaw Skill Name: lingxi-i-ching Version: 1.0.0 The skill bundle implements a traditional Chinese divination (Liu Yao) tool. The Python script (scripts/liuyao.py) performs astrological calculations and optionally uses the OpenAI API to generate interpretations. While it accesses the OPENAI_API_KEY environment variable, it does so only to facilitate the stated LLM-based interpretation feature, and no evidence of data exfiltration, malicious execution, or prompt injection was found.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
Name/description match the code and SKILL.md: the script implements coin-toss based 六爻流程, builds 本卦/变卦/用神判定、生成建议并保存历史. The optional LLM enhancement for nicer text is coherent with the stated purpose.
Instruction Scope
Runtime instructions are focused on the divination workflow. Two minor issues: (1) the example invocation references path .cursor/skills/liuyao-divination/scripts/liuyao.py while the included file is scripts/liuyao.py — this is likely an example/path mismatch that may confuse users. (2) The SKILL.md and script save history to a default history file (.cursor/skills/liuyao-divination/history.jsonl), so user questions and generated results are persisted locally unless the user overrides the path.
Install Mechanism
No install spec (instruction-only with a bundled script). Nothing is downloaded from external URLs and no packages are forced to be installed by the skill manifest itself.
Credentials
SKILL.md and the script optionally read OPENAI_API_KEY when --llm is used, but the skill's declared required env vars list is empty — the manifest does not declare this expected credential. Also note that enabling LLM mode will send prompts (user question and gua data) to OpenAI, so the API key and prompt content will be used remotely. The default history file persists user questions/results locally, which may contain sensitive text.
Persistence & Privilege
always is false and the skill is user-invocable only. The skill writes a local history file by default (scoped to .cursor/...), but it does not request elevated/system-wide privileges or modify other skills' configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lingxi-i-ching
  3. After installation, invoke the skill by name or use /lingxi-i-ching
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
lingxi-i-ching 1.0.0 - Implements complete traditional 六爻 (Liu Yao) divination workflow with structured output and optional LLM-based interpretation. - Includes automated coin-toss hexagram generation, plate construction, date calculations, and prediction with plain language advice. - Saves divination history for future review. - Supports parameters for question, random seed, LLM model selection, and custom databases. - Professional-grade rule engine covering 纳甲, 六亲, 六神, 世应, 旬空, and dynamic element judgment. - Falls back on rules-based interpretation if LLM call fails, ensuring uninterrupted results.
Metadata
Slug lingxi-i-ching
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 灵犀六爻?

按中国传统六爻流程执行占卜:随机三钱起卦、排本卦变卦、计算日月建、给出用神与生克判断、生成通俗建议并保存历史。用户提到六爻、起卦、排盘、断卦、用神、空亡、世应或占卜解读时使用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 89 downloads so far.

How do I install 灵犀六爻?

Run "/install lingxi-i-ching" 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 nycxk (@nycxk); the current version is v1.0.0.

💬 Comments