claudeers.

🔓 unclaimed — this page was auto-generated from GitHub. Are you the creator?

Claim this page →
// RAG & Knowledge

wuyun-liuqi-skills

五运六气 AI Agent 技能包 — 中医运气学说推算引擎。干支推算 + 六气步移 + RAG五层知识库(104键) + ReAct推理工作流 + 自进化引擎。支持 Claude Code/Codex CLI/Cursor/Cline/OpenClaw 等 AI 客户端。

// RAG & Knowledge[ cli ][ api ][ web ][ claude ]#claude#ragMIT$open-sourceupdated 8 days ago
Actively maintained
99/100
last commit 8 days ago
last release none
releases 0
open issues 0
// install
git clone https://github.com/dhicoc/wuyun-liuqi-skills

wuyun-liuqi-skills

WuYun-LiuQi Skills

五运六气 AI Agent 技能包

天人合一,五运六气

TCM Climate & Pathology Engine — Ganzhi calculation · Six-Qi progression · RAG knowledge base · ReAct reasoning · Self-evolving
中医运气学推算引擎 — 干支推算 · 六气步移 · 五层 RAG 知识库 · ReAct 推理 · 自进化引擎


关于 · 快速开始 · AI 引导 · 使用说明 · 架构设计 · 贡献 · 许可证

🌐 English


关于项目

如果你是 AI Agent,直接跳转到 README_AI.md,严格按照内容要求执行。

基于中医运气学说(《黄帝内经》素问七篇大论),运用天干地支推算年度气候与疾病规律的 AI Agent 技能包。架构改编自 reverse-skill

当 AI Agent 面对五运六气推算、病机分析、运气治法等任务时,本技能包提供从干支计算 → RAG 知识库检索 → ReAct 辨证推理 → 结构化报告的全链路能力。

用户输入 → routing.md → 目标子技能 → 推算引擎 + RAG 知识库 → 病机分析 → 报告 + 自进化记录

为什么需要这个项目:

  • 五运六气推算涉及大量数据表(岁运、司天、客气、客主加临等),手工查表易错
  • 经典病机分散在素问七篇大论中,临床使用时检索困难
  • 运气方剂、历代注家、地域修正等信息需要多源整合
  • 缺乏统一的 Agent 集成接口,每次推算结果无法沉淀复用

完整路由矩阵:routing.md

(返回顶部)

技术栈

wuyun-liuqi-skills
lunar-python · lunar-javascript · RAG · ReAct

(返回顶部)

快速开始

前置依赖

  • Python 3.8+ — 推荐安装 lunar-python(精确节气计算)
  • Node.js 14+ — JS 版需要安装 lunar-javascript
  • 代码 AI 客户端 — Claude Code、Codex CLI、Cursor 等

安装

git clone https://github.com/dhicoc/wuyun-liuqi-skills.git
cd wuyun-liuqi-skills

快速配置

# Windows (PowerShell/cmd)
scripts\setup.bat

# Linux/macOS
bash scripts/setup.sh

推算某年运气

# 综合报告
python scripts/yunqi_report.py 2026 --audience student

# 单项推算
python scripts/ganzhi_calc.py 2026       # 干支推算
python scripts/dayun_calc.py 2026        # 大运推算
python scripts/liuqi_calc.py 2026        # 六气推算
python scripts/kezhujialin.py 2026       # 客主加临

# JSON 输出(机器可读)
python scripts/dayun_calc.py 2026 --json

基于日期的统一推算(Agent 推荐入口)

主链路说明:本项目以 Python 推算引擎 为主链路,scripts/calculate_yunqi_api.py 是 AI Agent、RAG 检索、报告生成与回归测试的推荐入口。JavaScript 版 scripts/calculate_yunqi_api.js 提供同类 JSON 输出,定位为 可选接口 / 前端或 Node.js 集成适配层;若追求完整功能覆盖与回归稳定性,请优先使用 Python 版。

# 推荐:Python 主链路
python scripts/calculate_yunqi_api.py 2026-06-27 --json

# 可选:JavaScript / Node.js 接口
node scripts/calculate_yunqi_api.js 2026-06-27 --json

全链路验证

python scripts/demo_full_chain.py 2026-06-27
python tests/verify_expansion.py        # 67 项端到端测试

