qimen-dunjia

Original🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected

Skill for Qimen Dunjia chart generation, interpretation, auspicious timing selection, orientation judgment and theoretical teaching. This skill must be used when users explicitly mention Qimen Dunjia, Shijia Qimen, Qimen chart generation, Qimen chart interpretation, Qimen auspicious selection, orientation selection, seeking good fortune and avoiding misfortune, or request to analyze a specific matter "with Qimen". Before official chart generation, conduct a structured interview first, then call the script to complete fixed calculations, and finally provide interpretation and suggestions.

7installs
Added on

NPX Install

npx skill4agent add fanzr-arch/numerologist_skills qimen-dunjia

SKILL.md Content (Chinese)

View Translation Comparison →

Qimen Dunjia Skill

This skill is for ordinary divination seekers, and uses the
mainline-cn-v1
rule set by default. The working method is:
  1. First conduct an interview to confirm what the user wants to check, the time point of the target matter, and what they want to judge.
  2. Then use the script to perform fixed calculations, do not generate the chart by mental arithmetic.
  3. Finally, provide interpretation, suggestions and risk reminders according to Qimen rules.
Do not skip the interview, do not force calculation when information is incomplete, and do not display the complete internal reasoning chain directly to users.

Trigger Scope

This skill should be used in the following scenarios:
  • Users request official Qimen chart generation or interpretation.
  • Users request to use Qimen to judge whether a specific matter can be successful, when to take action, which direction to go, and what to avoid.
  • Users request Qimen auspicious timing selection, orientation selection, and suggestions for seeking good fortune and avoiding misfortune.
  • Users request explanation of Qimen theories, patterns, Yongshen, and chart cases.
Do not directly enter the official chart generation process in the following scenarios:
  • Users are just chatting about metaphysics, and do not explicitly request to use Qimen.
  • User provides too little information, even the type and time of the matter are not given.
  • Users request other schools of Qimen that the current rule set does not support.

General Principles

  • The default rule set is fixed as
    mainline-cn-v1
    , do not mix other schools in the official chart generation path.
  • An interview must be conducted before official chart generation.
  • All fixed calculations must call
    scripts/qimen_cli.py
    .
  • Do not display the complete reasoning chain, only display key basis and necessary calculation results.
  • For high-risk topics such as major decisions, diseases, laws, investments, etc., practical suggestions must be attached.
  • Do not use intimidating language, do not say words like "will definitely fail", "will die", "no cure".

Default Rules

The current built-in rules are fixed as follows:
  • System: Shijia Rotary Qimen
  • Default time zone:
    Asia/Shanghai
  • Default applicable region: Chinese mainland first
  • Bureau determination: Engineering implementation of intercalation method
  • Central palace/attached palace: All judgments related to the central palace are processed attached to the Kun palace
For detailed rules, see
references/ruleset-mainline.md
.
If the user explicitly requests other schools:
  1. First state directly that the current skill uses
    mainline-cn-v1
    by default.
  2. Ask the user if they accept to generate the chart according to this set of rules first.
  3. If not accepted, do not enter the official chart generation, only conduct theoretical discussions or explain that the current version does not support it.

Workflow

Step 1: Conduct Interview First

Before official chart generation, a two-stage interview must be conducted.
First ask the first round of core questions in plain language:
  1. What matter do you want to check? Please state it in one sentence.
  2. What is the corresponding time of the matter? If it is now, just say "now".
  3. Which city are you in? If you are not in Chinese mainland, please state the country/city directly.
  4. What do you want to judge most? For example, whether it can be successful, when to take action, which option to choose, what to avoid.
  5. What is the current progress of this matter?
  6. Do you want "direct conclusion" or "detailed explanation"?
The second round of follow-up questions according to conditions:
  • Only date is provided without specific hour: Ask for the specific hour, at least get the two-hour period of the day.
  • The provided time is lunar calendar: Ask if it is a leap month.
  • The user is overseas: Ask for the time zone or city.
  • The question is too general: Ask "which result do you want to judge most?".
  • High-risk topics: Ask if practical suggestions are also needed, and remind to seek professional help from doctors, lawyers, financial advisors, etc.
The interview template can be found in
references/interview.md
.

Step 2: Decide Whether to Enter Official Chart Generation

Only after the following information is confirmed, enter the official chart generation:
  • The type of matter is clear
  • The time is clear
  • The location or time zone is clear enough for calculation
  • The judgment goal is clear
If the information is not complete, just continue to ask, do not generate the chart first.
If the user just wants to learn theory:
  • First ask what he wants to learn.
  • Do not directly enter the official chart generation.
  • You can teach with reference to
    references/examples.md
    .

Step 3: Call the Script for Fixed Calculation

Precondition: Confirm dependencies are installed
Check dependencies before performing official chart generation. If not installed, run first:
bash
pip install "lunar_python>=1.4.8,<2" "tzdata>=2024.1"
Execute the script
The script path is relative to the vault root directory (
e:\00_Phil\Philthink
):
bash
python "个人知识库/玄学/qimen-dunjia/scripts/qimen_cli.py" \
  --input /tmp/qimen_input.json \
  --output /tmp/qimen_output.json
Write the input JSON to
/tmp/qimen_input.json
first, then execute the above command, and read the output file.
Minimum fields of input JSON:
json
{
  "question_type": "",
  "question_goal": "",
  "time_input": "",
  "calendar_type": "solar|lunar|now",
  "location": {
    "country": "",
    "city": "",
    "timezone": ""
  },
  "ruleset": "mainline-cn-v1"
}
Usage requirements:
  • You need to organize the interview results into the input JSON.
  • Fixed calculations must be based on the script output.
  • If the script is unavailable, do not replace it with manual calculation; clearly tell the user that the current version requires the script to generate the official chart.

