xr843/Master-skill

FoJin-powered Buddhist AI persona framework — source-grounded, boundary-aware, fidelity-tested, runtime-ready.

What is Master‑skill?

Master‑skill is an open‑source “AI persona” framework that lets you talk to virtual representations of 15 historic Buddhist masters (e.g., Nāgārjuna, Huineng, Ajahn Chah). Each persona is built on top of a large language model (LLM) that is ground‑checked against real Buddhist scriptures:

  • The system stores offline excerpts of canonical texts (CBETA, BDRC, SuttaCentral, etc.).
  • When a user asks a question, the model first retrieves the most relevant passage from the FoJin knowledge base (10 k+ texts, 678 k semantic vectors) and then generates a reply that must cite the source ID of the passage.
  • A hard‑gate in the prompt forces every doctrinal statement to be accompanied by a citation; a second audit step checks that the cited ID really exists.

The personas are packaged as AgentSkills – a standard defined by Anthropic for plug‑in‑style LLM extensions. They can be run in several developer environments (Claude Code, Cursor, Codex CLI, OpenCode, Gemini CLI) via a tiny npm wrapper (master‑skill) that installs the skill files into the appropriate ~/.claude/skills/ directory.


Key features

Feature What it means for a user / developer
15 pre‑built masters One‑click commands like /master‑huineng give you a chat‑style assistant that answers exactly as that historical figure would, using their own doctrinal language.
Source‑grounded answers Every claim is followed by a canonical reference (CBETA, BDRC, Toh, PTS, SuttaCentral). If the live FoJin service can provide a text_id, a link to the exact passage is added; otherwise the offline excerpt is used.
Four teaching modes /compare‑masters (side‑by‑side view), /master‑debate (multi‑turn debate between two masters), /master‑curriculum (study‑path recommendation), and /master‑help (who should answer your question). These require the terminal installation.
Rigorous testing 240 fixture tests check that the model returns the required keywords and citations. Automated CI runs fidelity checks, and a second manual adjudication step records PASS/FAIL with hash verification.
AgentSkills compliance Implements Anthropic’s AgentSkills spec (progressive disclosure, decision‑tree prompts, hard‑gate citation contract).
Cross‑platform install npx master‑skill install … works for Claude Code, Cursor, Codex CLI, OpenCode and Gemini CLI. A Rust‑based desktop manager is also provided for local quality‑control.
Security & provenance npm provenance, OIDC trusted publishing, CodeQL, cargo‑audit, pip‑audit, and SHA‑pinned GitHub Actions are listed in the README.

Who might use it?

  • Buddhist students or scholars who want quick, citation‑backed answers from a specific tradition without digging through raw sutras.
  • Developers building AI‑augmented study tools – they can import the pre‑built skills or create new “master” personas with /create‑master while staying within the same citation contract.
  • LLM platform users (Claude, Gemini, etc.) who need a ready‑made plug‑in that demonstrates responsible RAG (retrieval‑augmented generation) with strict provenance.

How to get started (quick)

  1. Open the web demo – no install needed: https://fojin.app/chat and select 法师模式.
  2. For a local CLI experience, run:
    npx master-skill install --all   # installs every master skill
    npx master-skill list            # shows the available commands
    
  3. In a Claude Code or Cursor session type /master‑huineng (or any other master) and ask your question.

Limitations & safety

  • The answers are AI‑generated; they are not direct quotations from the historical masters.
  • The system deliberately refuses to give sectarian judgments, political commentary, or any claim that goes beyond the cited source.
  • If a user shows signs of self‑harm, the bot will provide a crisis‑hotline instead of continuing the discussion.

License & community

  • Code: MIT.
  • Content (the pre‑written prompts, citations, and excerpts) is released under Creative Commons BY‑NC‑SA 4.0.
  • Contributions are welcome – see CONTRIBUTING.md for the review workflow that includes copyright‑tier checks and boundary‑violation reporting.

In short: Master‑skill is a rigorously audited, citation‑driven AI persona framework that lets you converse with virtual Buddhist masters, and it can be plugged into several major LLM environments via the AgentSkills standard.

Related

  • Project
  • Project
  • Project
  • Project
  • Project