(返回顶部)

使用说明

支持场景

场景入口
干支推算scripts/ganzhi_calc.py
大运太过不及scripts/dayun_calc.py
主运客运scripts/keyun_calc.py
六气推算scripts/liuqi_calc.py
客主加临scripts/kezhujialin.py
综合报告scripts/yunqi_report.py
统一计算接口(JSON)scripts/calculate_yunqi_api.py
RAG 知识库检索rag-knowledge-base/
自进化引擎scripts/self_evolve.py
端到端验证scripts/verify_expansion.py

功能覆盖矩阵

功能层级覆盖能力主入口 / 文件状态
干支基础年干支、六十甲子序号、生肖scripts/ganzhi_calc.py✅ 已覆盖
五运推算天干化五运、大运太过/不及、平气判断scripts/dayun_calc.pyyunqi-calc/references/taiguo_buji.md✅ 已覆盖
主运客运主运五步、客运五步、太少推移scripts/keyun_calc.py✅ 已覆盖
六气推算司天、在泉、主气六步、客气六步scripts/liuqi_calc.py✅ 已覆盖
客主加临六步客主关系、相得/不相得、顺逆分析scripts/kezhujialin.py✅ 已覆盖
日期统一接口大寒定年、日干支、当前步位、RAG keys、JSON 输出scripts/calculate_yunqi_api.py✅ Python 主链路
Node.js 接口面向前端/Node 集成的 JSON 输出scripts/calculate_yunqi_api.js🟡 可选接口
病机分析五运病机、六气病机、太过不及、运气合病yunqi-pathogenesis/✅ 文档化推理
临床应用治则治法、方药方向、针灸选穴、养生调理yunqi-clinical/✅ 参考建议,含免责声明
经典文献素问七篇、历代运气学说、现代研究索引yunqi-classics/rag-knowledge-base/asset5_commentary.json✅ 已覆盖
RAG 知识库岁运、司天在泉、客主加临、运气方、注家、地域、体质rag-knowledge-base/asset*.json✅ 已覆盖
个人体质出生年运气体质倾向、九种体质量表、当前岁运调理方向、地域修正scripts/personal_yunqi_profile.pyscripts/constitution_assessment.pyadvanced-alignment/✅ 已覆盖
天气对齐实时气象 × 运气格局交叉分析,判断内外邪相合/相背/兼夹scripts/weather_alignment.pyadvanced-alignment/weather_integration.md✅ 已接入
天气 × 体质叠加出生运气体质 × 当前岁运 × 天气实况三维分析scripts/yunqi_weather_constitution.py✅ 已接入
统一高级对齐基础运气、出生运气体质、九种体质量表、天气对齐的统一入口scripts/advanced_alignment.py✅ 已接入
报告生成学生版、临床版、研究版 Markdown 报告;支持注入高级对齐章节scripts/yunqi_report.py --advanced-jsonscripts/generate_html_report.py --with-advanced-alignmentdocs-generator/✅ 已覆盖
可视化终端 ASCII 图、HTML 可视化报告scripts/visualize_yunqi.pyscripts/generate_html_report.py✅ 已覆盖
自进化使用日志、盲区检测、反馈记录、月度报告scripts/self_evolve.pyself-evolve/✅ 已覆盖
校验测试环境检查、知识库校验、端到端测试、全量回归scripts/health_check.pyscripts/validate_knowledge_base.pytests/verify_expansion.pytests/full_regression_test.py✅ 已覆盖

注:临床、方药、针灸相关内容仅作为中医运气学理论参考,不构成医学诊断或治疗建议;具体诊疗须由执业医师辨证处理。

关键文件

文件用途
SKILL.md总控入口 + 路由执行契约(AI 必读)
routing.md三轴路由矩阵
RULES.md行为规则链
agent-workflow/react_workflow.mdReAct 推理工作流规范

仓库结构

