生辰八字
mystilink-bazi
解压后放入宿主的 skills 目录即可。
Mystilink BaZi (chart + read)
Combines calculator and analyzer: produce a chart from birth data, then interpret using Mystilink Wiki—do not invent classic quotations.
When to use
- User wants BaZi / Four Pillars charting or reading
- Birth civil date (and preferably time, place, gender for luck cycles) is available or can be collected
When not to use
- Question is only Zi Wei, tarot, Liu Yao, or western astrology → use the matching skill or
mystilink-router - User only wants calendar conversion with no BaZi framing
Locale
Wiki calls: locale or lang query. Omit → en. Untranslated pages fall back to zh-Hans (usedLocaleFallback).
Workflow
1. Collect profile (JSON)
{
"name": "string",
"gender": "male|female",
"birth_date": "YYYY-MM-DD",
"birth_time": "HH:MM",
"birth_place": "string",
"birth_place_latitude": 0,
"birth_place_longitude": 0,
"birth_place_timezone": "Asia/Shanghai"
}
2. Chart (scripts)
From this skill directory:
python3 scripts/bazi_calculate.py --date YYYY-MM-DD --hour H [--minute M] [--timezone IANA] [--longitude E]
python3 scripts/bazi_dayun_calculate.py --date YYYY-MM-DD --gender male|female [--count 8]
python3 scripts/bazi_liunian_calculate.py --year YYYY [--day-stem 甲] [--pillars-json '...']
Stdout is JSON (product-aligned rules). On failure, non-zero exit.
3. Analyze
- Identify day master (day stem) and ten-gods structure from chart JSON
- Pull theory via Wiki API (prefer English unless user locale known):
GET /api/v1/search?q=day+master&system=bazi&locale=en
GET /api/v1/pages/bazi.concept.ri-zhu?locale=en
GET /api/v1/pages/bazi.concept.shishen?locale=en
- Read
references/overview.mdand other files underreferences/only as needed - Answer the user’s question; separate chart facts from interpretation
- Keep Wiki
provenance/ cite Mystilink Wiki when using knowledge pages
4. Output shape
- Chart summary (four pillars, day master)
- Luck / annual notes if computed
- Interpretation tied to the question
- Optional Wiki page ids used
Scripts note
Python CLIs are copied from Mystilink product BaZi calculators for standalone skill install. They are the operational reference for chart math in this skill.