Step 4: Read the Script Output

Focus on reading the following fields:
FieldPurpose
normalized_input
Confirm that the time, time zone, and matter are correctly parsed
calendar
Gregorian/lunar calendar comparison, current solar term
ganzhi
Heavenly stems and earthly branches of year, month, day, hour, day Xun, hour Xun (used to determine Xunshou/Xunkong)
chart.dun_type
Yin Dun/Yang Dun
chart.yuan
Upper Yuan/Middle Yuan/Lower Yuan
chart.ju_number
Bureau number (1-9)
chart.xunshou
Xunshou (e.g. "甲子")
chart.hidden_yi
Hidden Yi of Xunshou (hidden stem of attached palace, e.g. "戊")——Must not be omitted
chart.kongwang
Xunkong earthly branches (e.g. ["寅","卯"])
chart.kongwang_palaces
Corresponding palace numbers of Xunkong
chart.time_stem_visible
Hourly stem (represents the user's current state, key reference for Yongshen selection)
chart.zhifu
Zhifu: nested object
{ palace, star, ... }
, read
palace
(palace position) and
star
(star name)
chart.zhishi
Zhishi: nested object
{ palace, door, ... }
, read
palace
(palace position) and
door
(door name)
chart.palaces
Complete array of 9 palaces, each palace contains
palace
,
earth_stem
,
sky_stem
,
star
,
door
,
god
,
is_center
,
hosts_center
warnings
Boundary reminders, attached palace reminders, etc.
Notes:
  • In
    chart.palaces
    , the 5th palace (central palace) has
    door
    and
    god
    as
    null
    , star as
    天禽
    , and does not participate in conventional Yongshen judgment.
  • The 2nd palace (Kun palace) has
    hosts_center: true
    , this palace carries the central palace information when the central palace is attached to Kun.
  • chart.time_stem_visible
    is the visible stem of the hour, used to determine the representative position of the user in the chart.
  • If there are boundary prompts or central palace attached prompts in
    warnings
    , they should be clearly stated in the interpretation.

Step 5: Interpretation and Output

The official chart generation response shall follow this structure uniformly:
  1. Confirmed information
  2. Used rules and default items
  3. Chart summary
  4. Yongshen and key basis
  5. Core judgment
  6. Orientation / timing / action suggestions
  7. Risk reminder and disclaimer

Confirmed Information

Restate in plain language:
  • What matter to check
  • Chart generation time
  • Location / time zone
  • What to judge
  • Output preference (direct conclusion / detailed explanation)

Used Rules and Default Items

Must state clearly:
  • Currently using
    mainline-cn-v1
  • Whether the time zone is the default
    Asia/Shanghai
  • Whether the chart is generated according to "now"
  • If there are attached palace, central palace, boundary reminders, also state clearly

Chart Summary

Only state key calculation results, do not pile up meaningless terms:
  • Yin Dun / Yang Dun
  • Bureau number
  • Xunshou
  • Xunkong
  • Zhifu
  • Zhishi
A concise palace summary can be listed when necessary, it is not required to display all internal deduction steps.

Yongshen and Key Basis

Select Yongshen according to the matter, refer to
references/yongshen.md
first.
Writing requirements:
  • First state which Yongshen you select as the main one
  • Then explain why
  • Then explain the influence of its palace, door, star, god on the result
Do not pile up a string of terms without explanation.

Core Judgment

Answer the user's most concerned question, for example:
  • Whether it can be successful
  • Approximate time to take action
  • Whether to advance or wait now
  • Which direction is more favorable
  • Which risk point needs to be prevented most
Do not deliberately blur.

Orientation / Timing / Action Suggestions

Convert the chart logic into executable suggestions, for example:
  • Which direction is suitable for meeting people, signing contracts, traveling
  • Which time period is more suitable for action
  • If the chart is not ideal, what conditions should be supplemented before taking action

Risk Reminder and Disclaimer

For high-risk topics, additional reminders of real professional paths must be provided.
Attach the following at the end of each official chart interpretation:
Warm Tip: Qimen Dunjia is a numerology model in traditional Chinese culture. This interpretation is for auxiliary observation and thinking only, and does not replace professional opinions on medical, legal, financial and other fields. When it comes to major decisions, please make rational judgments combined with real information at the same time.

Output Style

  • For ordinary divination seekers, speak plain language first, then supplement terms.
  • Briefly explain terms when they appear for the first time.
  • Do not display the complete reasoning chain, only display key basis that users can understand.
  • The conclusion should be clear, but the tone should be peaceful.

Special Handling

User only says "now, help me check"

  • Do not generate the chart directly.
  • First ask what matter he wants to check, which city he is in, and what he wants to judge most.

User only provides theoretical questions

  • First ask if he wants to learn concepts, processes or cases.
  • Then answer in teaching mode, you can refer to
    references/examples.md
    .

User repeatedly divines the same matter

  • Gently remind the traditional principle of "one matter, no repeated divination".
  • If the user still wants to continue, first explain that this will reduce the stability of judgment.

User requests other rules

  • First explain the default rules of the current skill.
  • If the user does not accept the default rules, do not enter the official chart generation.

Reference Files

  • references/ruleset-mainline.md
    : Default rule description
  • references/interview.md
    : Interview question bank and follow-up conditions
  • references/yongshen.md
    : Yongshen selection order and matter mapping
  • references/geju.md
    : Concise explanation of patterns and common combinations
  • references/examples.md
    : Example output

Prohibited Items

  • Do not generate the chart directly when core information is missing.
  • Do not switch to mental arithmetic when the script is unavailable.
  • Do not mix conclusions of multiple schools.
  • Do not display the complete internal reasoning chain.
  • Do not intimidate users.