.
├── README.md                   # 本文件
├── SKILL.md                    # 总控入口
├── routing.md                  # 路由矩阵
├── RULES.md                    # 行为规则
├── CONTRIBUTING.md             # 新增子技能指南
├── LICENSE                     # MIT 许可证
│
├── scripts/                    # 推算引擎(Python 主链路 + JS 可选接口)
│   ├── calculate_yunqi_api.py  # ★ Python 主链路统一计算接口
│   ├── weather_alignment.py    # ★ 天气实况 × 运气格局高级对齐
│   ├── constitution_assessment.py # ★ 九种体质量表评估
│   ├── yunqi_weather_constitution.py # ★ 天气 × 体质三维叠加分析
│   ├── advanced_alignment.py   # ★ 高级对齐统一入口
│   ├── calculate_yunqi_api.js  # JS / Node.js 可选接口
│   ├── self_evolve.py          # ★ 自进化引擎
│   ├── verify_expansion.py     # 兼容入口 → tests/verify_expansion.py
│   └── full_regression_test.py # 兼容入口 → tests/full_regression_test.py
│
├── tests/                      # 测试脚本与夹具
├── reports/                    # 报告与可视化输出
│   ├── examples/               # 示例报告与预览图
│   ├── generated/              # 本地生成报告(默认忽略)
│   └── test-results/           # 测试输出(默认忽略)
├── rag-knowledge-base/         # ★ RAG 知识库(含 README 与 index.json)
├── .github/workflows/          # CI 工作流
├── agent-workflow/             # ★ ReAct 推理工作流
├── prompts/                    # System Prompt
├── advanced-alignment/         # 高级对齐(天气 / 体质)
├── self-evolve/                # 自进化运行时
│
├── ganzhi-basics/              # 子技能:干支基础
├── yunqi-calc/                 # 子技能:运气推算(核心)
├── yunqi-pathogenesis/         # 子技能:病机分析
├── yunqi-clinical/             # 子技能:临床应用
├── yunqi-classics/             # 子技能:经典文献
├── docs-generator/             # 子技能:报告生成
├── docs/                       # 技术文档
└── case-journal/               # 医案沉淀系统

(返回顶部)

架构设计

五层 RAG 知识库

Asset条目数用途
经典病机asset1-352岁运/司天/客主加临病机
运气方剂asset416三因司天方
历代注家asset520王冰到陆懋修 11 位医家
地域修正asset68八大气候区
运气体质asset7189 种体质 x 岁运

104 个唯一键覆盖五层,通过 rag_keys 精确匹配。

Agent 集成层

  1. 强规则计算工具calculate_yunqi_api):大寒定年 + 标准化 JSON + rag_key 生成
  2. RAG 知识库rag-knowledge-base/):5 层 key-value 结构化存储
  3. ReAct 推理工作流agent-workflow/):查工具 -> 查知识库 -> 辨证推理闭环
  4. System Promptprompts/):TCM 运气专家角色约束
  5. 高级对齐advanced-alignment/):天气 API 对齐 + 体质交叉分析
  6. 自进化回路self_evolve/):自动记录 -> 盲区检测 -> 反馈采集 -> 优化报告

ReAct 推理路径

prompts/system_prompt.md -> 加载角色约束
  |
scripts/calculate_yunqi_api.py -> 计算 + rag_keys
  |
rag-knowledge-base/ -> 五层知识检索
  |
agent-workflow/react_workflow.md -> 辨证推理
  |
输出结构化报告 + 免责声明
  |
scripts/self_evolve.py -> 自动记录

(返回顶部)

贡献

欢迎任何贡献!Fork 本仓库 -> 创建特性分支 -> 提交 PR 即可。

  1. Fork 项目
  2. git checkout -b feature/AmazingFeature
  3. git commit -m "Add some AmazingFeature"
  4. git push origin feature/AmazingFeature
  5. 提交 Pull Request

(返回顶部)

许可证

本项目采用 MIT License(详见 LICENSE)。

致谢

  • 架构设计参考 reverse-skill(zhaoxuya520)
  • 理论依据:《黄帝内经素问》七篇大论
  • AI 社区:linux.do

(返回顶部)


English Version — This README is bilingual. The Chinese documentation above is the canonical guide for AI Agents; the English section below provides a structured overview for international users and contributors.


WuYun-LiuQi AI Agent Skill Pack

