master-skill 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/.claude-plugin/marketplace.json +20 -0
  2. package/.claude-plugin/plugin.json +22 -0
  3. package/.codex/INSTALL.md +45 -0
  4. package/.cursor-plugin/plugin.json +25 -0
  5. package/.opencode/INSTALL.md +46 -0
  6. package/ETHICS.md +198 -0
  7. package/GEMINI.md +2 -0
  8. package/LICENSE +21 -0
  9. package/README.md +425 -0
  10. package/README_EN.md +398 -0
  11. package/SKILL.md +393 -0
  12. package/bin/cli.mjs +148 -0
  13. package/gemini-extension.json +6 -0
  14. package/hooks/hooks-cursor.json +10 -0
  15. package/hooks/hooks.json +16 -0
  16. package/hooks/run-hook.cmd +29 -0
  17. package/hooks/session-start +47 -0
  18. package/package.json +74 -0
  19. package/prebuilt/ajahn-chah/SKILL.md +126 -0
  20. package/prebuilt/ajahn-chah/meta.json +100 -0
  21. package/prebuilt/ajahn-chah/references/teaching.md +164 -0
  22. package/prebuilt/ajahn-chah/references/voice.md +98 -0
  23. package/prebuilt/ajahn-chah/sources/INDEX.md +24 -0
  24. package/prebuilt/ajahn-chah/sources/sutta-excerpts.md +128 -0
  25. package/prebuilt/ajahn-chah/sources/teachings-excerpts.md +204 -0
  26. package/prebuilt/ajahn-chah/tests/fidelity.jsonl +13 -0
  27. package/prebuilt/compare/SKILL.md +277 -0
  28. package/prebuilt/compare/tests/fidelity.jsonl +5 -0
  29. package/prebuilt/fazang/SKILL.md +132 -0
  30. package/prebuilt/fazang/meta.json +101 -0
  31. package/prebuilt/fazang/references/teaching.md +121 -0
  32. package/prebuilt/fazang/references/voice.md +95 -0
  33. package/prebuilt/fazang/sources/INDEX.md +22 -0
  34. package/prebuilt/fazang/sources/jinshizi-excerpts.md +35 -0
  35. package/prebuilt/fazang/sources/wujiao-zhang-excerpts.md +68 -0
  36. package/prebuilt/fazang/tests/fidelity.jsonl +10 -0
  37. package/prebuilt/huineng/SKILL.md +124 -0
  38. package/prebuilt/huineng/meta.json +91 -0
  39. package/prebuilt/huineng/references/teaching.md +122 -0
  40. package/prebuilt/huineng/references/voice.md +96 -0
  41. package/prebuilt/huineng/sources/INDEX.md +22 -0
  42. package/prebuilt/huineng/sources/jingang-excerpts.md +47 -0
  43. package/prebuilt/huineng/sources/tanjing-excerpts.md +81 -0
  44. package/prebuilt/huineng/tests/fidelity.jsonl +10 -0
  45. package/prebuilt/kumarajiva/SKILL.md +135 -0
  46. package/prebuilt/kumarajiva/meta.json +113 -0
  47. package/prebuilt/kumarajiva/references/teaching.md +131 -0
  48. package/prebuilt/kumarajiva/references/voice.md +99 -0
  49. package/prebuilt/kumarajiva/sources/INDEX.md +23 -0
  50. package/prebuilt/kumarajiva/sources/fahua-excerpts.md +33 -0
  51. package/prebuilt/kumarajiva/sources/jingang-bore-excerpts.md +46 -0
  52. package/prebuilt/kumarajiva/sources/zhonglun-excerpts.md +35 -0
  53. package/prebuilt/kumarajiva/tests/fidelity.jsonl +10 -0
  54. package/prebuilt/milarepa/SKILL.md +122 -0
  55. package/prebuilt/milarepa/meta.json +83 -0
  56. package/prebuilt/milarepa/references/teaching.md +135 -0
  57. package/prebuilt/milarepa/references/voice.md +99 -0
  58. package/prebuilt/milarepa/sources/INDEX.md +24 -0
  59. package/prebuilt/milarepa/sources/grubum-excerpts.md +124 -0
  60. package/prebuilt/milarepa/sources/namthar-excerpts.md +134 -0
  61. package/prebuilt/milarepa/tests/fidelity.jsonl +12 -0
  62. package/prebuilt/ouyi/SKILL.md +130 -0
  63. package/prebuilt/ouyi/meta.json +108 -0
  64. package/prebuilt/ouyi/references/teaching.md +118 -0
  65. package/prebuilt/ouyi/references/voice.md +97 -0
  66. package/prebuilt/ouyi/sources/INDEX.md +22 -0
  67. package/prebuilt/ouyi/sources/jiaoguan-gangzong-excerpts.md +34 -0
  68. package/prebuilt/ouyi/sources/mituo-yaojie-excerpts.md +50 -0
  69. package/prebuilt/ouyi/tests/fidelity.jsonl +10 -0
  70. package/prebuilt/xuanzang/SKILL.md +135 -0
  71. package/prebuilt/xuanzang/meta.json +110 -0
  72. package/prebuilt/xuanzang/references/teaching.md +162 -0
  73. package/prebuilt/xuanzang/references/voice.md +99 -0
  74. package/prebuilt/xuanzang/sources/INDEX.md +22 -0
  75. package/prebuilt/xuanzang/sources/chengweishi-excerpts.md +67 -0
  76. package/prebuilt/xuanzang/sources/xinjing-excerpts.md +34 -0
  77. package/prebuilt/xuanzang/tests/fidelity.jsonl +10 -0
  78. package/prebuilt/xuyun/SKILL.md +127 -0
  79. package/prebuilt/xuyun/meta.json +96 -0
  80. package/prebuilt/xuyun/references/teaching.md +106 -0
  81. package/prebuilt/xuyun/references/voice.md +96 -0
  82. package/prebuilt/xuyun/sources/INDEX.md +22 -0
  83. package/prebuilt/xuyun/sources/lengyanjing-excerpts.md +33 -0
  84. package/prebuilt/xuyun/sources/tanjing-excerpts.md +32 -0
  85. package/prebuilt/xuyun/tests/fidelity.jsonl +10 -0
  86. package/prebuilt/yinguang/SKILL.md +130 -0
  87. package/prebuilt/yinguang/meta.json +109 -0
  88. package/prebuilt/yinguang/references/teaching.md +103 -0
  89. package/prebuilt/yinguang/references/voice.md +96 -0
  90. package/prebuilt/yinguang/sources/INDEX.md +23 -0
  91. package/prebuilt/yinguang/sources/jingtu-sanjing-excerpts.md +32 -0
  92. package/prebuilt/yinguang/sources/wenchao-excerpts.md +50 -0
  93. package/prebuilt/yinguang/sources/yihanbianfu-excerpts.md +33 -0
  94. package/prebuilt/yinguang/tests/fidelity.jsonl +10 -0
  95. package/prebuilt/zhiyi/SKILL.md +130 -0
  96. package/prebuilt/zhiyi/meta.json +104 -0
  97. package/prebuilt/zhiyi/references/teaching.md +105 -0
  98. package/prebuilt/zhiyi/references/voice.md +96 -0
  99. package/prebuilt/zhiyi/sources/INDEX.md +22 -0
  100. package/prebuilt/zhiyi/sources/fahua-xuanyi-excerpts.md +103 -0
  101. package/prebuilt/zhiyi/sources/mohezhiguan-excerpts.md +117 -0
  102. package/prebuilt/zhiyi/tests/fidelity.jsonl +10 -0
  103. package/scripts/cite.py +74 -0
  104. package/scripts/query.py +84 -0
  105. package/scripts/test-fidelity.py +282 -0
  106. package/scripts/validate-fidelity.py +146 -0
  107. package/scripts/validate.py +207 -0
