nihaisha: An Open Source Agent Skill That Distills Ni Haixia’s TCM Courses into AI-Searchable Knowledge

nihaisha open source project overview showing the AI skill for Ni Haixia TCM course retrieval

nihaisha: An Open Source Agent Skill That Distills Ni Haixia’s TCM Courses into AI-Searchable Knowledge

In the world of self-taught Traditional Chinese Medicine (TCM), Ni Haixia’s lectures are practically required reading. The five Renji series, Tianji, and his clinical case studies add up to hundreds of hours of video and transcripts. The content is superb, but there has always been one nagging problem: if you want to review a particular formula or a passage on pattern differentiation, you have to dig through piles of videos. Worse, the speech-to-text transcripts constantly mangle terminology — one wrong character and you are lost.

nihaisha open source project overview showing the AI skill for Ni Haixia TCM course retrieval
The nihaisha project turns hundreds of hours of TCM lectures into an AI-searchable knowledge base

A recent open source project sets out to solve this pain point with AI. It is called nihaisha, and its author, JuneYaooo, says the project began when his father started systematically studying Master Ni’s courses — so he brought the “course distillation” methodology he had honed in software engineering over to TCM lectures.

Install It into an AI Assistant, Query in Plain Language

In short, nihaisha is an Agent Skill that can be installed into AI coding assistants like Claude Code, Codex, or OpenClaw. Once installed, you simply ask questions in everyday language: “cold with chills,” “cold hands and feet,” “can’t sleep.” The skill first translates these casual expressions into the course’s “pattern-differentiation watershed” questions, then walks you into the corresponding terminology and formula patterns.

By default it runs in lightweight mode: it only reads the notes, indexes, and a small retrieval script inside the repository — no model downloads, no Python RAG dependencies. That means it runs on an ordinary laptop. Coverage spans more than a dozen modules including the Shanghan Lun (Treatise on Cold Damage), Jingui Yaolüe, acupuncture, the Huangdi Neijing, Shennong Bencao, and Tianji. You can search by symptom, formula, acupoint, lecture number, or even blackboard screenshots. Ask “where is the dividing line between Guizhi Decoction and Mahuang Decoction patterns” or “find me the blackboard screenshot for Xiao Chaihu Decoction” — it handles both.

Installation is low-friction too: just tell your AI assistant “install the nihaisha skill from this repo URL,” and the agent clones the repository into its skills directory and reloads — no command line required. The author notes the project is iterating rapidly, so pull the latest version from time to time.

nihaisha agent skill query example with evidence-based TCM course retrieval and page-level citations
Query results come with page-level citations back to the source PDFs

The Truly Hardcore Part: How It Treats Evidence

The project includes 2,986 pieces of blackboard and slide screenshot evidence, all compressed to WebP and stored in the repository, searchable by formula name, acupoint, or lecture number. Even more solid is the PDF page-level provenance: every text hit is pinned to a specific document and page, in a format like pdf-evidence:<doc_id>#p<page>. For example, when you ask “how do I distinguish the Guizhi Decoction pattern from the Mahuang Decoction pattern,” it gives you not just the symptom clusters and pathomechanism layers, but also related formulas and contraindication warnings — plus the blackboard screenshot page references from the Shanghan Lun lectures. Because ASR errors riddle the raw transcripts, the author built systematic errata on top of proofread PDFs, continuously correcting terminology since June 2026.

It also separates “books recommended by Master Ni” into their own tier, labeled “supplementary material,” never mixed with the original course text. After a hit in the primary material, it automatically runs a second search across supplementary material — but the results are listed separately, never conflated. This restraint actually makes the retrieval results more trustworthy.

Lightweight First, But a Door Left Open for RAG

There is also an optional mode in testing: RAG plus a knowledge graph, using BGE-M3 for vectorization combined with graph retrieval. The full resource pack is about 3.68 GB, hosted on Hugging Face.

The design is clever — nothing downloads automatically; you must explicitly request it. Not everyone’s disk can spare 3.68 GB, and lightweight-first is a courtesy to ordinary learners. This “light by default, heavy on demand” trade-off is what many AI knowledge bases should look like — do not force users to haul tens of gigabytes of models and vector stores from day one.

What I admire most is the safety boundary it draws. nihaisha states clearly: it is for course study and theoretical organization only — no diagnosis, no prescriptions, no dosages, no self-medication advice. Explicit warnings cover cancer, acute conditions, pregnancy, pediatric medication, and aconite. A TCM knowledge base that proactively says “do not prescribe for yourself based on this” — that kind of boundary awareness is exactly the clarity you get from a project born out of genuine enthusiasm.

More Than a TCM Reference Library

Ultimately, nihaisha demonstrates one thing: massive, unstructured teaching videos and transcripts can be “distilled” into a form AI can search, trace to sources, and — crucially — know what not to say. The “course distillation” approach comes from another repository the author maintains, lineage-skill, whose core idea is organizing high-density course material into traceable, transferable skills.

Whether or not you are a TCM enthusiast, this practice of consolidating personal learning into an open source asset and giving it back to the community is worth pondering. The project is fully open source, intended for personal study and material organization only — non-commercial use. If you are studying Master Ni’s courses, or wondering how to feed a pile of course material to an AI, check out the repository — and remember to pull the latest version often, as it is still iterating quickly.

GitHub: https://github.com/JuneYaooo/nihaisha-nishi-tcm

By peter_lzh

Author of in-depth reviews of AI open-source tools; focuses on identifying high-value open-source projects and providing practical testing results as well as guidance for making choices.

Leave a Reply

Your email address will not be published. Required fields are marked *