Skip to content
cccskills
FreePublished on GitHub

metaphysics-steward

玄学管家——专业中文玄学排盘引擎。支持七法+合婚:八字四柱、紫微斗数、大六壬、奇门遁甲、梅花易数、金口诀、六爻纳甲、八字合婚;含真太阳时校正、天干地支历法、起卦装卦、双造合婚。

The English summary is being prepared. Showing the original description.

See how to install

Files included (30)

  • SKILL.md4.3 KB
  • .gitignore72 B
  • LICENSE1.0 KB
  • README.md7.9 KB
  • references/hehun_rules.md3.6 KB
  • references/liuyao_lost_items.md2.2 KB
  • references/liuyao_najia.md3.5 KB
  • references/LUNAR_PYTHON_REFERENCE.md1.5 KB
  • references/meihua_notes.md808 B
  • requirements.txt18 B
  • scripts/core/bazi.py8.0 KB
  • scripts/core/calendar.py887 B
  • scripts/core/hehun.py25.2 KB
  • scripts/core/jinkoujue.py9.6 KB
  • scripts/core/liuren.py18.1 KB
  • scripts/core/liuyao.py10.9 KB
  • scripts/core/meihua.py4.8 KB
  • scripts/core/qimen.py8.0 KB
  • scripts/core/utils.py7.2 KB
  • scripts/core/ziwei.py9.1 KB
  • scripts/steward.py14.3 KB
  • tests/test_bazi_golden.py4.0 KB
  • tests/test_full_regression.py4.1 KB
  • tests/test_hehun.py6.3 KB
  • tests/test_jinkoujue_golden.py17.9 KB
  • tests/test_liuren_golden.py38.2 KB
  • tests/test_liuyao_golden.py3.0 KB
  • tests/test_meihua_regression.py3.8 KB
  • tests/test_qimen_golden.py10.8 KB
  • tests/test_ziwei_golden.py9.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

玄学管家(Metaphysics Steward)

覆盖 7 种传统中式推演术数的专业排盘工具,强调天文精度与交叉验证。

能力清单(七法 + 合婚)

术数引擎文件能力
八字 Baziscripts/core/bazi.py四柱精确到节气时刻换柱;十神、藏干、纳音;大运起运(3日=1年)与十年大运
紫微斗数 Ziweiscripts/core/ziwei.py12 宫与 14 主星;年系四化;五行局;宫位渲染
大六壬 Da Liurenscripts/core/liuren.py中气定月将;四课三传九宗门全口径(贼克/比用/涉害·临位孟仲季/遥克·蒿矢先弹射/伏吟/返吟/八专/昴星);逐传六亲·遁干·空亡·天将
奇门遁甲 Qimenscripts/core/qimen.py3x3 九宫渲染:八神、九星、八门、天地盘;拆补法定局
梅花易数 Meihuascripts/core/meihua.py时间起卦与数字起卦;本卦/互卦/变卦;体用
金口诀 Jinkoujuescripts/core/jinkoujue.py人元、贵神、月将、地分四层课式
六爻 Liuyaoscripts/core/liuyao.py铜钱/数字/时间三法起卦;定卦名定宫;安世应;纳甲;配六亲;装六神;动爻变卦
八字合婚 Hehunscripts/core/hehun.py双造同排;生肖六合冲害、年命纳音、日干五合、夫妻宫六合三合冲刑、五行互补;综合评分

排盘口径

  • 八字/紫微/六爻以 真太阳时(经度 + 均时差修正)为排盘基准时刻
  • 大六壬/金口诀/奇门以 民用时间(钟表时间) 起课
  • 节气换柱、奇门拆补、六爻装卦等口径经大量实测验证(已 golden 锁定)

使用

cd scripts

# 综合(八字+梅花+奇门+紫微+六壬+金口诀+六爻 时间起卦)
python3 steward.py --birthdate "1990-02-04 10:40" --sex 1 --birthplace 116.4 --mode all

# 单法
python3 steward.py --birthdate "1990-02-04 10:40" --sex 1 --mode bazi
python3 steward.py --birthdate "1990-02-04 10:40" --mode qimen
python3 steward.py --birthdate "1990-02-04 10:40" --mode ziwei
python3 steward.py --birthdate "1990-02-04 10:40" --mode liuren

# 梅花 / 六爻(数字起卦)
python3 steward.py --mode meihua --numbers "123,456,7"
python3 steward.py --mode liuyao --birthdate "2026-09-12 12:00" --numbers "12,34,56"

# 六爻(手工指定爻值 6/7/8/9,自初爻到上爻)
python3 steward.py --mode liuyao --birthdate "2026-09-12 12:00" --yao "7,7,7,7,7,7"
# 六爻(铜钱:每爻背数 0-3,自初爻到上爻;3背=老阳动、0背=老阴动)
python3 steward.py --mode liuyao --birthdate "2026-09-12 12:00" --coin "3,1,2,1,2,1"

# 八字合婚(双造同排)
python3 steward.py --mode hehun --male "1990-02-04 10:40" --female "1991-01-01 12:00" --birthplace 116.4

# JSON 输出(供程序调用)
python3 steward.py --birthdate "1990-02-04 10:40" --mode json

参数

参数说明
--birthdateYYYY-MM-DD HH:MM,缺省用当前时间
--sex1 男/乾造,0 女/坤造
--birthplace经度或城市名(北京/上海/西安/合肥等),用于真太阳时
--modebazi/ziwei/liuren/qimen/meihua/jinkoujue/liuyao/hehun/all/json
--numbers梅花/六爻 三数起卦
--yao六爻手工指定 6 个爻值
--coin六爻铜钱 6 个背数
--difen金口诀地分
--male / --female合婚:男/女命出生时间
--male-lon / --female-lon合婚:双方出生经度/城市
--no-true-solar八字日/时柱不校正真太阳时

参考资料

  • references/liuyao_najia.md — 六爻纳甲装卦规则
  • references/liuyao_lost_items.md — 六爻寻物断法
  • references/hehun_rules.md — 八字合婚要则
  • references/meihua_notes.md — 梅花易数实现说明
  • references/LUNAR_PYTHON_REFERENCE.md — lunar-python API 笔记

依赖

  • lunar-python:公农历、干支、节气(>= 1.4)

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Report a problem with this skill