Yijing Suangua logo

Yijing Suangua

Community
liquanyu123
yijing-suangua

易经占卜大师——调用李小问 API 起卦、解卦,支持铜钱(默认)/大衍起卦,也支持用户自报卦象。两种渲染风格:图文(透传 Markdown)/ 艺术字(终端 ASCII 卦图+评级框)。用户涉及占卜、算卦、起卦、摇卦、解卦、易经、周易、六爻、卦象、问卦、求签、测一卦等意图时触发。

Overview

Publisherliquanyu123
Repositoryyijing-suangua
Skill nameyijing-suangua
Stars
39
Forks
4
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by liquanyu123 on GitHub. Read the source before you install it.

Installation

Install the Yijing Suangua AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/liquanyu123/yijing-suangua/tree/main/plugins/yijing-suangua/skills/yijing-suangua
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/liquanyu123/yijing-suangua.git /tmp/yijing-suangua
mkdir -p .claude/skills
cp -r /tmp/yijing-suangua/plugins/yijing-suangua/skills/yijing-suangua .claude/skills/yijing-suangua
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Yijing Suangua in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Yijing Suangua on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Yijing Suangua is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

易经占卜大师

帮用户调用 API 起卦、解卦,并按场景格式化输出。

================================================================================

首次使用需先在下方「配置」章节填好 API_KEY 和 RENDER_STYLE。配置完成后即可开始使用。

配置

以下两个变量需要配置。Agent 读取本节时:

  • 若值仍为 <YOUR_...> 占位符 → 说明用户未配置,一定要引导用户配置。
  • 若值已填 → 说明已配置,直接使用

配置项

  • API_KEY:<YOUR_API_KEY>

    • 必填,否则起卦会报 401 鉴权错误
    • 未配置时:引导用户获取 Key → 本 agent 有权限则写入本文件,无权限则引导用户手动编辑本文件。最终替换<YOUR_API_KEY>这个占位符
    • 获取方式(二选一):
      • 微信搜索小程序【李小问】→「我的」页面复制
      • 浏览器打开 https://wenmutang.top → 微信扫码进入小程序 →「我的」页面复制
  • RENDER_STYLE:<YOUR_RENDER_STYLE>

    • 必填,否则不知道该按照什么模式展现
    • 首次使用时:说明两种风格差异让用户确认 → 本 agent 有权限则写入本文件,无权限则引导用户手动编辑本文件。最终替换<YOUR_RENDER_STYLE>这个占位符
    • 可选值:
      • 图文(推荐)—— 看图片 + 普通文字,适合网页、小程序、App、QoderWork、悟空等
      • 艺术字 —— 看 ASCII 字符画,仅适合命令行(Claude Code、终端)

起卦前引导

用户只丢一句"帮我算一卦""测一下"这种过于空泛的请求时,先不要直接调 API——易经断事讲究"因事而占",上下文越具体卦象解读越准。先用一两句友好的话引导用户补点信息再起卦,例如:

"好的,为了让卦象更有针对性,能简单说下想问的是什么事吗?比如—— • 事项(感情 / 工作 / 财运 / 健康 / 出行 / 考试……) • 当下状况(正在发生什么、卡在哪、纠结什么选项) • 想问的具体问题(能不能成 / 该不该去 / 何时见分晓) 有其中一两点就够了,越具体越好。"

如果用户已经自己讲清楚了背景(即使只有一两句),就别再追问,直接把用户原话作为 message 发过去即可。避免问得过细让用户觉得繁琐,也避免在完全没上下文时硬起卦导致解读空泛。

API

  • 接口:POST https://wenmutang.top/api/skill/chat
  • Header:X-API-Key: {API_KEY}(取自上方「配置」章节)
  • Body:{"message": "用户的消息", "conversationId": "会话ID(可选)"}
  • 超时:后端是 agent 查询,响应时间通常 60-120 秒。调用时 不要设置 curl --max-time,Bash tool 的 timeout 设为 180000(3 分钟留余量)。若使用其他 HTTP 工具,同样确保超时 ≥ 180 秒。
  • 不要改写用户的消息

会话规则

默认不传 conversationId,开启新会话(避免多轮上下文占用 Token、积分)。

仅当用户明确说"继续"、"再算一卦"、"接着上次"等延续语时,才传入上一轮返回的 conversationId。

响应结构

API 返回 reply(Markdown 正文)+ attachments(卦象元数据)。

attachments 示例:

json
{
  "attachments": [
    { "type": "ben", "guaName": "火天大有", "guaId": "111101", "guaOrder": 14, "bianyaoOrder": [1, 5], "yaoList": [true, true, true, true, false, true] },
    { "type": "zhi", "guaName": "天风姤", "guaId": "011110", "guaOrder": 44, "yaoList": [false, true, true, true, true, false] }
  ]
}
字段说明
typeben=本卦,zhi=变卦
guaName卦名
guaId6 位二进制,从左→右 = 从下→上,1=阳 0=阴
guaOrder卦序
bianyaoOrder变爻位置(1-6,仅本卦有)
yaoList从下到上爻列表,true=阳 false=阴

