SuperAPI AI Directory

fortune-liuyao

General & other

View repository

Updated 10-16 06:52

About this skill

Fortune Liuyao

Execute only the following main workflow:

Understand the question and semantic routing -> choose the divination method -> run the unified entry point -> complete interpretation -> audit facts and generate the final HTML -> generate a standard share image according to host capabilities

Deterministic scripts handle divination, calendrics, chart casting, rule facts, and presentation files; the current Agent handles understanding the question, choosing the domain, invoking host interactive controls, and, based on the returned prompt , completing traditional comprehensive judgment. Lock down chart facts; do not restrict auspiciousness, timing, and traditional inferences that cannot be deterministically verified.

1. Understand the question and choose the domain

Read completely domain-routing.md, and according to the semantics of the user's original question choose one of the following domains, passing it to the unified entry point's --category:

general、career、wealth、relationship、academic、travel、home、legal_risk、relationship_family

Do not use a keyword list as a substitute for semantic understanding. The domain only determines which set of analysis methods to load and is not part of the deterministic chart facts.

  • Can identify the core matter and the result the user wants judged: continue directly, without asking about information that can reasonably be left blank.
  • The question contains multiple independent matters that require different main lines of judgment: ask the user only which one they most want judged this time.
  • Cannot identify the matter asked about, the object of judgment, or the target result: pause divination and ask only one most necessary clarifying question.
  • The question is clear but the domain boundary is unclear: use general, and do not ask follow-up questions for classification.

Question clarity, sensitive-routing clearance, domain routing, script status, and validation passing are all internal processes; do not show them to the user on success. Before chart casting, do not send preambles such as "I will use this Skill," "the question has been classified into a certain domain," or "now starting execution"; directly execute the required tools. The first user-facing success message begins with the hexagram chart and interpretation.

Gender or relationship perspective

Chart casting and domains such as career, wealth, education, travel, residence, and disputes do not require gender. For family or proxy divination questions, first understand the actual relationship between the asker and the person being asked about.

Only when the question belongs to romance or marriage, the user has not stated a perspective, and you are about to adopt the traditional opposite-sex marriage usage of "men ask about wife-wealth, women ask about officer-ghost," ask one skippable question about male, female, or not taking by gender. Pass in respectively --perspective male、female or unspecified. For same-sex relationships, non-binary identities, or when the user is unwilling to provide this, use unspecified, and analyze by combining relationship roles with the self and other lines.

Fetal sex, maternal and infant safety, and pregnancy outcomes are not clarifyable fields; handle them according to safety boundaries.

2. Choose and complete divination

First judge according to safety-boundaries.md ; the unified entry point will also perform deterministic routing. When blocked, do not cast a chart; kindly redirect to real-world help such as seeking medical care, calling the police, helplines, or professional consultation.

When the user has not yet specified a divination method, immediately use the host Agent's single-choice control to provide:

  1. Automatic divination
  2. Line-by-line pop-up
  3. Enter coins or line values

When the host does not support choice controls, send only one short text option. After the user selects, execute immediately and do not add "whether to begin." Do not create a separate webpage or local service to simulate a pop-up.

After the user selects "Enter coins or line values," you must first proactively display this counting explanation, then wait for input:

The system does not automatically determine heads or tails based on the coin design. By default, this Skill records the side with the denomination number/text as "heads" and the side with the national emblem, flowers, or other patterns as "tails"; this remains unchanged for all six tosses. Heads counts as 3, tails counts as 2, and the three coins are summed: 6 = old yin (moving), 7 = young yang, 8 = young yin, 9 = old yang (moving). Toss six times in a row; the first toss is the first line, and the sixth toss is the top line. Please report the six results in order, for example:正反反 / 正正反 / ……, and note:正=字/面额面,反=国徽/花卉面; you may also directly send the six line values.

If the user has already directly provided six rounds of coins or six line values, do not repeat the instructions and continue directly based on their input; if the user has stated a different heads/tails convention, do not silently rewrite it, and require the user to confirm the final six line values.

Line-by-line popup state machine

The first popup displays "Generate the first line". After the user clicks, run:

python scripts/cast_one_line.py --position 1

Save the result, and immediately in the next popup display the generated first line and "Generate the second line". In sequence, --position increase to 6.

  • Between two popups, do not send explanations, routing, analysis, or stage summaries.
  • Each position is run only once; save and reuse the generated result, and reshaking is prohibited.
  • After the sixth line is completed, do not ask for confirmation again; directly pass the six values from the first line to the top line to --method lines。
  • Each time the host submits, the Agent must be restored; brief delays are allowed, but immediately after restoration, call the next popup.
  • When the host does not support selection controls, do not simulate six rounds of text confirmation; instead, have the user input six rounds of coins or six line values at once.

Coin conversion and order complete reading manual-coin-casting.md。

3. Run the unique generation entry point

First, probe in the background the Python commands available in the current host: on Windows, try in order python、py -3, then check common Codex built-in runtimes $env:USERPROFILE\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe; on macOS/Linux, try in order python3、python. Use the first command that can return Python 3.10+ to continue, and replace all python in subsequent examples with that command; do not show the user the successful environment probing process.

If all commands do not exist, stop the chart casting and only prompt: "The current Agent environment lacks Python 3.10+ required to run the chart casting engine. Please install Python and retry, or switch to an Agent with a built-in Python runtime environment." Do not let the model temporarily calculate the chart mentally.

Then use the already detected command to run a self-check once, for example:

python scripts/run_liuyao.py --selfcheck

Continue only if it returns READY . When it returns NOT_READY , only explain the missing runtime conditions; do not generate half a chart, and do not let the Agent temporarily recalculate the calendar or Najia.lunar_python is already built into the Skill; do not require the user to execute pip install; if the self-check still reports that the built-in dependency is missing, the installation package is incomplete and the Skill should be reinstalled.