WuYun-LiuQi (Five Movements and Six Qi, 运气学) is an AI Agent skill pack for rule-based TCM climate-pattern calculation, knowledge retrieval, and structured report generation. It is based on the Yunqi theory recorded in the seven major Suwen treatises of the Huangdi Neijing (Yellow Emperor's Inner Classic) and uses Heavenly Stems, Earthly Branches, solar-term boundaries, and structured RAG assets to derive annual Yunqi patterns.

The project provides an end-to-end workflow:

User input → routing.md → target skill → Python calculation engine → RAG knowledge base
→ pathogenesis reasoning → structured report → visualization → self-evolution log

Medical note: this project is for traditional TCM theory learning, research, and assisted reasoning only. It is not a medical diagnosis or treatment system. Clinical decisions must be made by qualified healthcare professionals.

Primary Runtime

The Python engine is the primary and recommended runtime:

  • scripts/calculate_yunqi_api.py is the main entry point for AI Agents, RAG lookup, report generation, visualization, and regression tests.
  • scripts/calculate_yunqi_api.js is an optional JavaScript / Node.js integration layer for frontend or Node-based applications.
  • For full feature coverage and the most stable regression path, prefer the Python entry point.

Quick Start

# Install dependencies
pip install -r requirements.txt
npm install   # optional, only required for the Node.js interface

# Recommended: Python primary workflow
python scripts/calculate_yunqi_api.py 2026-06-27 --json
python scripts/calculate_yunqi_api.py 2026-06-27 --summary
python scripts/calculate_yunqi_api.py 2026-06-27 --report-type student

# Optional: Node.js interface
node scripts/calculate_yunqi_api.js 2026-06-27 --json

# Full-chain demo and verification
python scripts/demo_full_chain.py 2026-06-27
python tests/verify_expansion.py

Feature Coverage Matrix

LayerCapabilityMain EntryStatus
Ganzhi basicsYear Stem-Branch, sexagenary index, zodiacscripts/ganzhi_calc.py✅ Covered
Five MovementsDayun, excess/deficiency, Pingqi conditionsscripts/dayun_calc.py✅ Covered
Movement stepsHost movement and guest movement progressionscripts/keyun_calc.py✅ Covered
Six QiSitian, Zaiquan, host Qi, guest Qiscripts/liuqi_calc.py✅ Covered
Kezhu-JialinGuest-host Qi relationship and favorable/unfavorable analysisscripts/kezhujialin.py✅ Covered
Unified date APIDahan year boundary, current Qi step, RAG keys, JSON outputscripts/calculate_yunqi_api.py✅ Primary Python path
Node.js APIJSON output for frontend / Node.js integrationsscripts/calculate_yunqi_api.js🟡 Optional
PathogenesisFive-movement, Six-Qi, excess/deficiency, combined Yunqi reasoningyunqi-pathogenesis/✅ Documented reasoning
Clinical referenceTreatment principles, formula direction, acupuncture references, lifestyle guidanceyunqi-clinical/✅ Reference only
ClassicsSuwen treatises, historical schools, modern research notesyunqi-classics/✅ Covered
RAG knowledge baseYunqi keys for pathogenesis, formulas, commentaries, regions, constitutionsrag-knowledge-base/asset*.json✅ Covered
Personal profileBirth-year Yunqi tendency, constitution score assessment, current-year adjustment, regional modifierscripts/personal_yunqi_profile.py, scripts/constitution_assessment.py✅ Covered
Weather alignmentReal weather × Yunqi pattern alignment for same-direction, opposite, or mixed climate signalsscripts/weather_alignment.py✅ Covered
Weather × constitutionBirth Yunqi constitution × current-year Yunqi × weather reality combined analysisscripts/yunqi_weather_constitution.py✅ Covered
Unified advanced alignmentUnified entry for base Yunqi, birth profile, constitution assessment, and weather alignmentscripts/advanced_alignment.py✅ Covered
ReportsStudent, practitioner, and researcher report styles with optional advanced-alignment sectionsscripts/yunqi_report.py --advanced-json, scripts/generate_html_report.py --with-advanced-alignment✅ Covered
VisualizationASCII chart and HTML visual reportscripts/visualize_yunqi.py, scripts/generate_html_report.py✅ Covered
Self-evolutionUsage logs, blind-spot detection, feedback, monthly reportscripts/self_evolve.py✅ Covered
ValidationEnvironment check, RAG validation, end-to-end tests, full regressionscripts/health_check.py, scripts/validate_knowledge_base.py, scripts/verify_expansion.py, scripts/full_regression_test.py✅ Covered

Core Features

  • Rule-based Yunqi calculation with Dahan (大寒) as the Yunqi year boundary
  • Standardized JSON output for LLM / Agent integration
  • Five-layer RAG knowledge base covering pathogenesis, formulas, commentaries, regional modifiers, and constitution alignment
  • Weather alignment module with Open-Meteo, optional QWeather/Seniverse providers, local cache, historical same-date baseline, and mock mode for CI
  • ReAct-style reasoning workflow for tool use, retrieval, and structured synthesis
  • Markdown and HTML report generation
  • ASCII visualization for terminal workflows
  • Self-evolution loop: usage logging, blind-spot analysis, feedback capture, and monthly reports
  • Regression and knowledge-base validation scripts

Repository Map

scripts/                 Calculation engines, primary Python API, weather alignment, optional Node.js API, reports, visualization
rag-knowledge-base/      Structured RAG assets, README, and index.json
agent-workflow/          ReAct workflow specification
prompts/                 Agent system prompts
reports/examples/        Versioned sample reports and preview images
reports/generated/       Local generated reports (ignored by Git)
reports/test-results/    Test outputs (ignored by Git)
docs/                    Architecture, feature coverage, roadmap, and technical notes
tests/                   Test fixtures and future test migration target
.github/workflows/       CI workflow
ganzhi-basics/           Stem-Branch learning skill
yunqi-calc/              Core Yunqi calculation skill
yunqi-pathogenesis/      Pathogenesis reasoning skill
yunqi-clinical/          Clinical reference and lifestyle guidance skill
yunqi-classics/          Classical literature and research references
docs-generator/          Report templates
advanced-alignment/      Weather and constitution alignment
self-evolve/             Runtime logs, feedback, reports
case-journal/            Case record templates and disclaimers

Verification

python scripts/health_check.py
python scripts/validate_knowledge_base.py
python tests/verify_expansion.py
python tests/full_regression_test.py

Tech Stack

Python · JavaScript · Node.js · lunar-python · lunar-javascript · RAG · ReAct-style agent workflow

License

MIT License. See LICENSE.


AI Community: linux.do

// compatibility

Platformscli, api, web
Operating systems
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguagePython

// faq

What is wuyun-liuqi-skills?

五运六气 AI Agent 技能包 — 中医运气学说推算引擎。干支推算 + 六气步移 + RAG五层知识库(104键) + ReAct推理工作流 + 自进化引擎。支持 Claude Code/Codex CLI/Cursor/Cline/OpenClaw 等 AI 客户端。. It is open-source on GitHub.

Is wuyun-liuqi-skills free to use?

wuyun-liuqi-skills is open-source under the MIT license, so it is free to use.

What category does wuyun-liuqi-skills belong to?

wuyun-liuqi-skills is listed under rag in the Claudeers registry of Claude-compatible tools.

0 views
29 stars
unclaimed
updated 8 days ago

// embed badge

wuyun-liuqi-skills on Claudeers
[![Claudeers](https://claudeers.com/api/badge/wuyun-liuqi-skills.svg)](https://claudeers.com/wuyun-liuqi-skills)

// retro hit counter

wuyun-liuqi-skills hit counter
[![Hits](https://claudeers.com/api/counter/wuyun-liuqi-skills.svg)](https://claudeers.com/wuyun-liuqi-skills)

// reviews

// guestbook

0/500

// related in RAG & Knowledge

🔓

✨ Light and Fast AI Assistant. Support: Web | iOS | MacOS | Android | Linux | Windows

// ragChatGPTNextWeb/TypeScript88,415MIT[ claude ]
🔓

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant contex…

// ragthedotmack/JavaScript86,462Apache-2.0[ claude ]
🔓

A light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.

// raggsd-build/JavaScript64,711MIT[ claude ]
🔓

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 60-95% fewer tokens, same answers. Library, proxy, MCP server.

// ragheadroomlabs-ai/Python56,255Apache-2.0[ claude ]
→ see how wuyun-liuqi-skills connects across the ecosystem