package/README_EN.md ADDED
@@ -0,0 +1,398 @@
1
+ <h1 align="center">Master-skill</h1>
2
+
3
+ <p align="center">
4
+ <em>"All conditioned phenomena<br>
5
+ Are like a dream, an illusion, a bubble, a shadow,<br>
6
+ Like dew, or a flash of lightning;<br>
7
+ Thus should they be contemplated."</em><br>
8
+ <sub>— Diamond Sūtra (Vajracchedikā Prajñāpāramitā Sūtra)</sub>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT">
13
+ <img src="https://img.shields.io/badge/Python-3.9+-green.svg" alt="Python 3.9+">
14
+ <img src="https://img.shields.io/badge/Claude%20Code-Skill-purple.svg" alt="Claude Code Skill">
15
+ <img src="https://img.shields.io/badge/AgentSkills-Standard-orange.svg" alt="AgentSkills Standard">
16
+ </p>
17
+
18
+ <p align="center">
19
+ Opening the 100-fascicle Yogācārabhūmi-śāstra — not knowing where to begin?<br>
20
+ Want to study Chan, but unsure which patriarch to approach?<br>
21
+ Modern translations feel one layer removed, but reading classical Chinese is daunting?<br>
22
+ Need authoritative citations of patriarchs' teachings for scholarly work?
23
+ </p>
24
+
25
+ <p align="center">
26
+ <strong>AI learning companions modeled after historical Buddhist masters across three traditions</strong><br>
27
+ 10 pre-built masters · 汉传 / 藏传 / 南传 cross-tradition · CBETA / BDRC / SuttaCentral citations · AgentSkills Standard
28
+ </p>
29
+
30
+ <p align="center">
31
+ <a href="#try-it-now-browser-first">Browser</a> ·
32
+ <a href="#seriousness-statement">Statement</a> ·
33
+ <a href="#features">Features</a> ·
34
+ <a href="#developer-installation">Install</a> ·
35
+ <a href="#pre-built-masters">Masters</a> ·
36
+ <a href="#relationship-to-fojin">FoJin</a> ·
37
+ <a href="README.md">中文</a>
38
+ </p>
39
+
40
+ ---
41
+
42
+ ## Try It Now (Browser-First)
43
+
44
+ > **Most users don't need to install anything.** Buddhist students, researchers, and curious readers can use every master directly in a web browser.
45
+
46
+ ### 👉 [Open fojin.app/chat](https://fojin.app/chat)
47
+
48
+ On the AI Q&A page, open the **"法师模式"** (Master Mode) dropdown in the bottom-left and pick one of the 10 pre-built masters across three traditions to start chatting.
49
+
50
+ - No install, no signup
51
+ - `/compare-masters` multi-master comparison works across traditions too
52
+ - Live citation retrieval backed by FoJin's 503 sources and 678K+ semantic embeddings
53
+ - Every answer carries an authoritative source ID (CBETA for 汉传, BDRC for 藏传, SuttaCentral for 南传)
54
+
55
+ **Not sure which master to ask?** Start here:
56
+
57
+ | Your situation | Suggested master |
58
+ |---|---|
59
+ | "My mind is scattered, I can't sit still" | `/xuyun` `/zhiyi` `/ajahn-chah` (huatou / śamatha-vipaśyanā / mindfulness) |
60
+ | "I can't follow the logic of the sutras" | `/xuanzang` (Yogācāra precision) |
61
+ | "I've studied for years but feel stuck" | `/yinguang` (plain, sincere nianfo) |
62
+ | "I want to understand emptiness" | `/kumarajiva` `/huineng` `/milarepa` (Madhyamaka / direct pointing / Mahāmudrā clarity-emptiness) |
63
+ | "I want a systematic view of Huayan / Tiantai" | `/fazang` `/zhiyi` (classification and metaphysics) |
64
+ | "I'm torn between Chan and Pure Land" | `/ouyi` (cross-tradition synthesis) |
65
+ | "I'm curious about ascetic practice / retreat" | `/milarepa` (snow-mountain retreat · Kagyu paradigm) |
66
+ | "I want the simplest meditation instructions" | `/ajahn-chah` (Thai Forest · ānāpānasati) |
67
+ | "I want a cross-tradition perspective" | `/compare-masters` (auto-pairs 汉/藏/南 voices) |
68
+
69
+ > Developers and Claude Code / Cursor users should skip to [Developer Installation](#developer-installation) to use the masters as terminal AgentSkills.
70
+
71
+ ---
72
+
73
+ > **v0.4 Update (2026-05)**: Cross-tradition expansion — added Tibetan **Milarepa** (Kagyu / Mahāmudrā / Naro Chodruk) and Theravāda **Ajahn Chah** (Thai Forest Tradition / Wat Pah Pong). Citation system extended to support BDRC (Tibetan canon) and SuttaCentral (Pali canon). HARD-GATE adds `no_esoteric_instruction` (esoteric practice steps never disclosed) and `no_fabricated_quotes` (Theravāda discourses must trace to authorized published collections).
74
+ >
75
+ > **v0.3**: Full architecture rebuild — provenance frontmatter, offline source passages (`sources/`), automated fidelity tests (`fidelity.jsonl`), NPX installer, two-stage independent review, HARD-GATE rules, multi-platform plugin support across Claude Code / Cursor / Codex / OpenCode / Gemini CLI, session-start hook auto-injecting the master list.
76
+
77
+ ---
78
+
79
+ An AgentSkills-standard generator for AI personas based on historical Buddhist masters, powered by [FoJin](https://fojin.app) — a Buddhist text aggregation platform.
80
+
81
+ ---
82
+
83
+ ## Seriousness Statement
84
+
85
+ This project is built out of respect for Buddhist traditions. All content is generated faithfully from historical documents. It makes no doctrinal judgments and claims no sectarian authority. Generated content is intended for study and reference only. For formal practice guidance, please seek out a qualified master and rely on genuine, living instruction.
86
+
87
+ ---
88
+
89
+ ## Features
90
+
91
+ - **10 pre-built masters across three traditions**: 8 汉传 (Yogācāra, Madhyamaka, Chan, Tiantai, Huayan, Pure Land, cross-tradition) + 1 藏传 (Kagyu / Milarepa) + 1 南传 (Thai Forest / Ajahn Chah) — ready to use out of the box
92
+ - **Provenance enforcement**: Every master ships with authoritative source IDs (CBETA / BDRC / SuttaCentral) and FoJin text IDs in frontmatter; every doctrinal claim must carry a scriptural citation
93
+ - **Offline source passages**: `sources/` captures key passages from each master's core canon, so citations still work when FoJin is unreachable
94
+ - **Progressive disclosure**: SKILL.md is a decision tree + quick reference; `references/` and `sources/` are loaded on demand to keep context lean
95
+ - **HARD-GATE discipline**: Both `/create-master` and every prebuilt master embed hard rules — no unverified CBETA ID, no uncited doctrinal claim, no fictional personas
96
+ - **Two-stage independent review**: The generation pipeline forces a "doctrinal accuracy → voice consistency" review before write; FAIL triggers up to 2 rounds of automatic repair
97
+ - **Automated fidelity tests**: Each master's `tests/fidelity.jsonl` holds 5+ Q&A samples validating citations and keyword coverage; CI runs a dry-run on every push
98
+ - **Unified multi-platform plugin**: Claude Code, Cursor, Codex CLI, OpenCode, and Gemini CLI share one `prebuilt/` tree, with a session-start hook injecting the master list on every platform
99
+ - **NPX one-shot install**: `npx master-skill install zhiyi` drops skills straight into Claude Code
100
+ - **Offline toolchain**: `scripts/cite.py` (CBETA lookup), `scripts/query.py` (offline semantic search), `scripts/validate.py` (frontmatter linter)
101
+ - **FoJin data bridge**: Connected to [fojin.app](https://fojin.app) with 503 data sources, 10K+ texts, 678K+ semantic embeddings, and a 31K-entity knowledge graph
102
+ - **AgentSkills standard**: Compliant with [Anthropic Agent Skills](https://github.com/anthropics/skills) — progressive disclosure, decision trees, black-box script pattern
103
+
104
+ ---
105
+
106
+ ## Developer Installation
107
+
108
+ > 👤 **Just want to try it?** Use [fojin.app/chat](https://fojin.app/chat) in your browser and skip this section entirely.
109
+ > 🛠️ **This section is for**: Claude Code / Cursor / Codex CLI / OpenCode / Gemini CLI users who want to invoke `/xuanzang`, `/huineng`, etc. directly as terminal AgentSkills.
110
+
111
+ ### Installation
112
+
113
+ **NPX (recommended)**
114
+
115
+ ```bash
116
+ npx master-skill install --all # Install all 10 masters
117
+ npx master-skill list # List available masters
118
+ ```
119
+
120
+ **Claude Code**
121
+
122
+ ```bash
123
+ git clone https://github.com/xr843/Master-skill ~/Master-skill
124
+ cd ~/Master-skill && pip install -r requirements.txt
125
+ for d in prebuilt/*/; do ln -sf "$(pwd)/$d" ~/.claude/skills/"$(basename $d)"; done
126
+ ln -sf "$(pwd)" ~/.claude/skills/create-master
127
+ ```
128
+
129
+ **Cursor** — Clone the repo; Cursor auto-detects `.cursor-plugin/plugin.json`.
130
+
131
+ **OpenCode** — Add to `opencode.json`:
132
+
133
+ ```json
134
+ {"plugin": ["master-skill@git+https://github.com/xr843/Master-skill.git"]}
135
+ ```
136
+
137
+ **Codex CLI** — See [.codex/INSTALL.md](.codex/INSTALL.md)
138
+
139
+ **Gemini CLI** — Auto-discovered via `gemini-extension.json` and `GEMINI.md`.
140
+
141
+ ### Use a Pre-built Master
142
+
143
+ In any AgentSkills-compatible environment (Claude Code / Cursor / Codex CLI / OpenCode / Gemini CLI):
144
+
145
+ ```
146
+ # 汉传 (Chinese)
147
+ /xuanzang — Master Xuanzang (Yogacara)
148
+ /kumarajiva — Kumarajiva (Madhyamaka / Sanlun)
149
+ /huineng — Master Huineng (Chan, Sixth Patriarch)
150
+ /zhiyi — Master Zhiyi (Tiantai)
151
+ /fazang — Master Fazang (Huayan)
152
+ /yinguang — Master Yinguang (Pure Land)
153
+ /ouyi — Master Ouyi (Tiantai / Pure Land, cross-tradition)
154
+ /xuyun — Master Xuyun (Chan, Five Houses)
155
+
156
+ # 藏传 (Tibetan)
157
+ /milarepa — Milarepa (Kagyu · Mahāmudrā · Naro Chodruk)
158
+
159
+ # 南传 (Theravāda)
160
+ /ajahn-chah — Ajahn Chah (Thai Forest Tradition · Wat Pah Pong)
161
+ ```
162
+
163
+ ### Compare Masters
164
+
165
+ Ask the same question to 2-3 masters in parallel and surface the differences between traditions:
166
+
167
+ ```
168
+ # Auto-pick relevant masters
169
+ /compare-masters what is emptiness
170
+
171
+ # Manually pick masters (recommended for precise results)
172
+ /compare-masters how to read the Heart Sutra --masters xuanzang,huineng,zhiyi
173
+
174
+ # Natural-language triggers
175
+ compare Huineng and Yinguang on nianfo
176
+ how do Chan and Pure Land differ on practice
177
+ ```
178
+
179
+ **Selection logic**: the command first tries to extract keywords from the question and match them against each master's core concepts; if nothing matches strongly, it falls back to topic mapping (nianfo / meditation / Yogacara-Madhyamaka / classification, etc.). **If the auto-pick feels off, use `--masters` to override.**
180
+
181
+ ### Generate a Custom Master
182
+
183
+ ```
184
+ /create-master Hongyi
185
+ ```
186
+
187
+ Or use natural language:
188
+
189
+ ```
190
+ Create a persona for Master Hongyi
191
+ ```
192
+
193
+ The system will guide you through a three-step intake, then automatically collect data from FoJin and generate the doctrinal analysis and style files.
194
+
195
+ ---
196
+
197
+ ## Pre-built Masters
198
+
199
+ ### Master Xuanzang (602-664)
200
+
201
+ The greatest translator in Chinese Buddhist history. Traveled to India for 17 years, translated 75 texts in 1,335 fascicles. Founded the Yogacara (Faxiang) school in China. Known for precise, rigorous translation methodology and the "Five Categories of Non-Translation" principle.
202
+ Primary sources: CBETA — Mahaprajnaparamita Sutra, Yogacarabhumi-sastra, Cheng Weishi Lun, Heart Sutra.
203
+ Invoke: `/xuanzang`
204
+
205
+ ### Kumarajiva (344-413)
206
+
207
+ One of the four great translators of Chinese Buddhism. Born in Kucha, translated in Chang'an. His translations are celebrated for literary elegance — the Lotus Sutra, Diamond Sutra, Vimalakirti Sutra, and Mulamadhyamakakarika remain the most widely used versions today. Established the foundation of the Sanlun (Madhyamaka) school in China.
208
+ Primary sources: CBETA — Lotus Sutra, Diamond Sutra, Vimalakirti Sutra, Mulamadhyamakakarika, Mahaprajnaparamita-sastra.
209
+ Invoke: `/kumarajiva`
210
+
211
+ ### Master Huineng (638-713)
212
+
213
+ The Sixth Patriarch of Chan Buddhism, founder of the Southern School. An illiterate woodcutter who attained enlightenment upon hearing the Diamond Sutra. His Platform Sutra is the only Chinese-authored text honored with the title "sutra." Advocated "directly pointing to the mind, seeing one's nature to become Buddha."
214
+ Primary sources: CBETA — Platform Sutra (T48n2008).
215
+ Invoke: `/huineng`
216
+
217
+ ### Master Zhiyi (538-597)
218
+
219
+ Founder of the Tiantai school, honored as "the Little Shakyamuni of the East." Established the first comprehensive doctrinal classification system in Chinese Buddhism (Five Periods, Eight Teachings). Authored the Three Great Works of Tiantai. Core teachings: three thousand realms in a single thought-moment, perfect interfusion of the three truths, dual cultivation of samatha and vipasyana.
220
+ Primary sources: CBETA — Mohe Zhiguan (T46n1911), Fahua Xuanyi (T33n1718).
221
+ Invoke: `/zhiyi`
222
+
223
+ ### Master Fazang (643-712)
224
+
225
+ Third Patriarch and true systematizer of the Huayan school. National Preceptor under Empress Wu Zetian. Used the Golden Lion treatise to explain Huayan philosophy. Core teachings: dharmadhatu dependent origination, four dharma-realms, ten mysterious gates, six characteristics in perfect harmony.
226
+ Primary sources: CBETA — Huayan Jing Tanxuan Ji (T35n1733), Huayan Wujiao Zhang (T45n1866).
227
+ Invoke: `/fazang`
228
+
229
+ ### Master Yinguang (1861-1940)
230
+
231
+ 13th Patriarch of the Chinese Pure Land school. Central figure in the modern Pure Land revival. His writing is sincere and straightforward; he guided countless practitioners through correspondence, collected in the three volumes of the Yinguang Fashi Wenchao.
232
+ Primary sources: CBETA — Wenchao volumes and the three Pure Land sutras.
233
+ Invoke: `/yinguang`
234
+
235
+ ### Master Ouyi (1599-1655)
236
+
237
+ One of the Four Great Masters of Late Ming Buddhism, 9th Patriarch of Pure Land. His motto: "Doctrine follows Tiantai, practice returns to Pure Land." The most important cross-tradition synthesizer in Chinese Buddhist history. His commentary on the Amitabha Sutra was praised by Master Yinguang as unsurpassable.
238
+ Primary sources: CBETA — Amituo Jing Yaojie (T37n1762), Jiaoguan Gangzong.
239
+ Invoke: `/ouyi`
240
+
241
+ ### Master Xuyun (1840-1959)
242
+
243
+ Modern Chan patriarch who lived to 119 years. Unprecedented in Buddhist history for holding dharma transmission in all five houses of Chan (Linji, Caodong, Guiyang, Yunmen, Fayan). Restored six major ancestral monasteries. Advocated hua-tou investigation, honest practice, and harmonizing Chan with Pure Land.
244
+ Primary sources: CBETA — Shurangama Sutra, Diamond Sutra, Platform Sutra.
245
+ Invoke: `/xuyun`
246
+
247
+ ### Milarepa (1052-1135) — Tibetan · Kagyu
248
+
249
+ Spiritual ancestor of the Tibetan Kagyu lineage and the paradigm of the "yogi tradition" (no monastery, mountain retreat, teaching through song). After committing serious harm in his youth through black magic, he sought purification under Marpa the Translator, who put him through severe trials before transmitting the complete Mahāmudrā and Naro Chodruk lineages. He spent decades in Himalayan retreat, surviving on nettles, and taught through extemporaneous **mGur** (songs of realization) — shaping the entire later Tibetan tradition.
250
+ Primary sources: BDRC — *The Hundred Thousand Songs of Milarepa* (mGur 'bum, W1KG14334) and *The Life of Milarepa* (rNam thar, W22272).
251
+ Invoke: `/milarepa`
252
+
253
+ > ⚠️ Naro Chodruk (Six Yogas), tummo, generation/completion stages and other esoteric practices are introduced **only at the level of name and historical context — concrete practice instructions are never given**. Authentic transmission requires direct empowerment from a qualified teacher.
254
+
255
+ ### Ajahn Chah Subhaddo (1918-1992) — Theravāda · Thai Forest
256
+
257
+ One of the most internationally influential masters of the Thai Forest Tradition. Renowned for strict Vinaya observance, four-foundations-of-mindfulness practice, and plain, life-grounded teaching style. His Western disciples (Ajahn Sumedho, Ajahn Pasanno, Ajahn Amaro and others) established Abhayagiri (California), Amaravati (UK), Cittaviveka (UK) and other branch monasteries, carrying the forest tradition to the West. Most-quoted line: *"If you let go a little, you have a little peace; if you let go completely, you have complete peace."*
258
+ Primary sources: Pali Canon (SuttaCentral) + authorized English collections — *Food for the Heart*, *A Still Forest Pool*, *Living Dhamma*.
259
+ Invoke: `/ajahn-chah`
260
+
261
+ ---
262
+
263
+ ## Architecture
264
+
265
+ ```
266
+ User request
267
+ |
268
+ v
269
+ session-start hook ──> auto-injects master list (5 platforms, unified)
270
+ |
271
+ v
272
+ SKILL.md (AgentSkills entry: decision tree + quick reference)
273
+ |
274
+ +-- Pre-built masters --> prebuilt/{slug}/
275
+ | +-- SKILL.md (decision tree + <HARD-GATE>)
276
+ | +-- meta.json (version / lineage / provenance)
277
+ | +-- references/ (loaded on demand)
278
+ | | +-- teaching.md
279
+ | | +-- voice.md
280
+ | +-- sources/ (offline CBETA passages)
281
+ | | +-- *.md
282
+ | +-- tests/
283
+ | +-- fidelity.jsonl (CI dry-run samples)
284
+ |
285
+ +-- Offline toolchain
286
+ | +-- scripts/validate.py (frontmatter linter)
287
+ | +-- scripts/cite.py (CBETA lookup)
288
+ | +-- scripts/query.py (offline semantic search)
289
+ | +-- scripts/test-fidelity.py (fidelity runner)
290
+ | +-- scripts/validate-fidelity.py
291
+ | +-- bin/cli.mjs (NPX installer)
292
+ |
293
+ +-- Custom generation (/create-master, HARD-GATE enforced)
294
+ +-- Step 1-2 prompts/intake.md → tools/sutra_collector.py
295
+ | └─> FoJin API (KG + semantic search + text)
296
+ +-- Step 3 prompts/{sutra,voice}_analyzer.md → two-stage analysis
297
+ +-- Step 3.5 two-stage independent review ──┬─ prompts/doctrine_reviewer.md
298
+ | └─ prompts/voice_reviewer.md
299
+ +-- Step 4-5 tools/master_builder.py → tools/skill_writer.py
300
+ └─> tools/verify_sources.py (final pre-write check)
301
+
302
+ Unified multi-platform manifests:
303
+ .claude-plugin/ → Claude Code (hooks/run-hook.cmd → session-start)
304
+ .cursor-plugin/ → Cursor (hooks/hooks-cursor.json)
305
+ .codex/ → Codex CLI (.codex/INSTALL.md)
306
+ .opencode/ → OpenCode (referenced from opencode.json)
307
+ gemini-extension.json → Gemini CLI (auto-loaded with GEMINI.md)
308
+ ```
309
+
310
+ ---
311
+
312
+ ## Relationship to FoJin
313
+
314
+ [FoJin](https://fojin.app) is a Buddhist text aggregation platform integrating 503 data sources, 10K+ texts, 678K+ semantic vector embeddings, and a knowledge graph of 31K entities. It covers major corpora including CBETA Chinese Buddhist Canon, SuttaCentral Pali Canon and translations, and 84000 Tibetan Buddhist translations.
315
+
316
+ Master-skill connects to the FoJin API via `tools/fojin_bridge.py` to enable:
317
+
318
+ - Knowledge graph entity retrieval (master biography, lineage, school)
319
+ - Semantic similarity search (doctrinally relevant sutras)
320
+ - Runtime RAG retrieval for grounding answers in real texts
321
+ - Source passage extraction with provenance tracking
322
+
323
+ All citations include traceable FoJin links to ensure transparency of sources.
324
+
325
+ ---
326
+
327
+ ## Sensitivity Boundaries
328
+
329
+ **Will not:**
330
+
331
+ - Pass judgment on the relative merits of different schools or traditions
332
+ - Provide personal practice diagnoses (karma readings, past lives, etc.)
333
+ - Claim supernatural powers or auspicious experiences
334
+ - Engage with politically charged religious topics
335
+ - Offer medical advice
336
+
337
+ **Will:**
338
+
339
+ - Cite source texts faithfully, with FoJin links on every response
340
+ - Retrieve real texts via runtime RAG, not relying solely on AI training data
341
+ - Acknowledge clearly when a question falls outside scope
342
+ - Encourage users to seek out qualified masters and authentic practice
343
+
344
+ ---
345
+
346
+ ## Troubleshooting
347
+
348
+ **Q: Does it still work when the FoJin API is unreachable?**
349
+
350
+ Yes. Each prebuilt master ships with `prebuilt/<name>/sources/` — key passages from that master's core canon, stored offline. When FoJin is down, the master degrades to offline mode and declares "currently running on offline passages" in the reply. The `/create-master` pipeline asks the user to switch to manual-input mode when the API fails, so you can paste source text and continue.
351
+
352
+ **Q: What does a valid CBETA citation look like, and how is it verified?**
353
+
354
+ Every CBETA citation must carry a `Txxn####` identifier (for example, the Lotus Sutra is `T9n262`). `scripts/validate.py` lints the frontmatter `sources` block; `tools/verify_sources.py` checks every FoJin `text_id` against the live API before writing. Broken links are downgraded to FoJin search URLs — no dead references make it into the final file.
355
+
356
+ **Q: `npx master-skill install` fails with ENOTEMPTY or a permission error — what now?**
357
+
358
+ Clean up any leftover `~/.claude/skills/master-<name>/` directories before retrying. For npm-cache weirdness, run `npm cache clean --force` and rerun NPX. Windows users should execute from Git Bash or WSL to avoid cmd.exe path-escaping issues.
359
+
360
+ **Q: The generated master says things that don't match the historical record — how do I correct it?**
361
+
362
+ Just tell the master in-chat: "he wouldn't phrase it like that" or "he should sound more stern." The `/create-master` correction mode classifies the fix (doctrinal → appended to `teaching.md`; stylistic → appended to `voice.md`), writes it as a `## Correction` block with timestamp, and bumps the patch version. Correction blocks take priority over analysis-generated content at runtime.
363
+
364
+ **Q: How do I contribute a new prebuilt master?**
365
+
366
+ See "Contributing" below. The short version: follow the v0.3 layout under `prebuilt/<name>/`, pass `scripts/validate.py --strict` with zero errors, ship at least 5 fidelity Q&A samples in `tests/fidelity.jsonl`, then open a PR.
367
+
368
+ ---
369
+
370
+ ## Contributing
371
+
372
+ Contributions are welcome: new prebuilt masters, corrections to source attributions, offline passage additions, or toolchain improvements.
373
+
374
+ New masters must follow the v0.3 layout: `prebuilt/<name>/` containing SKILL.md (with provenance frontmatter and a decision tree), `references/teaching.md` and `references/voice.md` (loaded on demand), `sources/*.md` (offline CBETA passages), and `tests/fidelity.jsonl` (5+ Q&A fidelity samples). Run `python3 scripts/validate.py --strict` for zero errors, and make sure the CI fidelity dry-run passes before opening a PR.
375
+
376
+ Before submitting, verify that sources trace back to CBETA, content is faithful to historical documents, and no sectarian bias is introduced.
377
+
378
+ ---
379
+
380
+ ## License
381
+
382
+ MIT License
383
+
384
+ ---
385
+
386
+ ## Acknowledgments
387
+
388
+ Gratitude to the following open-source Buddhist text projects:
389
+
390
+ - [CBETA](https://cbeta.org) — digitized Chinese Buddhist Canon
391
+ - [SuttaCentral](https://suttacentral.net) — Pali Canon and multilingual translations
392
+ - [84000](https://84000.co) — Tibetan Buddhist translation project
393
+
394
+ ---
395
+
396
+ ## Community
397
+
398
+ - [LINUX DO](https://linux.do) — Thanks to the LINUX DO community for support and feedback