Automatic hexagram generation example:

python scripts/run_liuyao.py `
  --question "未来三个月能否找到合适工作" `
  --category career `
  --method auto `
  --output session.json

For line-by-line or known line values, use:

python scripts/run_liuyao.py --question "用户原问题" --category general --method lines --lines "7,8,8,6,7,8" --output session.json

When the user provides six rounds of coins, use --method coins --coins "正反反/正正反/反反反/正反反/正正正/正正反"。

The unified entry point returns at once:

  • result: deterministic chart, rule facts, question context, and hexagram generation audit;
  • prompt: the complete interpretation context that the current Agent should use directly;
  • artifacts.html and artifacts.markdown: display file paths generated synchronously from the same result;
  • schemaVersion: output contract version.

JSON and Markdown are internal contracts between the script and the Agent for saving, review, and factual auditing. Do not paste or attach to the user session.json, raw JSON,prompt or Markdown file; the end user reads the complete interpretation directly in the current conversation, and the HTML serves only as an optional hexagram chart attachment. Deliver JSON only when the user explicitly requests exporting the raw divination data.

Do not call them in sequence anymore build_chart.py、build_model_packet.py and render_chart.py to assemble the default workflow. They serve only as internal components and diagnostic tools.

4. Complete interpretation

The final chat reply is the primary and complete user deliverable. Regardless of whether the HTML can be delivered or opened, the complete text interpretation must be given directly in the current conversation:

  • The artifacts.html generated at this point by the unified entry point is a temporary hexagram chart whose interpretation is pending merge; do not immediately deliver it as the final attachment.
  • Do not deliver artifacts.markdownto the user; Markdown is only for internal rendering, review, and factual auditing.
  • The user must not be made to open Markdown, JSON, or the raw prompt to view the interpretation.
  • The complete text interpretation must not be designed as a failure fallback for HTML; it is a required output in all successful divinations.

Read in full interpretation-modes.md, directly use the returned prompt to complete the comprehensive interpretation in the current conversation. Do not send prompt to another model, and do not ask the user to provide a model API key. The final reply must not give only the "interpretation core", a one-sentence summary, a few compressed conclusions, or ask the user to open an attachment to view the full text, unless the user explicitly requests a brief version.

Silent check before sending: it has directly answered what was asked, explained how the useful god, self and other, month and day, and key moving and changing lines support the conclusion, and covered other structures that would materially change the judgment; if the user asked about a time frame, the time trend has been answered; practical advice has been given, and it closes with a brief "Summary and Action"; content that cannot be deterministically verified remains as traditional inference. Complete the check only internally, and do not show the user checklists, routing, safety triage, script status, or audit results.

Traditional health, fortune and misfortune, timing, and image-taking may be expressed as traditional inference, but must not be disguised as deterministic chart fields, medical diagnoses, or real-world professional advice.

5. Audit and generate the complete HTML

After saving the complete interpretation as Markdown or text, run the final report entry point. It will first audit the explicit chart facts; only if the audit passes will the same complete interpretation be merged into the hexagram chart HTML:

python scripts/render_final_report.py --session session.json --report report.md --output fortune-liuyao-report.html --audit-output fact-audit.json

Exit code 2 , correct the corresponding facts according to the audit checklist and run again; do not delete or compress traditional judgments that cannot be deterministically verified. After success, send the complete interpretation directly in the chat; when the host supports file delivery, also attach the fortune-liuyao-report.htmlcontaining the hexagram chart and the complete interpretation. Do not deliver the temporary hexagram chart HTML generated by the unified entry point. When the HTML cannot be delivered or opened, omit only the attachment, and the complete report in the chat remains unchanged. When validation passes, remain silent and do not show the user accepted=true or the internal checklist.

6. Generate the standard share image

When the host provides image generation capability, by default also generate a saveable, forwardable 1080 × 1440 PNG after a successful divination; when there is no image model but browser or HTML screenshot capability is provided, preferentially render the PNG from the same deterministic HTML. When neither capability exists, quietly omit the image and deliver only the HTML and the complete interpretation in the chat, and do not fake having generated an image. When the user explicitly requests a "divination image", "share image", or "Xiaohongshu vertical image", read in full share-card-contract.md, and use standard-share-card.png as the visual anchor.

The share image is only from the same result Extract the question, time, heavenly stems and earthly branches, solar terms, hexagram name, six lines, six spirits, shi and ying, changing lines and transformations, and shensha; do not fill in chart fields based on visual templates. After generation, compare item by item against result Check the original hexagram, changed hexagram, order of the six lines, shi and ying, and moving lines. If errors in text, line images, or markers are found, regenerate; do not overwrite and correct characters on the bitmap. The share image is for saving and dissemination, does not replace the complete HTML or chat interpretation, and must not be automatically published to social platforms.

7. Follow-up questions on the same hexagram

When the user continues to ask about the same matter in the current conversation, read in full follow-up-dialogue.md. By default, continue to use the most recent successful chart casting and the original month and day at the time of divination, line values, shi and ying, the main line of the useful god, and the first conclusion; do not cast a new hexagram, do not ask again about the divination method, and do not recalculate the original chart because the current date has changed. Subsequent answers should directly address the new question, concluding with the relevant original chart basis and practical actions; do not mechanically repeat the full report, and do not automatically redo the HTML or share image. Only when the matter, object, goal, or time range changes substantially, or the user explicitly insists on raising a new question, should a new divination process begin.

Finally append verbatim:

This content is generated based on a metaphysical system and is for cultural interest and thinking reference only; it does not constitute professional advice for any major life decision.

Read as needed