# jinchenma94/bazi-skill architecture

> Architecture diagram of the GitHub repository jinchenma94/bazi-skill, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jinchenma94/bazi-skill
- Repository: https://github.com/jinchenma94/bazi-skill

## Overview

This Claude Code skill guides a user through birth-data collection, invokes a Python charting script, and presents a traditional Bazi analysis. The charting runtime is concentrated in one script; the README documents its calendar inputs and chart outputs, while the reference files provide separate rule and text material. The skill instructions and reference contents were not sampled, so their internal routing and analysis logic cannot be confirmed.

Main entry points: [`SKILL.md`](https://github.com/jinchenma94/bazi-skill/blob/main/SKILL.md) (Comprehensive analysis), [`scripts/pai_pan.py`](https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py) (Chart CLI), [`references/wuxing-tables.md`](https://github.com/jinchenma94/bazi-skill/blob/main/references/wuxing-tables.md) (Element tables), [`references/shichen-table.md`](https://github.com/jinchenma94/bazi-skill/blob/main/references/shichen-table.md) (Hour rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_skill["Guided intake<br/>[SKILL.md]"]
  node_analysis["Comprehensive analysis<br/>[SKILL.md]"]
end

subgraph group_calculation["Chart calculation"]
  node_chart_cli["Chart CLI<br/>[pai_pan.py]"]
  node_calendar["Calendar conversion<br/>[pai_pan.py]"]
  node_pillars["Pillar calculation<br/>[pai_pan.py]"]
  node_fortune["Fortune cycles<br/>[pai_pan.py]"]
  node_chart_result["Chart results<br/>[pai_pan.py]"]
end

subgraph group_knowledge["Reference knowledge"]
  node_element_tables["Element tables<br/>[wuxing-tables.md]"]
  node_hour_rules["Hour rules<br/>[shichen-table.md]"]
  node_cycle_rules["Cycle rules<br/>[dayun-rules.md]"]
  node_omens["Omens table<br/>[shensha-table.md]"]
  node_classics["Classical texts<br/>[classical-texts.md]"]
end

node_user(("User"))

node_user -->|"provides birth data"| node_skill
node_skill -->|"invokes script"| node_chart_cli
node_chart_cli -->|"converts dates"| node_calendar
node_chart_cli -->|"calculates pillars"| node_pillars
node_chart_cli -->|"calculates cycles"| node_fortune
node_chart_cli -->|"produces chart"| node_chart_result
node_skill -->|"interprets chart"| node_analysis
node_analysis -.->|"uses rules"| node_element_tables
node_analysis -.->|"uses rules"| node_hour_rules
node_analysis -.->|"uses rules"| node_cycle_rules
node_analysis -.->|"uses rules"| node_omens
node_analysis -.->|"consults texts"| node_classics

click node_skill "https://github.com/jinchenma94/bazi-skill/blob/main/SKILL.md"
click node_chart_cli "https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py"
click node_calendar "https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py"
click node_pillars "https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py"
click node_fortune "https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py"
click node_chart_result "https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py"
click node_element_tables "https://github.com/jinchenma94/bazi-skill/blob/main/references/wuxing-tables.md"
click node_hour_rules "https://github.com/jinchenma94/bazi-skill/blob/main/references/shichen-table.md"
click node_cycle_rules "https://github.com/jinchenma94/bazi-skill/blob/main/references/dayun-rules.md"
click node_omens "https://github.com/jinchenma94/bazi-skill/blob/main/references/shensha-table.md"
click node_classics "https://github.com/jinchenma94/bazi-skill/blob/main/references/classical-texts.md"
click node_analysis "https://github.com/jinchenma94/bazi-skill/blob/main/SKILL.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skill,node_analysis,node_user toneBlue
class node_chart_cli,node_calendar,node_pillars,node_fortune,node_chart_result toneAmber
class node_element_tables,node_hour_rules,node_cycle_rules,node_omens,node_classics toneMint
```

## Components

### User interaction

- [Guided intake](https://github.com/jinchenma94/bazi-skill/blob/main/SKILL.md): `SKILL.md`
- [Comprehensive analysis](https://github.com/jinchenma94/bazi-skill/blob/main/SKILL.md): `SKILL.md`

### Chart calculation

- [Chart CLI](https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py): `scripts/pai_pan.py`
- [Calendar conversion](https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py): `scripts/pai_pan.py`
- [Pillar calculation](https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py): `scripts/pai_pan.py`
- [Fortune cycles](https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py): `scripts/pai_pan.py`
- [Chart results](https://github.com/jinchenma94/bazi-skill/blob/main/scripts/pai_pan.py): `scripts/pai_pan.py`

### Reference knowledge

- [Element tables](https://github.com/jinchenma94/bazi-skill/blob/main/references/wuxing-tables.md): `references/wuxing-tables.md`
- [Hour rules](https://github.com/jinchenma94/bazi-skill/blob/main/references/shichen-table.md): `references/shichen-table.md`
- [Cycle rules](https://github.com/jinchenma94/bazi-skill/blob/main/references/dayun-rules.md): `references/dayun-rules.md`
- [Omens table](https://github.com/jinchenma94/bazi-skill/blob/main/references/shensha-table.md): `references/shensha-table.md`
- [Classical texts](https://github.com/jinchenma94/bazi-skill/blob/main/references/classical-texts.md): `references/classical-texts.md`

### Other components

- **User**

## Connections

- User → Guided intake: provides birth data (evidence: `README.md`)
- Guided intake → Chart CLI: invokes script (evidence: `README.md`)
- Chart CLI → Calendar conversion: converts dates (evidence: `scripts/pai_pan.py`)
- Chart CLI → Pillar calculation: calculates pillars (evidence: `README.md`)
- Chart CLI → Fortune cycles: calculates cycles (evidence: `README.md`)
- Chart CLI → Chart results: produces chart (evidence: `README.md`)
- Guided intake → Comprehensive analysis: interprets chart (evidence: `README.md`)
- Comprehensive analysis → Element tables: uses rules
- Comprehensive analysis → Hour rules: uses rules
- Comprehensive analysis → Cycle rules: uses rules
- Comprehensive analysis → Omens table: uses rules
- Comprehensive analysis → Classical texts: consults texts (evidence: `README.md`)
