跪拜 Guibai
← All articles
Backend · Java · Programmer

A 1K-Star GitHub Skill Distills a Renowned TCM Practitioner's Brain into an AI for Diagnosis

By SimonKing ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

This is a concrete, working example of domain-specific knowledge distillation at scale—2,452 pages of a single expert's output turned into a structured reasoning pipeline. It shows how the Skill pattern can encode not just facts but a decision-making methodology, which is directly applicable to any field where a practitioner's judgement can be captured from their written record.

Summary

The nihaixia project on GitHub turns the complete works of Ni Haixia—a celebrated and controversial figure in traditional Chinese medicine—into a loadable AI Skill. It digests 129 articles from the Treatise on Cold Damage, 23 chapters of the Synopsis of the Golden Chamber, 71 chapters of the Yellow Emperor's Inner Canon, 345 materia medica entries, 849 clinical cases, and over 2,400 pages of lecture notes. Once installed, the Skill gives a general-purpose LLM the ability to perform six-meridian pattern differentiation, select classical herbal formulas, reference acupuncture points, and even consult Ni's teachings on I Ching destiny analysis.

The core diagnostic engine runs on eight formulas and a seven-step reasoning model that moves from exterior/interior determination through yin/yang, cold/heat, disease transmission, and constitution assessment before selecting and modifying a formula. The project claims 100% dosage accuracy against source documents for 11 key formulas. A quick-reference system covers pulse diagnosis, tongue diagnosis, and an eight-dimensional method for distinguishing true cold from false heat.

Installation works across five mainstream methods, and the Skill loads into tools like opencode. The output mimics a clinical consultation: the AI asks follow-up questions, identifies a pattern, and proposes a classical formula with modifications. The creator is explicit that this is a literacy tool and a historical copy, not a substitute for a real physician.

Takeaways
2,452 pages of Ni Haixia's lectures, 849 medical cases, and core classical texts are distilled into a single installable AI Skill.
The Skill encodes an eight-formula, seven-step diagnostic reasoning model for six-meridian pattern differentiation.
11 formula dosages were verified one-by-one against source documents for 100% accuracy, per the project's claim.
Quick-reference tables cover 8 single and 8 compound pulse types, 5 tongue manifestations, and an eight-dimensional true-cold/false-heat identification method.
The distillation includes non-medical material: Zi Wei Dou Shu, I Ching hexagrams, and Yang House Feng Shui from Ni's parallel practice in destiny analysis.
Installation supports five methods and works with tools like opencode; the AI then conducts interactive consultations with follow-up questions and formula prescriptions.
Conclusions

A single practitioner's corpus—lectures, cases, and classical commentaries—is enough raw material to build a coherent diagnostic agent when the source is internally consistent and opinionated.

The Skill pattern here is not a retrieval-augmented search over documents but a structured reasoning pipeline that encodes a specific person's clinical decision tree, which is a different and more opinionated approach than general medical QA.

Distilling a controversial figure's work into an AI agent sidesteps the usual debate about evidence quality; the project frames itself as a historical copy, not a validated medical device, which is a legally and ethically careful positioning.

The inclusion of fortune-telling and feng shui alongside clinical medicine reflects the source material faithfully but also demonstrates how distillation amplifies everything in the corpus—there is no editorial filter separating the medical from the metaphysical.

Concepts & terms
Six-Meridian Pattern Differentiation
A diagnostic framework from the Treatise on Cold Damage that classifies disease progression into six stages: Taiyang, Yangming, Shaoyang, Taiyin, Shaoyin, and Jueyin. Each stage has characteristic symptoms and corresponding herbal formulas.
AI Skill (in this context)
A packaged set of instructions, knowledge, and reasoning workflows that can be loaded into a general-purpose LLM to give it specialized capabilities—here, the diagnostic methodology and knowledge base of a specific TCM practitioner.
Classical Formula (Jing Fang)
Herbal formulas recorded in the Treatise on Cold Damage and Synopsis of the Golden Chamber, typically composed of a small number of herbs with fixed proportions, used according to strict pattern-differentiation logic rather than symptomatic matching.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