juneyaooo/nihaisha
Use this skill when the user asks about Ni Haisha / 倪海厦 TCM course material, especially Shang Han Lun / 伤寒论, Jingui / 金匮要略, Zhongjing Xinfa / 仲景心法, clinical cases / 临床案例 / 倪师医案, Bagang Bianzheng / 八纲辨证, Fuyang Forum / 扶阳论坛, Yijinjing / 易筋经, Liang Dong dialogue / 梁冬对话倪师, Stanford lecture / 斯坦福大学演讲, Tianji / 天纪 / 易经 / 阳宅 / 紫微斗数, Huangdi Neijing / 黄帝内经, Shennong Bencao / 神农本草, acupuncture / 针灸, meridians, acupoints, acupuncture depth safety / 危险进针深度 / 气胸风险, six-channel pattern identification, symptom-to-formula routing, formula comparison, lesson review, board/PPT screenshot evidence, or course-derived study notes. This skill is for educational distillation and study support only, not medical diagnosis, prescriptions, dosage, individualized treatment, or self-administered acupuncture.
npx skills add https://github.com/JuneYaooo/nihaisha-nishi-tcm --skill nihaisha
Use this skill to answer study, organization, retrieval, and evidence-index requests based on 倪海厦中医课程资料. Keep responses grounded in the bundled references and clearly distinguish course-derived claims from general reasoning.
This skill is educational. Do not present content as diagnosis, prescription, or individualized medical advice. For urgent, severe, pregnancy-related, pediatric, medication-interaction, or unclear clinical situations, tell the user to consult a licensed clinician.
references/index.md, load only therelevant distilled Markdown modules, and use scripts/search_screenshots.py or
scripts/search_pdf_evidence.py when source evidence is needed.
nihaisha_kg, or downloadRAG assets for ordinary course questions, symptom-study questions, formula comparisons, lesson
review, screenshot lookup, or PDF/page evidence lookup.
already present, it may be used for that request. If assets are missing, explain the approximate
3.68 GB size, public Hugging Face source, and local destination, but do not download anything.
A request to use RAG is not permission to download its data; download only when the user
separately and explicitly asks to download the RAG assets. Lightweight retrieval being
insufficient never authorizes an automatic download.
CLI answerer. For a covered PDF question, use optimized hybrid retrieval with reranker auto,
retain only original-paragraph evidence, and let the same agent-level answerer handle colloquial
intent, uncertainty, safety, and final synthesis. RAG opt-in never disables lightweight capability
fallback or screenshot search.
claim needs a short, safe verbatim excerpt followed inline by its stable
pdf-evidence:<doc_id>#p<page> citation when available. Do not leave quotations or stable
citations only in JSON citations, an evidence field, hidden metadata, or a tool trace. For a
comparison, include at least one original excerpt for each side; for layered sources, show primary
course evidence and any external reference evidence in separate labeled sections. If actionable
medical details occur in the source, fold those sentences rather than omitting the entire source.
references/formula-patterns.md plusreferences/six-channel.md by default. Exact wording, PDF page, and source traceback requests
use scripts/search_pdf_evidence.py first.
Bagang, Fuyang, Yijinjing, Liangdong, and Stanford questions remain on their lightweight modules
unless the active RAG manifest explicitly contains that course. Never fill a missing RAG module
with semantically similar paragraphs from another course.
references/index.md first, then load only the relevant module:references/learning-entry.md.references/beginner-questions.md.references/usage-scenarios.md.references/symptom-index.md, then references/six-channel.md, then references/formula-patterns.md if a formula comparison is needed.references/formula-patterns.md, with references/six-channel.md for context.references/six-channel.md.references/lesson-map.md.references/jingui.md; use references/jingui-screenshot-evidence.md for board, acupuncture-demo, or source-evidence lookups.references/zhongjing-xinfa.md; use references/zhongjing-xinfa-screenshot-evidence.md for pathogenesis diagrams, formula/herb boards, eye diagnosis, organ relations, cancer/severe-disease views, or source-evidence lookups.references/clinical-cases.md; use references/clinical-cases-screenshot-evidence.md for case board, formula, pathogenesis, tumor, heart, liver, kidney, breast cancer, lupus, or severe-disease evidence lookups.references/bagang.md; use references/bagang-screenshot-evidence.md for representative lecture frames/subtitle evidence. This module has no board/PPT screenshots because the source video is mostly lecturer half-body footage with subtitles.references/fuyang.md; use references/fuyang-screenshot-evidence.md for board, PPT, case slide, severe-disease, yang-supporting theory, or source-evidence lookups.references/yijinjing.md; use references/yijinjing-screenshot-evidence.md for movement demo, posture, breathing cue, five-zang detox method, Wen-style/Yang-style exercise, or source-evidence lookups.references/liangdong.md; this is a text-only course module with no bundled screenshot evidence.references/stanford.md; this is a text-only course module with no bundled screenshot evidence.references/tianji.md; use references/tianji-screenshot-evidence.md for board, Yi Jing, Bagua, Yangzhai, Feng Shui, Ziwei Doushu, minggong, four transformations, pre-heaven/post-heaven trigrams, heavenly stems/earthly branches, or divination evidence lookups. Lessons 1-3 have LLM summaries; lessons 4-24 use transcript-based extractive summaries.references/huangdi.md; use references/huangdi-screenshot-evidence.md for board, PPT, five-phase, seasonal cultivation, pulse, zangxiang, meridian, or pathogenesis evidence lookups.references/notes-huangdi.md; use after references/huangdi.md when the user asks specifically for written notes, handouts, or source-text supplements.references/bencao.md; use references/bencao-screenshot-evidence.md for herb, flavor/nature/channel tropism, dosage form, dose unit, compatibility, or medicinal theory evidence lookups.references/notes-bencao.md; use after references/bencao.md for written note or herb-note supplement lookups.references/acupuncture.md; use references/acupuncture-screenshot-evidence.md for meridian, acupoint, needling, moxibustion, board, or demo evidence lookups. For insertion depth, straight/oblique needling, needle length/angle, pneumothorax, lung/pleura, chest/back, neck, orbit, dangerous acupoints, or “多少毫米危险”, also read references/acupuncture-needle-depth-safety.md and keep its external evidence separate from the course.references/notes-acupuncture-dacheng.md; use after references/acupuncture.md for written note or handout supplement lookups.references/notes-shanghan.md; use after references/shanghanlun.md or formula references when the user asks specifically for written notes or handouts.references/notes-jingui.md; use after references/jingui.md when the user asks specifically for written notes or handouts.references/ebooks.md, references/pdf-evidence/index.md, and references/text-evidence/index.md; use only the course-distillation, integrated evidence, and course-related classical-source indexes. Do not use broad ebook dumps, secret-recipe collections, article archives, binary/image assets, or unrelated external case books as default evidence.references/ebooks.md to check source role and edition/OCR/extraction caveats. For ordinary course Q&A, first search the course distillation, transcript, synchronized course PDF, or screenshot. Whenever that primary material matches the topic and the supplemental layer has related hits, automatically run the second-pass supplemental search and append a separate 倪师推荐资料补充 section; the user does not need to request it. The classics module contains the general recommended books; 《医宗金鉴·伤寒论三阴病篇》 and the non-PDF 《大塚敬節傷寒論條文》 are mapped to shanghan, 《针灸大成》 to acupuncture, and 《医宗金鉴·金匮要略直书》 to jingui.references/audio-collection.md; use to map local audio files to already-distilled course modules.references/pdf-evidence/index.md and, for non-PDF supplements, references/text-evidence/index.md; use python scripts/search_pdf_evidence.py <term...> --module <module>. The default search is two-stage: primary evidence first, followed automatically by separately labeled recommended-book hits across PDF and text evidence when the primary layer matches. Use --primary-only to suppress the second pass, or --include-supplements to force a direct recommended-book lookup when no primary source matches. Add --show-full-page only when the whole page/section is needed. Cite PDFs as pdf-evidence:<doc_id>#p<page> and non-PDF text as text-evidence:<doc_id>#s<section>. Do not open large evidence-card files wholesale. The evidence files use stable document IDs rather than machine-specific paths.nihaisha_kg runtime described in Optional RAG Runtime Assets below for cross-corpus semantic retrieval or deeper original-paragraph exploration. Prefer text for exact wording and hybrid for semantic questions. Keep reference_secondary results separate and label them 关联参考资料(非倪海厦著作).references/shanghanlun.md.python scripts/search_screenshots.py <query or terms...> for ranked results across all screenshot evidence files. This route is shared by lightweight and full RAG modes. Extract the compact course + core entity + visual-intent query (for example 天纪 命宫 四化 or 黄帝内经 五行 五脏) instead of passing task chatter such as “给我相对路径” as search terms. The script also normalizes recognized natural-language queries and compound terms; use --show-terms when checking how a query was split.pdf-evidence:<doc_id>#p<page>, or text-evidence:<doc_id>#s<section> citation. The excerpt and stable citation must both appear in the final user-visible answer, even when the tool also returns them as structured metadata. Prefer results that match all important query terms. Do not return a bare file/page locator without the supporting excerpt.倪师推荐资料补充 section and name the original book. Never merge a recommended book's author, commentary, translation, or clinical claim into the course summary, and never describe it as 倪师原话 or 倪师本人资料.外部针灸安全参考 section. Attribute the 2006 paper as “叶昭呈医师推荐、刘德毅医师提供”, not as 倪师推荐. Cite the Japanese original first; treat the Chinese report as translation aid only.Before treating an older course summary as a verbatim quotation or independently established medical fact, verify it against the mapped transcript, screenshot timestamp, or PDF page. Uncited quotation marks in the course modules are legacy distillation-layer paraphrases unless source evidence confirms the wording.
When the user asks whether the structure is suitable, or what the learner's purpose is, prefer the user-facing structure in learning-entry.md over the course sequence. Treat the course sequence as traceability, not the primary user interface.
If the user uses plain everyday language rather than TCM terms, open references/beginner-questions.md first. Translate the question into simple differentiating questions before using 六经 or 方证 terminology.
This runtime is an advanced, non-default capability. Its presence in the repository does not
authorize automatic installation, download, or invocation. Do not route ordinary formula
comparisons, course questions, screenshots, or PDF/page lookups here.
The five production runtime files are published separately as the public Hugging Face Dataset
JuneYao/nihaisha-rag-assets (3,679,424,241 bytes, about 3.68 GB). They are intentionally not
committed to GitHub.
Before an explicitly requested RAG lookup, check for data/pdf_rag_bge_m3/rag.sqlite. If the
asset set is missing or incomplete, tell the user that the complete download is about 3.68 GB,
comes from the public Hugging Face Dataset above, and will be stored under
data/pdf_rag_bge_m3/. Stop without downloading. Only run the following commands after the user
separately and explicitly asks to download the RAG assets:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[runtime]"
python3 -m nihaisha_kg download-assets
python3 -m nihaisha_kg doctor
The downloader needs no Hugging Face account, token, CLI, or Git LFS. It resumes .part files,
replaces final files only after a complete download, and verifies the expected byte count and
SHA256 for all five assets. Re-running it verifies and skips intact files. Retrieve only after
doctor reports status: ok.
Useful commands:
python3 -m nihaisha_kg search "原词" --mode text --limit 5
python3 -m nihaisha_kg search "麻黄汤对应什么方证" --mode graph --limit 5
python3 -m nihaisha_kg answer "桂枝汤和麻黄汤的方证如何鉴别?" --mode hybrid --limit 8
python3 -m nihaisha_kg answer "关联资料中的相关原文" --mode text --limit 8 --include-references
In the full RAG composite mode, use --reranker auto --json --trace for covered semantic PDF
questions. The CLI output is an evidence packet, not the final user-facing answer: graph relations
remain navigation-only, visible claims must bind to original paragraphs, and the agent must still
apply the normal lightweight fallbacks, screenshot route, and safety policy before answering.
The final synthesis must copy safe evidence_quote text and stable_citation values into an explicit
原文依据 section; merely mentioning a PDF filename/page or keeping citations in structured JSON does
not satisfy the answer contract.
text, knowledge, and graph need no API key. vector and hybrid require FAISS plus a
query embedding backend. Every visible answer citation must point to an original paragraph with
portable source, page, paragraph ID, evidence ID, and previous/next context. Graph relations,
guide nodes, linked-reference cards, and other derived records are navigation only. They cannot
replace original evidence or enter the primary conclusion on their own.
Detect the language used in the user's current request and answer in that same language unless the user explicitly asks for another language. For mixed-language requests, follow the primary natural language. Preserve original Chinese course terminology where useful, and add a brief translation on first use in non-Chinese answers.
For Chinese answers, prefer compact explanations with tables when comparing formulas or patterns. Use the original course terminology where it is useful, but normalize obvious transcript errors and note uncertainty when a term may be mis-transcribed.
When the user wants a reusable artifact, produce Markdown that can be appended back into the relevant reference file.
Take juneyaooo/nihaisha from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.