Qimen Dunjia Skill
This skill is for ordinary divination seekers, and uses the
rule set by default. The working method is:
- 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.
- Then use the script to perform fixed calculations, do not generate the chart by mental arithmetic.
- 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 , 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 .
- 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:
- 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:
- First state directly that the current skill uses by default.
- Ask the user if they accept to generate the chart according to this set of rules first.
- 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:
- What matter do you want to check? Please state it in one sentence.
- What is the corresponding time of the matter? If it is now, just say "now".
- Which city are you in? If you are not in Chinese mainland, please state the country/city directly.
- 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.
- What is the current progress of this matter?
- 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
.
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 .
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 (
):
bash
python "个人知识库/玄学/qimen-dunjia/scripts/qimen_cli.py" \
--input /tmp/qimen_input.json \
--output /tmp/qimen_output.json
Write the input JSON to
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:
| Field | Purpose |
|---|
| Confirm that the time, time zone, and matter are correctly parsed |
| Gregorian/lunar calendar comparison, current solar term |
| Heavenly stems and earthly branches of year, month, day, hour, day Xun, hour Xun (used to determine Xunshou/Xunkong) |
| Yin Dun/Yang Dun |
| Upper Yuan/Middle Yuan/Lower Yuan |
| Bureau number (1-9) |
| Xunshou (e.g. "甲子") |
| Hidden Yi of Xunshou (hidden stem of attached palace, e.g. "戊")——Must not be omitted |
| Xunkong earthly branches (e.g. ["寅","卯"]) |
| Corresponding palace numbers of Xunkong |
| Hourly stem (represents the user's current state, key reference for Yongshen selection) |
| Zhifu: nested object , read (palace position) and (star name) |
| Zhishi: nested object , read (palace position) and (door name) |
| Complete array of 9 palaces, each palace contains , , , , , , , |
| Boundary reminders, attached palace reminders, etc. |
Notes:
- In , the 5th palace (central palace) has and as , star as , and does not participate in conventional Yongshen judgment.
- The 2nd palace (Kun palace) has , this palace carries the central palace information when the central palace is attached to Kun.
- 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 , they should be clearly stated in the interpretation.
Step 5: Interpretation and Output
The official chart generation response shall follow this structure uniformly:
- Confirmed information
- Used rules and default items
- Chart summary
- Yongshen and key basis
- Core judgment
- Orientation / timing / action suggestions
- 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
- Whether the time zone is the default
- 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
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 .
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
- : Interview question bank and follow-up conditions
- : Yongshen selection order and matter mapping
- : Concise explanation of patterns and common combinations
- : 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.