输出规则

API 返回的 reply 是 agent 输出的标准 Markdown,含五个段落:卦象总览、一语中的、因事而解、行止之策、总结与评级,以及 卦图 / 断易天机图 / 评级图 三类图片 URL。

第一步:读取「配置」章节的 RENDER_STYLE 值,判断渲染风格:

  • 图文 或 <YOUR_RENDER_STYLE>(未配置,视为默认)→ 执行「分支 A」
  • 艺术字 → 执行「分支 B」

分支 A:RENDER_STYLE = 图文(默认,适配网页/小程序/手机 App/客户端/QoderWork、悟空等应用)

直接把 API 返回的 reply 原样输出,让前端自己渲染 Markdown。具体规则:

  1. 不加 ASCII 卦象大框、ASCII 评级大框、ASCII 分割线等任何字符画装饰,避免在非等宽字体环境里错位变丑。
  2. 图片保留 ![...](url) 语法:卦象图、断易天机图、评级图都保留,由前端渲染为图片。
  3. 段落结构、加粗、列表等保持 reply 原貌,不改写文字。
  4. 如果 reply 里没有分隔符,可以轻度加一些 --- 水平线分节,但不要替换为 ASCII 符号。
  5. 最后不要再附加任何由你自己生成的评级框或总结——reply 已含评级段落。

简单说:图文风格 = 把 reply 透传给用户,minimal intervention。


分支 B:RENDER_STYLE = 艺术字(适配 Claude Code / 终端 / 命令行)

用下方 ASCII 模板包装输出,步骤:

  1. 顶部:用 ASCII 绘制卦象图(根据 attachments:有 type:"zhi" 双卦并列;否则单卦居中)
  2. 中部:原样保留五段文字(卦象总览 → 一语中的 → 因事而解 → 行止之策 → 总结与评级),段落之间用分割线: ═════════════════════════════════════════════════════════════════════════════════
  3. 底部:用 ASCII 评级大框(按 reply 文末关键词"大吉/吉/平(无咎)/小凶/凶"选对应一档)
  4. 图片处理:将 reply 中的 ![...](url) 图片语法替换为可点击链接,规则如下:
    • 卦象图 → [🖼 查看卦象图](url)
    • 断易天机图 → [🖼 查看断易天机图](url)
    • 评级图直接删除(已有 ASCII 评级框,不重复展示)
    • 断易天机段落中的文字描述(如"梯上官人:棺也")保留

以下 ASCII 模板仅在 RENDER_STYLE = 艺术字 时使用,图文模式请完全忽略。

卦象 ASCII · 有变爻(双卦并列):

╔══════════════════════════════════════════════════════════════════════════════════╗
║                                                                                 ║
║                            【  乾 为 天  →  火 天 大 有  】                       ║
║                                                                                 ║
║                                 第 一 卦  变  第 十 四 卦                        ║
║                                                                                 ║
║       ┌─────────────────────────────────┐       ┌─────────────────────────────────┐
║       │                                 │       │                                 │
║       │            本  卦               │   →   │            变  卦               │
║       │                                 │       │                                 │
║       │   上爻  ████████████████████    │   阳  │   上爻  ████████████████████    │   阳
║       │                                 │       │                                 │
║       │   五爻  ████████████████████    │   阳 ●│   五爻  ████████    ████████    │   阴
║       │              阳 → 阴            │       │              ↓ 变              │
║       │                                 │       │                                 │
║       │   四爻  ████████████████████    │   阳  │   四爻  ████████████████████    │   阳
║       │                                 │       │                                 │
║       │   三爻  ████████████████████    │   阳  │   三爻  ████████████████████    │   阳
║       │                                 │       │                                 │
║       │   二爻  ████████████████████    │   阳  │   二爻  ████████████████████    │   阳
║       │                                 │       │                                 │
║       │   初爻  ████████████████████    │   阳  │   初爻  ████████████████████    │   阳
║       │                                 │       │                                 │
║       └─────────────────────────────────┘       └─────────────────────────────────┘
║                                                                                 ║
║       上卦:乾为天 ☰                上卦:离为火 ☲                              ║
║       下卦:乾为天 ☰                下卦:乾为天 ☰                              ║
║                                                                                 ║
║                                ● 阳变阴                                        ║
║                                                                                 ║
╚══════════════════════════════════════════════════════════════════════════════════╝

卦象 ASCII · 无变爻(单卦居中):

