Six Lines and Na Jia: Chart Casting and Divination by Constraining Agent with Skill in a Fixed Workflow for Hexagram Casting and Reasoning

Introduction

In clients supporting Skills, such as Cursor and Claude Code, the common approach to having a conversational assistant handle Liu Yao (Six Lines) divination chart casting is to manually write a long prompt every time or rely on the model’s improvisation. The latter often leads to skipped steps, inconsistent criteria, and difficulty in ensuring the completeness of steps like Na Jia (trigram assignment) and the selection of the “Yong Shen” (Function God/Significant Line). This article introduces the SkillHub community skill “Liu Yao Na Jia Pai Pan Duan Gua” (@user_f40fa15b/liuyaoduangua): It utilizes a SKILL.md file to hardcode role boundaries, a ten-step workflow, and a rule base, instructing the Agent to perform chart casting and logical reasoning following the orthodox systems of Bu Shi Zhen Zong and Zeng Shan Bu Yi, while unifying the output format.

What is This

“Liu Yao Na Jia Pai Pan Duan Gua” is a community-sourced (community) Skill categorized under lifestyle services, located at @user_f40fa15b/liuyaoduangua. The current version is 1.0.0, published by user_f40fa15b (displayed as “Long Long Zi Wei Xing Jun” on the SkillHub page). The package uses the universal SKILL.md format and does not require an API Key (requires_api_key=false).

The Skill positions the assistant as a “Reasoning Robot strictly following established Liu Yao Na Jia rules”: it performs chart casting and reasoning strictly within the rules, prohibiting subjective improvisation without basis. It also declares that the output is solely for research and entertainment purposes regarding traditional Chinese culture and does not constitute a basis for investment, medical, or life decision-making.

Core Features

The following capabilities are derived from the installed SKILL.md and are read and executed by the Agent upon installation.

Input Validation & Iron Rules

  1. Reasoning must be entirely based on the Liu Yao rules provided within the Skill; citing external schools or rhymes is prohibited.
  2. Promotion of feudal superstition, destiny changing, or luck-turning statements is prohibited; guiding users towards paid rituals or shopping is prohibited.
  3. Steps must be executed in a fixed sequence, and each reasoning step must cite the specific rule basis.
  4. If user information is incomplete, the system must prompt for supplementation; it must not fabricate casting data or Gan-Zhi (Heavenly Stems and Earthly Branches).
  5. Conclusions on auspiciousness or misfortune must be accompanied by rule logic to avoid fear-mongering or absolute declarations.

Standardized Ten-Step Workflow

The Skill requires execution in the following order: Validate Input → Convert Testing Time to Lunar Gan-Zhi (Month Branch, Day Branch) → Cast Hexagram to obtain Primary/Changed Hexagram → Na Jia Chart Casting → Determine Hexagram Palace, Shi-Ying (Occupied/Response lines), and Six Relations → Arrange Six Gods based on Day Branch → Determine Function God (Yong Shen) based on the subject → Judge Prosperity/Decline → Auspiciousness Reasoning → Output using a fixed template.

Casting Methods

  • Method A (Copper Coins): The user provides 6 coin toss results (from bottom Line 1 to top Line 6); Old Yin and Old Yang are moving lines, and the changed hexagram is determined according to rules.
  • Method B (Time): The upper and lower trigrams and moving lines are determined by the remainders of the Year Branch number, Lunar Month/Day, and Hour number. Trigram numbers correspond to Qian 1 to Kun 8.

Rule Base & Output

The Skill embeds rules for Gan-Zhi Five Elements, Na Jia Casting (Jing Fang’s Eight Palaces), Shi-Ying, Six Gods, Function God selection, and Prosperity/Decline analysis as the sole basis for reasoning. The final output must follow fixed chapters: Basic Information, Complete Chart Table, Core Annotations, Prosperity/Decline and Reasoning Analysis, Reference Conclusion, and Important Disclaimer.

Installation & Activation

Install SkillHub CLI (If not installed)

First, check if the CLI exists:

command -v skillhub && skillhub --version

If not installed, follow the complete installation instructions in the official SkillHub documentation:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

See instructions at: https://skillhub.cn/install/skillhub.md

Install this Skill

During installation, you must use --dir to point to the current Agent’s skills directory; otherwise, it defaults to ./skills/ and may not be recognized.

skillhub install liuyaoduangua --namespace user_f40fa15b --dir ~/.cursor/skills/

Common paths: ~/.cursor/skills/ for Cursor; ~/.claude/skills/ for Claude Code; ~/.codex/skills/ or project-level .agents/skills/ for Codex. The path depends on your client. See Section 4 of the installation documentation above for the full list.

Alternatively, send the following prompt to an AI that supports Skills to complete the installation according to the documentation:

Please install `@user_f40fa15b/liuyaoduangua` based on https://skillhub.cn/install/skillhub.md.

After installation, generally restart or reload the Agent to activate the new Skill (depending on client behavior).

Typical Usage

After enabling the skill, state the subject of the inquiry in the conversation and provide the required information demanded by the Skill (Time of inquiry, Casting method, and corresponding data). The example ideas below are provided; specific fields are subject to validation by the Agent based on SKILL.md.

Time Casting Example (Requires Gregorian or Lunar time + Subject):

Please use Liu Yao time casting to generate a chart for me.
Subject: Whether a job change is suitable.
Time: October 20, 2026, 14:30 (Gregorian), Beijing Time.

Copper Coin Casting Example (Requires 6 coin toss results):

Copper coin casting, subject is whether the project can be delivered on schedule.
Time: 29th day of the 8th Lunar Month, 2026, Wei Hour (1-3 PM).
Six results (from bottom Line 1 to top Line 6): Young Yang, Old Yang, Young Yin, Young Yang, Old Yin, Young Yang.

Through the above steps, the Agent should sequentially provide the Four Pillars, Primary and Changed Hexagrams, the Na Jia Chart Table, and the analysis of Function God and Shi-Ying. It should provide a reference conclusion with rule basis in the “Final Reference Conclusion” section, rather than an absolute prediction.

Use Cases & Notes

Who is it for

  • Learners who need to practice Liu Yao chart casting or verify Na Jia steps within AI conversations.
  • Teams or individuals seeking unified output structures (Chart Table + Prosperity Analysis + Disclaimer) to reduce model improvisation.

Limitations & Notes

  • The Skill explicitly prohibits treating results as a basis for investment, medical, legal, or life decisions; users must manage the boundaries themselves.
  • When information is incomplete, the Skill requires stopping to ask for more details; do not expect the Agent to auto-complete casting data.
  • SkillHub page statistics (as of data capture): Score 100000, ~1920 downloads, ~19 installs; it is a community skill, and maintenance pace depends on the publisher.
  • Relies solely on SKILL.md, with no additional scripts or external APIs; complex calendar conversions depend on the model’s execution quality. Manual review of Gan-Zhi and Hexagrams is recommended for critical occasions.

Conclusion

“Liu Yao Na Jia Pai Pan Duan Gua” transforms Liu Yao casting from “rewriting prompts every time” into a reusable Skill: workflow, rule base, and output template are installed once and called multiple times, requiring no API Key. To try it in a local Agent, view metadata from the SkillHub page or API entry:

  • SkillHub: https://www.skillhub.cn/skills/user_f40fa15b/liuyaoduangua
  • API Metadata: https://api.skillhub.cn/user_f40fa15b/liuyaoduangua
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye