/chinese-metaphysics:bazi-compatibilityfrom chinese-metaphysics
Compare two people from reusable BaZi chart JSON files, two complete birth records, or one of each; write auditable interaction data and transparent general or relationship-specific scores before automatic interpretation. Use for 八字合婚, 合八字, two-person compatibility, 配不配, or whether two charts work together. Not for one-person natal work, reading an existing comparison, forecasting, or missing birth minutes.
Ships in chinese-metaphysics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Compare two validated sources, write bazi_compatibility_<name-a>_<name-b>.json plus data-only Markdown, then invoke bazi-compatibility-reading automatically.
bazi-chart.bazi-reading.bazi-compatibility-reading.Accept chart + chart, raw birth + raw birth, or chart + raw birth. Prefer reusable chart JSON when available; never recalculate a valid existing chart.
A chart source must be schema chinese-metaphysics.bazi-chart, version 1, with a valid checksum and complete primary facts and score ledgers. If it declares a boundary alternate, that alternate must also be complete.
A raw source has the same exact requirements as bazi-chart: name, unambiguous place, exact date and minute, declared Gregorian or lunar calendar, IANA zone, latitude, longitude, and an explicit leap-month flag for lunar input. Resolve ambiguous places before running. Never infer a minute, place, leap month, gender, DST fold, or historical offset. A time given only to the hour — 早上七点, 7am — is not an exact minute: ask for it rather than reading it as 07:00.
Birth data and chart artifacts are sensitive. Keep them in the user-selected output directory and do not transmit them elsewhere.
Default to a relationship-neutral general comparison. Set a context only when the user states one clearly:
romance: dating or romantic connection;marriage: spouses, marriage, or explicit 合婚;friendship: friends;family: relatives or household family dynamics;work: colleagues, founders, manager/report, or business collaboration.Do not infer romance from two names, genders, or a vague “do we match?” request. An explicit context adds a separate contextual index; it never replaces or changes the general score.
bazi-compatibility-v1 always calculates five general dimensions: element complementarity, directional day-master support, cross-chart stem/branch interactions, day-pillar core, and structural stability. Their exact weights, the contextual profiles, and every adjustment live in shared/rules/compatibility-v1.json, and each artifact echoes the weights it used under methodology.general_weights. Quote them from there; never restate them from memory.
Every dimension carries positive and negative ledger entries. Preserve ownership for directional support: “A supplies B” is not interchangeable with “B supplies A.” Swapping left and right must preserve all numeric scores while reversing directional owners.
If either chart has a day-boundary alternate, compare all primary/alternate combinations and report the range. The displayed general score remains primary-primary. Do not average alternates or choose the most favorable pairing. Shen Sha is excluded from numeric scores and remains secondary evidence.
All percentages and 0-100 indexes are versioned heuristic outputs, not probabilities or guarantees of relationship success.
From this skill directory, create the request shape shown in references/request.example.json and run:
python3 scripts/compute_compatibility.py --request REQUEST.json --out OUTPUT_DIRECTORY
Inline JSON is accepted with --json. A stated context may be in relationship_type or supplied with --relationship-type. Raw inputs require pyswisseph, declared in requirements.txt; chart + chart does not recalculate astronomy. An optional Swiss data directory may be supplied with --ephemeris-path.
The command prints canonical JSON and data-only Markdown absolute paths, in that order. Exit code 2 means no valid artifact pair was created. Do not manually complete a partial comparison.
Read the output JSON back through the gate the reading skill runs:
python3 scripts/validate_artifact.py COMPARISON.json
It checks the schema and version, the canonical checksum, both source identities and their distinct chart checksums, all five dimensions with their ledgers and weights, the general arithmetic those weights produce, a contextual score against its own profile, confidence, and the sensitivity range the displayed score has to sit inside. Exit 2 means the run produced something unreadable: report every defect it names, and do not complete a partial comparison by hand.
Then confirm the Markdown names the same checksum and contains data only.
After validation, automatically invoke bazi-compatibility-reading with the exact JSON path. Do not wait for another user message and do not invoke it after any failure. After the reading completes, report both compatibility artifact paths, the reader-report path, and the separate evidence-artifact path.
This skill calculates evidence only. It must not issue a “soulmate,” “destined,” safe/unsafe, marry/divorce, hire/fire, medical, financial, legal, or deterministic verdict.
agents/openai.yaml (opens in a new tab)references/examples.md (opens in a new tab)references/request.example.json (opens in a new tab)requirements.txt (opens in a new tab)scripts/compute_compatibility.py (opens in a new tab)scripts/validate_artifact.py (opens in a new tab)shared.json (opens in a new tab)shared/bazi/__init__.py (opens in a new tab)shared/bazi/artifacts.py (opens in a new tab)shared/bazi/calendar.py (opens in a new tab)shared/bazi/compatibility.py (opens in a new tab)shared/bazi/engine.py (opens in a new tab)shared/bazi/ephemeris.py (opens in a new tab)shared/bazi/gate.py (opens in a new tab)shared/bazi/models.py (opens in a new tab)shared/bazi/pillars.py (opens in a new tab)shared/bazi/relations.py (opens in a new tab)shared/bazi/rules.py (opens in a new tab)shared/bazi/scoring.py (opens in a new tab)shared/bazi/timekeeping.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub misoto22/skills --plugin chinese-metaphysics7 skills in this plugin
/bazi-chartCalculate one reusable BaZi chart from a named person's exact birth date, minute, and birthplace, write canonical JSON plus data-only Markdown, then start the natal reading automatically. Use for 八字排盘, 生辰八字, four pillars, or informal single-person birth details. Not for two-person compatibility, existing-chart interpretation, Da Yun, annual luck, or event forecasts./bazi-compatibility-readingInterpret a completed BaZi compatibility JSON artifact, or a pasted comparison carrying both identities, the five dimension ledgers and sensitivity variants, as a balanced, directional, evidence-linked relationship report. Use after the compatibility calculator or when asked to explain general, romance, marriage, friendship, family, or work scores already computed for two charts. Not for raw birth records, one-person readings, recalculation, predictions, or a binary destiny verdict./bazi-readingInterpret a completed single-person BaZi JSON chart or equivalent verified four-pillar data as an evidence-linked static natal report. Use when a calculator hands off its artifact or someone asks to 解读八字, 看命局, explain day-master strength, structure, or favorable elements from an existing chart. Not for raw birth details, relationship matching, luck cycles, dated predictions, or incomplete source data./bazi-ziwei-crossRead one person's finished 八字 artifact and finished 紫微 artifact against each other, recording every place the two systems agree, complement, or flatly contradict, without merging them into a single number. Use for 八字紫微综合, 双系统印证, 两盘合参, or asking whether the two systems say the same thing about one person. Not for placing either 命盘, reading one system by itself, matching two people, or forecasting./ziwei-chartPlace one twelve-palace Zi Wei Dou Shu 命盘 from someone's stated birth moment, birthplace, and gender, recording palaces, stars, 生年四化, and 大限 windows as reusable placement data. Use for 紫微斗数, 紫微排盘, 排紫微, 紫微命盘, 十二宫, or purple star astrology. Not for 八字 four pillars, matching two people, comparing two systems against each other, 流年 or monthly transformations, or a 命盘 that has already been placed./ziwei-readingInterpret an already-placed Zi Wei 命盘 artifact, or equivalent verified twelve-palace data, writing a reader report plus a separate audit artifact and, when asked, an ink-wash HTML poster. Use for 解读紫微, 看命盘, 看十二宫, or explaining the stars sitting in 命宫, the 生年四化, and what each 大限 window emphasizes. Not for unplaced birth records, 八字 four pillars, comparing two systems against each other, matching two people, 流年, or dated predictions.