cantian-bazi

Calculate Bazi charts and Chinese calendar data from solar or lunar dates.

1|1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/polaris-dxz/xclaw --skill cantian-bazi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cantian-bazi
Source: https://github.com/polaris-dxz/xclaw/tree/main/apps/desktop/openclaw-runtime/config/skills/cantian-bazi
Command: npx skills add https://github.com/polaris-dxz/xclaw --skill cantian-bazi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cantian-tymext, and includes scripts (resource) components.

What problem does it solve?

Bazi & Chinese calendar calculations from solar and lunar dates, enabling users to derive Four Pillars and relevant date information with a single, consistent workflow.

Core Features & Use Cases

  • Build Bazi charts from solar (Gregorian) birth times to generate Four Pillars.
  • Build Bazi charts from lunar birth times to generate Four Pillars.
  • Retrieve Chinese calendar data for a specific date, including lunar date and stems/branches.
  • Quick-start suggests a simple command to generate a Bazi chart from a solar timestamp.

Quick Start

Run node scripts/buildBaziFromSolar.ts "1990-05-15T14:30:00" to generate a Bazi chart from a solar birth datetime.

Frequently Asked Questions about cantian-bazi

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

FAQPage Schema
How do I calculate a Bazi chart from a solar birth date?

To calculate a Bazi chart from a solar date, you provide a Gregorian timestamp like "1990-05-15T14:30:00" to the build script. The Skill generates the Four Pillars birth chart using strict input validation for time, date, gender, and sect, outputting formatted Markdown results.

Can I convert lunar birth dates into Four Pillars Bazi charts?

Yes, you can generate Four Pillars Bazi charts directly from lunar birth times. The Skill handles lunar-to-Bazi conversions alongside solar-to-Bazi calculations, ensuring accurate chart generation for practitioners using the traditional Chinese calendar format.

Does this Skill provide Chinese calendar and huangli almanac data for specific dates?

Yes, the Skill retrieves Chinese calendar data for specific dates, including the corresponding lunar date and stems/branches. It also provides almanac-style auspicious-avoidance information, making it suitable for astrologers and researchers needing huangli data.

What is the best way to get Chinese calendar stems and branches for date conversion?

The best way to get stems and branches is using the Skill's date conversion feature, which processes solar or lunar dates. It calculates the exact Chinese calendar data and stems/branches for any given day, outputting the results in a Markdown format.

Do I need Node.js to run the Bazi calculation scripts?

Yes, you need a Node.js environment to run the TypeScript-based scripts for Bazi generation and calendar conversion. The Skill relies on Node-based scripts and the cantian-tymext dependency to execute its Chinese calendar and Four Pillars calculations.

Are there limitations when entering time and gender for Bazi chart generation?

The Skill enforces strict input validation for time, date, gender, and sect during Bazi chart generation. You must provide accurately formatted solar or lunar timestamps and specify valid parameters, or the script will reject the input to prevent calculation errors.