← 返回 Skills 市场
reed1898

BaZi Chart Calculator (八字排盘)

作者 Reed · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
273
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install bazi-chart
功能描述
Professional BaZi (八字) chart calculator and analysis tool. Calculate Four Pillars of Destiny from birth date, time, and location. Features precise solar term...
使用说明 (SKILL.md)

八字排盘 (BaZi Chart Calculator)

Professional Four Pillars of Destiny calculator with astronomical precision.

Setup

cd \x3Cskill_dir>
python3 -m venv venv && source venv/bin/activate
pip install -r scripts/requirements.txt

Only dependency: ephem (astronomy library for solar term calculation).

Usage

# Text output (default)
python scripts/bazi.py --date 1990-08-18 --time 06:00 --city 上海 --gender male

# JSON output
python scripts/bazi.py --date 1990-08-18 --time 06:00 --city 上海 --gender male --format json

# With coordinates instead of city
python scripts/bazi.py --date 1990-08-18 --time 06:00 --lat 31.23 --lon 121.47 --gender male

# Disable true solar time correction
python scripts/bazi.py --date 1990-08-18 --time 06:00 --city 上海 --gender male --no-solar-correction

# Include annual luck (流年) for specific year
python scripts/bazi.py --date 1990-08-18 --time 06:00 --city 上海 --gender male --year 2026

What It Calculates

Feature Description
Four Pillars Year, Month, Day, Hour stems and branches
Solar Terms Precise astronomical calculation for month pillar boundaries
True Solar Time Longitude + equation of time correction (critical for western China)
Hidden Stems 本气/中气/余气 for each branch
Ten Gods All stem relationships relative to Day Master
Five Elements Weighted distribution (hidden stems: 60%/30%/10%) + Day Master strength
Major Luck Forward/reverse periods based on gender + year stem polarity
Relationships 六合, 三合, 六冲, 三刑, 六害, 天干五合, 天干冲

Built-in Cities

50+ Chinese cities with latitude/longitude. Pass --city 城市名 directly.

Agent Integration

When a user provides birth info in conversation, extract date/time/city/gender and run the CLI. Format the text output as a message. For deeper analysis questions, use JSON output and interpret the data.

Module Structure

bazi/
├── scripts/bazi.py          # CLI entry point
├── lib/
│   ├── pillars.py           # Four pillar calculation
│   ├── solar_terms.py       # Solar term astronomy (ephem)
│   ├── true_solar_time.py   # True solar time correction
│   ├── hidden_stems.py      # Hidden stems table
│   ├── ten_gods.py          # Ten gods derivation
│   ├── five_elements.py     # Five elements analysis
│   ├── major_luck.py        # Major luck periods
│   ├── relationships.py     # Clash/combine/harm
│   ├── cities.py            # City coordinate lookup
│   └── constants.py         # Stems, branches, mappings
└── data/cities.json         # City database
安全使用建议
This skill appears internally consistent and runs entirely on local data/code. Before installing, consider: (1) pip will fetch ephem from PyPI—if you have strict supply-chain policies, vet that package or install in an isolated environment; (2) the code contains several algorithmic/documentation inconsistencies and potential timezone/precision quirks (e.g., comments/choices in day pillar and solar-term functions and an odd timezone adjustment in solar_terms._find_solar_term_moment) that can affect accuracy—test outputs against known references; (3) run the CLI in a sandbox (venv or container) first and review results for your test cases. If you need higher assurance, have a trusted developer review or run the tool offline after vendoring the ephem dependency.
功能分析
Type: OpenClaw Skill Name: bazi-chart Version: 1.0.0 The skill bundle is a legitimate and well-structured professional BaZi (Chinese astrology) calculator. It uses the 'ephem' library for precise astronomical solar term calculations and includes logic for true solar time correction, five elements analysis, and major luck periods. There is no evidence of data exfiltration, malicious execution, or prompt injection; the code is transparent, lacks obfuscation, and performs only the mathematical and logical operations required for its stated purpose.
能力评估
Purpose & Capability
Name/description match the included code and CLI. The code implements pillars, solar-term astronomy (ephem), true solar time correction, hidden stems, ten-gods, five-elements, major luck and relationship analysis. The only declared/used external dependency is ephem (also present in scripts/requirements.txt), and the bundled cities.json fits the stated built-in cities feature.
Instruction Scope
SKILL.md tells the agent to extract birth info and run the local CLI; the code only reads local files (data/cities.json) and performs local computation. There are no instructions to read unrelated system files, access environment secrets, or post data to external endpoints.
Install Mechanism
No packaged install spec in registry; SKILL.md recommends creating a venv and pip installing scripts/requirements.txt (ephem from PyPI). This is expected for a local astronomy calculation but does involve fetching a third-party package from PyPI (standard but has typical supply-chain risk).
Credentials
The skill requires no environment variables, credentials, or config paths. Runtime behavior is limited to local computation and reading the provided cities.json. Nothing requests unrelated secrets or system configuration.
Persistence & Privilege
Flags show always:false and normal agent invocation allowed. The skill does not attempt to modify other skills or system-wide settings; it is an ordinary, non-persistent tool.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bazi-chart
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bazi-chart 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: professional BaZi calculator with astronomical solar terms, true solar time correction, ten gods, five elements, major luck, and relationship analysis
元数据
Slug bazi-chart
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

BaZi Chart Calculator (八字排盘) 是什么?

Professional BaZi (八字) chart calculator and analysis tool. Calculate Four Pillars of Destiny from birth date, time, and location. Features precise solar term... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 273 次。

如何安装 BaZi Chart Calculator (八字排盘)?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bazi-chart」即可一键安装,无需额外配置。

BaZi Chart Calculator (八字排盘) 是免费的吗?

是的,BaZi Chart Calculator (八字排盘) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

BaZi Chart Calculator (八字排盘) 支持哪些平台?

BaZi Chart Calculator (八字排盘) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 BaZi Chart Calculator (八字排盘)?

由 Reed(@reed1898)开发并维护,当前版本 v1.0.0。

💬 留言讨论