bazi-mathematical-core

Compute BaZi Four Pillars charts using JDN-based Day Pillar calculations.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/0x-wzw/Shunshi --skill bazi-mathematical-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bazi-mathematical-core
Source: https://github.com/0x-wzw/Shunshi/tree/main/engine/skills/bazi-mathematical-core
Command: npx skills add https://github.com/0x-wzw/Shunshi --skill bazi-mathematical-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide developers with an authentic BaZi Four Pillars mathematical engine, including JDN-based Day Pillar calculation, fixed stem-branch lookups, and verified scoring, to implement reliable Chinese-astrology logic in TypeScript or Python.

Core Features & Use Cases

  • JDN-Based Day Pillar: stable day pillar computation anchored to Julian Day Numbers for accuracy.
  • Month and Hour Pillar Mapping: Wu Hu Dun and Wu Shu Dun rules to derive month and hour stems from year and day masters.
  • Hidden Stems and Ten Gods: weighted hidden stems per branch and Ten Gods relationships to support sophisticated charts.
  • Verification & Reference Data: cross-checked against known dates and historical references to ensure correctness.
  • Cross-Language Reference: clear TypeScript/Python references for implementation in codebases.

Quick Start

Run the bazi-mathematical-core engine on a sample date to derive the Day, Month, and Hour pillars and validate results against known references.

Frequently Asked Questions about bazi-mathematical-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate BaZi Four Pillars in TypeScript or Python accurately?

Calculate BaZi Four Pillars in TypeScript or Python by using a JDN-based engine to derive Day Pillars, Wu Hu Dun month stems, and Wu Shu Dun hour stems for mathematically verified chart computation.

What is the most reliable way to compute a BaZi Day Pillar from a Gregorian date?

The most reliable way to compute a BaZi Day Pillar is by anchoring the calculation to Julian Day Numbers, which ensures stable and repeatable day master derivation across different calendar systems.

How does Wu Hu Dun work for mapping BaZi month and hour stems?

Wu Hu Dun derives month stems from the year master, while Wu Shu Dun derives hour stems from the day master, applying fixed stem-branch lookups to complete the Four Pillars chart accurately.

Can I get hidden stems weighting and Ten Gods mappings from a BaZi calculation library?

Yes, a BaZi calculation library can provide weighted hidden stems per branch and Ten Gods relationship mappings to support sophisticated astrology charts and Day Master relations in your application.

Does this BaZi calculation engine support cross-date verification against historical references?

The BaZi calculation engine supports cross-date verification against known dates and historical references, ensuring correct Day Master, month, and hour pillar derivations across TypeScript and Python codebases.