╔══════════════════════════════════════════════════════════════════════════════════╗
║                                                                                 ║
║                                  【  乾 为 天  】                                 ║
║                                                                                 ║
║                                      第 一 卦                                    ║
║                                                                                 ║
║                   ┌─────────────────────────────────┐                           ║
║                   │                                 │                           ║
║                   │              本  卦             │                           ║
║                   │                                 │                           ║
║                   │   上爻  ████████████████████    │   阳                      ║
║                   │                                 │                           ║
║                   │   五爻  ████████████████████    │   阳                      ║
║                   │                                 │                           ║
║                   │   四爻  ████████████████████    │   阳                      ║
║                   │                                 │                           ║
║                   │   三爻  ████████████████████    │   阳                      ║
║                   │                                 │                           ║
║                   │   二爻  ████████████████████    │   阳                      ║
║                   │                                 │                           ║
║                   │   初爻  ████████████████████    │   阳                      ║
║                   │                                 │                           ║
║                   └─────────────────────────────────┘                           ║
║                                                                                 ║
║                             上卦:乾为天 ☰                                      ║
║                             下卦:乾为天 ☰                                      ║
║                                                                                 ║
╚══════════════════════════════════════════════════════════════════════════════════╝

绘制要点:阳爻 ████████████████████,阴爻 ████████ ████████(中间断开);变爻在本卦对应爻后标 ●(阳变阴)或 ○(阴变阳)。

评级 ASCII · 五档(选一放在最底部,不可退化为单行):

大吉:

╔══════════════════════════════════════════════════════════════════════╗
║   ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦  ║
║                                                                      ║
║                     ┌───────────────────────┐                        ║
║                     │                       │                        ║
║           ★         │      大   吉          │         ★              ║
║                     │                       │                        ║
║                     └───────────────────────┘                        ║
║                                                                      ║
║             ═══════【  鸿 运 当 头 · 万 事 亨 通  】═══════             ║
║                                                                      ║
║   ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦ ★ ✦  ║
╚══════════════════════════════════════════════════════════════════════╝

吉:

╔══════════════════════════════════════════════════════════════════════╗
║   ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★  ║
║                                                                      ║
║                     ┌───────────────────────┐                        ║
║                     │                       │                        ║
║                     │         吉            │                        ║
║                     │                       │                        ║
║                     └───────────────────────┘                        ║
║                                                                      ║
║             ═══════【  顺 遂 安 康 · 诸 事 可 为  】═══════             ║
║                                                                      ║
║   ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★ · ★  ║
╚══════════════════════════════════════════════════════════════════════╝

平(无咎):

╔══════════════════════════════════════════════════════════════════════╗
║   ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─  ║
║                                                                      ║
║                     ┌───────────────────────┐                        ║
║                     │                       │                        ║
║                     │    平 ( 无 咎 )       │                        ║
║                     │                       │                        ║
║                     └───────────────────────┘                        ║
║                                                                      ║
║             ═══════【  持 中 守 正 · 不 进 不 退  】═══════             ║
║                                                                      ║
║   ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─ · ─  ║
╚══════════════════════════════════════════════════════════════════════╝

小凶:

╔══════════════════════════════════════════════════════════════════════╗
║   △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △  ║
║                                                                      ║
║                     ┌───────────────────────┐                        ║
║                     │                       │                        ║
║           △         │      小   凶          │         △              ║
║                     │                       │                        ║
║                     └───────────────────────┘                        ║
║                                                                      ║
║             ═══════【  小 有 阻 滞 · 宜 慎 勿 躁  】═══════             ║
║                                                                      ║
║   △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △ · △  ║
╚══════════════════════════════════════════════════════════════════════╝

凶:

╔══════════════════════════════════════════════════════════════════════╗
║   ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕  ║
║                                                                      ║
║                     ┌───────────────────────┐                        ║
║                     │                       │                        ║
║           ✕         │         凶            │         ✕              ║
║                     │                       │                        ║
║                     └───────────────────────┘                        ║
║                                                                      ║
║             ═══════【  大 凶 之 兆 · 宜 止 勿 行  】═══════             ║
║                                                                      ║
║   ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕ · ✕  ║
╚══════════════════════════════════════════════════════════════════════╝

Frequently asked questions

What does the Yijing Suangua AI skill do?

易经占卜大师——调用李小问 API 起卦、解卦,支持铜钱(默认)/大衍起卦,也支持用户自报卦象。两种渲染风格:图文(透传 Markdown)/ 艺术字(终端 ASCII 卦图+评级框)。用户涉及占卜、算卦、起卦、摇卦、解卦、易经、周易、六爻、卦象、问卦、求签、测一卦等意图时触发。

Why use Yijing Suangua on TypingMind?

Because you install it once and use it with any model. Yijing Suangua is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Yijing Suangua in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/liquanyu123/yijing-suangua/tree/main/plugins/yijing-suangua/skills/yijing-suangua. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Yijing Suangua?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Yijing Suangua?

As many as you like. As long as a model supports skills, you can use Yijing Suangua with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Yijing Suangua AI skill free?

Yes. It is published on GitHub by liquanyu123 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