CommunityResearch & Data Analysisgithub.com

AITCX08/xuanji-bazi-skills

An AI skill that provides multi-layered traditional BaZi (Four Pillars of Destiny) analysis with topic routing, designed for agent-based workflows.

What is xuanji-bazi-skills?

This skill, named `xuanji-bazi-skills`, enables AI agents to perform structured, multi-layered BaZi (Chinese Four Pillars of Destiny) analysis based on classical texts and established schema. It provides a rigorous step-by-step workflow that validates input data (calendar, time, location), builds a foundational analysis snapshot (`analysis_snapshot`), and then routes to specific topics (e.g., relationships, career) only when explicitly requested. The skill enforces a clear separation between general BaZi structure (monthly order patterns, hidden stems, success/failure, day master strength, and climate adjustments) and the final application of spirits (Shen Sha) or life events. It supports agent platforms like Claude Code, Cursor, or Codex, and relies on JSON schemas (`chart-input.schema.json` and `analysis-snapshot.schema.json`) to standardize inputs and outputs. By following its defined execution order and stop conditions, agents can produce accurate, classical-based BaZi interpretations without prematurely jumping to predictions or personality assessments.

Works with~Claude Code~Codex CLI~Cursor
npx skills add AITCX08/xuanji-bazi-skills

Installed? Explore more Research & Data Analysis skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

BaZi Foundation Analysis

Establish the foundational facts and analysis_snapshot shared by all subsequent topics. Execute strictly in order. Do not look at spirits (Shen Sha) first, and do not prematurely apply life events.

Mandatory Reading

Read completely in order:

  1. Data Verification and Input Adjudication
  2. Original Structure Adjudication
  3. Classical Text Source Map for Basic Rules
  4. Basic Output and Snapshot Contract

Use ../../schemas/chart-input.schema.json to standardize input facts, and use ../../schemas/analysis-snapshot.schema.json to validate the final snapshot.

Execution Order

  1. Verify input source, calendar, time, location, chart arrangement rules, and readability of the Four Pillars.
  2. If input is insufficient or contradictory, list the most critical missing items and stop. Do not fill in gaps arbitrarily.
  3. Once input is usable, build an adjudication chain in the order: "Monthly order pattern candidates → Hidden/stem clarity, purity/impurity, success/failure and remedies → Day master's ability to bear → Climate adjustment, disease/medicine, and useful/detrimental elements → The ten spirit pathways." Present the conclusions for strength/weakness, pattern, climate adjustment, useful/detrimental agents, and pathways separately in the basic output.
  4. Pattern is not the same as the ten spirit pathways: Only when the pattern-taking conditions (monthly order, hidden stems, etc.) are met should you use terms like "XX pattern." Other relationships of support, control, drainage, and suppression can only be listed as pathways, directional usage, or structural relationships.
  5. After deciding the useful/detrimental elements, establish a ten spirit pathway draft: Check each segment for starting point, connection, controlled object, truncation factors, and the direction of favorable/detrimental. Record as either "relationship only," "usable pathway," "partially established," or "fully established in the original chart." Do not write the first two tiers as established patterns.
  6. Record key combinations, clashes, punishments, harms, and destructions, but distinguish between "existing relationship" and "conditions for combination/transformation are met."
  7. According to the basic output contract, provide a brief review of the current Major Luck and a one-line summary for each topic.
  8. Generate an analysis_snapshot that conforms to the schema, writing any disagreements, premises pending verification, and missing data to be supplemented into unresolved.

Stop Condition

Stop immediately after completing the basic output and analysis_snapshot. Only continue into a topic-specific skill when the routing explicitly includes that topic. Do not self-expand into specialized topics such as relationships, career, wealth, family, children, education, relocation, social interaction, or health. Do not generate hard year-by-year event judgments at the foundation layer.

Related Skills