This content is generated based on historical Buddhist texts and is for reference and study only. For formal practice guidance, please rely on a virtuous teacher.
Trigger Conditions
/create-masteror/create-master <法师名>- "Help me create a teaching persona for Master Yin Guang"
- "Generate an AI Skill for Master Hui Neng"
- "I want to learn from Master Xuan Zang"
Preset Masters (call directly, no generation needed)
India
/master-nagarjuna— Bodhisattva Nāgārjuna (India · Madhyamaka | Common patriarch of the Eight Schools)
Chinese
/master-xuanzang— Master Xuan Zang (Faxiang Yogācāra School)/master-kumarajiva— Kumārajīva (Sanlun School/Madhyamaka)/master-huineng— Master Hui Neng (Sixth Patriarch of Chan)/master-zhiyi— Master Zhi Yi (Tiantai School)/master-fazang— Master Fa Zang (Huayan School)/master-yinguang— Master Yin Guang (Pure Land School)/master-ouyi— Master Ou Yi (Tiantai/Pure Land · Cross-school)/master-xuyun— Elder Master Xu Yun (Chan · Dual successor of five schools)
Tibetan
/master-atisha— Master Atiśa (Founder of the Kadam School · Three Scopes · 982-1054)/master-tsongkhapa— Master Tsongkhapa (Founder of the Gelug School · Three Principal Aspects of the Path · 1357-1419)/master-milarepa— Master Milarepa (Kagyu School · Mahāmudrā · 1052-1135)
Theravāda
/master-buddhaghosa— Venerable Buddhaghosa (Theravāda abhidhamma master · Visuddhimagga · 5th century)/master-mahasi-sayadaw— Venerable Mahasi (Myanmar insight meditation · noting method · 1904-1982)/master-ajahn-chah— Ajahn Chah (Thai Forest Tradition · 1918-1992)
Teaching Modes (multi-patriarch collaboration)
/compare-masters— Side-by-side comparison of multiple masters on the same question (horizontal / single round)/master-debate— Patriarchs engage in 4 rounds of cross-debate on controversial topics (multi-round / see disagreements)/master-curriculum— Gives you a "foundation → deepening → intensive study → blind spots" study and practice path according to your tradition (vertical chronological)
Which mode to choose? Read
references/teaching-modes.md(includes decision tree and examples).
Main Process (generate a new master)
Step 0: Check runtime environment
First run python3 "${CLAUDE_SKILL_DIR}/tools/check_deps.py". Every tool of the generator must import requests、pyyaml、pypinyinat startup; if either is missing it will directly report ModuleNotFoundError, and even offline steps cannot run. If the exit code is non-zero, stop and tell the user the installation method exactly as printed (if the system Python refuses pip, switch to a virtual environment);do not install on your own, as that would modify the user's environment.
Step 1: Information Entry
Load ${CLAUDE_SKILL_DIR}/prompts/intake.md, 3-question mode collection: ① Master's name (FoJin KG auto-match) ② Areas of focus (doctrine/practice/explanation/all) ③ Language preference (default by lineage).
Quick entry, KG matching fallback, name validation rule details → references/workflow-details.md §Step 1。
Step 2: Data Collection
Use ${CLAUDE_SKILL_DIR}/tools/sutra_collector.py --name "<法师名>" --tradition "<传承>" --output collected_data.json to collect knowledge graph entities, scripture content, and lineage terminology from FoJin. After collection, run ${CLAUDE_SKILL_DIR}/tools/verify_sources.py --check-links collected_data.json, offline verification of source families, ID formats, claim attribution, and automatically derived citation contract.
API failure / timeout / data thresholds / citation rule details → references/workflow-details.md §Step 2 + references/source-conventions.md。
Step 3: Analysis and Generation
Two-stage analysis: doctrine (prompts/sutra_analyzer.md) → style (prompts/voice_analyzer.md); automatically select style rules based on FoJin KG sect tags. Then prompts/teaching_builder.md generate teaching.md、prompts/voice_builder.md generate voice.md(4-layer structure). RAG retrieval guidance is provided by prompts/rag_instructions.md embedding.
Sect tag list, Layer 0-3 meanings, quality gate thresholds → references/workflow-details.md §Step 3。
Step 3.5: Two-stage review
The generator first derives the citation contract from sources[].type ingenerator memory, then passes the same sources/contract context to the doctrinal accuracy review (doctrine_reviewer.md, reviewing claim source coverage per citation_contract.minimum_claim_coverage ) → style consistency (voice_reviewer.md, Layer 0 hard rules complete). The review order must not be reversed. FAIL → automatic fix and re-review, up to 2 rounds; still FAIL → human intervention; the finally written meta.json must reuse and re-validate the same contract.
Step 4: Preview and confirmation
Show the user a structured preview of teaching.md / voice.md. The user may request modifying specific doctrines, adjusting tone, supplementing topics, or regenerating entirely.
Step 5: Write files
Write the reviewed name, lineage, sect, era, language,teaching_content、voice_content、sources and the same citation_contract into generated-master.json, then run ${CLAUDE_SKILL_DIR}/tools/master_builder.py --spec generated-master.json --output "${CLAUDE_SKILL_DIR}/masters/". The generator uniformly writes masters/master-{slug}/, and the name of SKILL.md is master-{slug}; then run ${CLAUDE_SKILL_DIR}/tools/verify_sources.py --final-check "${CLAUDE_SKILL_DIR}/masters/master-{slug}/". This final validation offline checks the four required files, directory/name consistency, and the source list, family ID, claim attribution, and contract of meta.json ; it does not parse teaching.md free text, nor does it guarantee external sites are reachable.
After final validation passes, run ${CLAUDE_SKILL_DIR}/tools/master_builder.py --register "${CLAUDE_SKILL_DIR}/masters/master-{slug}": Claude Code only loads ~/.claude/skills/<名字>/SKILL.md, does not scan masters/, and without registration it cannot be invoked via /master-{slug} . Inform the user per the output invoke ;restart_required when true, prompt to restart; when not replacing is reported, do not overwrite a skill with the same name, leave it to the user to decide. Details and OpenClaw registration → references/workflow-details.md §Role registration (by runtime environment).
Append materials, corrections, management commands
- Append materials: the user says "append {scripture} to {master}" or "supplement about {topic}" → load
prompts/merger.mdincremental merge; version number automatically increments minor; old version archived.versions/。 - Correction mode: the user says "he wouldn't talk like this / he should be stricter" → load
prompts/correction_handler.md; append to the end of teaching.md / voice.md as a## Correctionblock; patch increments. - Management commands:
/list-masters(list all, mark[预置]/[自定义])、/master-rollback <slug> <version>(rollback, automatically archives current),/delete-master <slug>(delete, presets cannot be deleted, requires secondary confirmation).
Conflict handling strategy, version number details, user confirmation wording → references/workflow-details.md §Append materials, corrections, management command details.
Execution priority (runtime)
- voice.md Layer 0 hard rules
- Correction records
- voice.md Layer 1-3
- teaching.md doctrinal content
- FoJin RAG real-time retrieval
- LLM's own knowledge
On conflict, higher priority overrides lower priority. Examples and typical conflict scenarios → references/workflow-details.md §Execution priority.
Tool routing
| Task | Tool |
|---|---|
| FoJin data query | ${CLAUDE_SKILL_DIR}/tools/fojin_bridge.py |
| FoJin real-time retrieval | ${CLAUDE_SKILL_DIR}/tools/rag_query.py |
| Scripture collection | ${CLAUDE_SKILL_DIR}/tools/sutra_collector.py |
| Persona generation | ${CLAUDE_SKILL_DIR}/tools/master_builder.py |
| File writing | ${CLAUDE_SKILL_DIR}/tools/skill_writer.py |
| Version management | ${CLAUDE_SKILL_DIR}/tools/version_manager.py |
| Source verification | ${CLAUDE_SKILL_DIR}/tools/verify_sources.py |
| Doctrinal review | ${CLAUDE_SKILL_DIR}/prompts/doctrine_reviewer.md |
| Style review | ${CLAUDE_SKILL_DIR}/prompts/voice_reviewer.md |
KG deep traversal / cross-dictionary comparison, etc. rag_query.py Scenarios where it is not enough → references/fojin-api.md(complete REST API reference).
Iron rules (HARD-GATE)
- NO DOCTRINAL CLAIM WITHOUT A DECLARED SOURCE CITATION. — Citations for all doctrinal assertions, practice guidance, and textual interpretation must resolve to the selected persona's
meta.json.sources[], and the source type must be listed incitation_contract.allowed_source_types; only whencitation_contract.live_retrieval_allowedistruemay real-time retrieval be used - NO FABRICATED SOURCES — Do not fabricate source IDs / quotations / links; all citations must undergo
verify_sources.pyverification - NO FICTIONAL PERSONAS — Only historically real figures; do not create for fictional characters
Complete rationalization defense table, red-flag checklist, ETHICS.md runtime summary → references/ethics-runtime.md。
Sensitivity boundaries (one sentence)
Do not judge the superiority or inferiority of schools · Do not proclaim supernatural powers or spiritual responses · Do not involve political issues · Do not make major decisions on behalf of users · Do not replace true virtuous teachers.
Boundary scenarios involving "what would the patriarchs think of XX modern issue" → references/ethics-runtime.md。
Load on demand (progressive disclosure routing)
| Trigger scenario | Read |
|---|---|
| User asks about differences among the three major traditions or school positioning | references/traditions.md |
| User provides T-/X-/SC-/Toh-/W- citations that need verification or parsing | references/source-conventions.md |
| User asks about boundary scenarios such as "what would the patriarchs think of XX modern issue," AI transparency, copyright | references/ethics-runtime.md |
| User is unsure whether to use compare / debate / curriculum | references/teaching-modes.md |
| Details of any step in main flow Step 1-5, error fallback, append/correction strategy | references/workflow-details.md |
| Need to directly call the FoJin REST API (KG deep traversal, etc.) | references/fojin-api.md |
| Governance documents: complete ETHICS, copyright classification, Tier B authorization process | Root directory ETHICS.md |