Note
本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
English · 原始项目 · 上游 README
原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
面向八字(四柱)与紫微斗数排盘及交叉验证的 AI Skill
确定性排盘(非 LLM 臆测)· 3 种分析模式 · 一键生成水墨风 HTML 命盘海报
简体中文 | English
交叉验证海报样例(合成命例,仅供展示)
一款遵循 SKILL.md 开放标准. 的中国玄学分析 Skill。可接入任意兼容的 AI 智能体 — Claude Code / Claude Desktop / Codex / Cursor / Hermes / OpenClaw 等。
它做好三件单靠 LLM 很难做好的事:
git clone https://github.com/dzcmemory-web/bazi-ziwei-skill.git
cd bazi-ziwei-skill/calculator
npm install
需要 Node.js >= 18。仅一个运行时依赖:
lunar-typescript(MIT)。
将整个 bazi-ziwei-skill/ 文件夹放入智能体的 skills 目录:
| Agent | skills 目录 |
|---|---|
| Claude Code / Claude Desktop | ~/.claude/skills/bazi-ziwei/ |
| Codex | ~/.codex/skills/bazi-ziwei/ 或通过项目 AGENTS.md 引用 |
| Cursor | 通过项目 .cursor/ 规则引用 |
| Hermes Agent | ~/.hermes/skills/bazi-ziwei/ |
| OpenClaw | 其 skills 目录 / 本地 ClawHub 安装 |
智能体会自动读取 SKILL.md,并按需调用。
安装完成后,只需向智能体提供出生时间:
I'm a male born at noon (12:00) on Jan 1, 2000. Read my chart.
智能体将:
完整流程见 SKILL.md,测试见 TEST-GUIDE.md。
cd calculator
# chart -> JSON
node dist/run-chart.js --year=2000 --month=1 --day=1 --hour=12 --minute=0 --gender=male > chart.json
# JSON -> readable text chart
node dist/dump-text.js --input=chart.json --output=chart.txt
# JSON + analysis JSON + template -> HTML poster
node dist/render.js --chart=chart.json --analysis=analysis.json \
--template=../templates/report-zonghe-poster.html --output=report.html --currentYear=2026
内置合成样例(男性,2000-01-01,非真实人物):
examples/sample-chart.json — 算法排盘输出examples/sample-chart.txt — 文本命盘examples/sample-analysis.json — 交叉验证分析(样例)examples/sample-report.html — 成品海报;在浏览器中打开预览bazi-ziwei-skill/
├── SKILL.md Skill entry point (the agent reads this)
├── TEST-GUIDE.md Testing guide (5 user paths)
├── calculator/
│ ├── run-chart.ts charting entry: birth time -> JSON
│ ├── dump-text.ts JSON -> text chart
│ ├── render.ts JSON + analysis + template -> single-file HTML
│ ├── yiqi-core/ charting core (vendored from Yiqi, MIT)
│ └── bazi-enrich/ structure/strength/climate/clash enrichment
├── prompts/
│ ├── bazi-prompt.md BaZi only (long-form)
│ ├── ziwei-prompt.md Zi Wei only (long-form)
│ ├── zonghe-yinzheng-prompt.md cross-validation (long-form)
│ └── zonghe-poster.md cross-validation (poster JSON output)
├── templates/
│ └── report-zonghe-poster.html cross-validation poster template (placeholders)
└── examples/
├── sample-chart.json synthetic sample chart
└── sample-chart.txt synthetic text chart
birth time ──> run-chart.ts ──> chart.json ──> dump-text.ts ──> chart.txt
(deterministic charting) (LLM-friendly text)
│
┌───────────────────────────────────┤
▼ ▼
long-form prompt poster prompt
(Markdown prose) (strict JSON output)
│
render.ts + template
▼
single-file HTML poster
核心设计:LLM 只做分析 — 从不排盘或生成 HTML。排盘由确定性算法处理,HTML 视觉由固定模板呈现,LLM 的结构化输出填充模板槽位。三者职责清晰分离。
NOTICE反馈、合作或疑问:dzcmemory@gmail.com
若本项目对你有帮助,欢迎 ⭐ Star。
本项目基于传统八字与紫微斗数理论,仅供文化研究与娱乐。不构成医疗、财务、婚恋、法律或任何其他决策依据。你的人生由你自己的选择与境遇塑造。
MIT © 2026 dzcmemory-web