master-skill
A skill that builds AI teaching personas of specific Buddhist masters, grounded in Buddhist scripture texts and tested for fidelity to their teachings. It includes ethics gates for boundaries on what the persona will say.
xr843/fojin is a Buddhist digital text platform with full-text search, AI question answering over cited sources, and a knowledge graph across trilingual canons. It ships skills, including sutra-commentary for comparing how classical commentators explained a passage.
Claude Code
$ npx -y skills add xr843/fojin --agent claude-code
Codex
$ npx skills add xr843/fojin -a codex
Cursor
$ npx skills add xr843/fojin -a cursor
Gemini CLI
$ npx skills add xr843/fojin -a gemini-cli
GitHub Copilot
$ npx skills add xr843/fojin -a github-copilot
OpenCode
$ npx skills add xr843/fojin -a opencode
Windsurf
$ npx skills add xr843/fojin -a windsurf



AI Q&A grounded in the world's largest open aggregation of Buddhist texts: 600+ sources, 30+ languages, trilingual cross-canon retrieval — every answer linked back to its source passage.
Ask a question in plain language and FoJin's assistant "XiaoJin" answers from the canon itself — Retrieval-Augmented Generation over 660K+ embedded passages, optional cross-encoder reranking and root-sutra recall, clickable 【《sutra》juan N】 citations that open the exact source text, anti-hallucination guards, and a citation drawer with side-by-side 汉 / 巴利 / 藏文 cross-canon parallels. You can also ask in the voice of 15 historical Buddhist masters, each scoped to their own tradition's scriptures.
What makes those answers trustworthy is the corpus underneath. FoJin aggregates 660+ data sources into one searchable platform — 11,600+ texts with 25,000+ volumes of full content in Classical Chinese, Pali, Tibetan and Sanskrit (including every CBETA collection that may be redistributed), the first LLM-driven trilingual cross-canon parallel reading platform (CBETA × SuttaCentral × 84000) with LLM-verified chunk-level alignment, a 110K+ entity knowledge graph on a Deck.GL geo map, and 39 dictionaries with 747K entries. Every feature exists to make the answers more grounded — and to let you go deeper once you have one.
FoJin is built to be open, cross-canon, verifiable Buddhist knowledge infrastructure — not just a site to read, but a corpus other tools can call. Every passage carries a stable, resolvable cross-canon URN (fojin:cbeta/T0001.1), and the fojin-mcp server lets AI assistants (Claude, ChatGPT, any MCP client) answer from FoJin's cited passages directly — hosted at mcp.fojin.ai, anonymous, no key required. Any model can also check its own work through the open /api/verify/quote endpoint: hand it a sentence and a citation, and it answers is this quote real and is the citation right as two separate questions. See fojin.ai/developers.
For people rather than models, fojin.ai runs the same check on a whole passage: paste an article, a viral "the Buddha said…", or an AI's answer, and it marks sentence by sentence what is in the Chinese canon and where — sutra, treatise, commentary or a school's own works — and what is not; every source opens the reader at that line with the passage highlighted.
Live Demo · fojin.ai — is this from the canon? · API Docs · 中文文档 · Discussions · Discord · Report Bug
Buddhist texts are scattered across hundreds of databases worldwide — CBETA, SuttaCentral, BDRC, SAT, 84000, GRETIL, and many more. Each has its own interface, language, and data format. When you have a question — "what does the Heart Sutra mean by 'form is emptiness'?", "how do the Pali and Chinese versions of this passage differ?" — you spend more time hunting for the right passage than understanding it.
FoJin answers the question for you. Ask in plain language; XiaoJin retrieves the relevant passages from 660+ sources and answers with clickable citations you can verify. Everything else FoJin does — full-text reading, cross-canon alignment, the knowledge graph, 39 dictionaries — exists to make those answers more grounded, and to let you go deeper once you have one:
| What you need | How FoJin helps |
|---|---|
| Ask a question, get a sourced answer | AI Q&A ("XiaoJin") — RAG over 660K+ passages, reranking, root-sutra recall, clickable 【《sutra》juan N】 citations, cross-canon citation drawer, anti-hallucination guards; study memory remembers what you read and asked |
| Trust the answer | Verifiable answers — deterministic citation whitelist + verbatim-quote downgrade + per-answer trust state; ~98% of citing answers served-trustworthy at temp 0 |
| Research a hard, multi-step question | Research Assistant (/research) — plans across corpus + dictionaries + knowledge graph, then synthesises a cited answer behind the same guards |
| Call FoJin from an AI assistant | MCP server — hosted at mcp.fojin.ai (no install, no key) or uvx fojin-mcp; 8 read-only, URN-addressable tools for Claude / ChatGPT |
| Check a whole passage against the canon | fojin.ai — paste up to 3,000 characters (an article, a viral quote, an AI answer); every sentence is matched against the Chinese canon, labelled sutra / treatise / commentary / school works / not found, and linked to the exact line, which the reader keeps highlighted; consecutive lines of one source collapse into one passage |
| Check whether a quotation is real | Open verbatim verification (/api/verify/quote) — for any sentence, not just ours: exact / near-miss / absent, with a character-level diff and the right juan when the citation points at the wrong one |
| See how the tradition read a passage | Commentary alignment (/api/commentary/passage) — for one passage, what the historical commentators wrote on it, anchored to juan and line |
| Listen while you read | Read-aloud (/read-aloud) — sentence-by-sentence highlighting synced to audio, lock-screen playback |
| Ask in a master's voice | Master Persona Mode — 15 historical masters, each with tradition-scoped RAG |
| Find a sutra across databases | Multi-dimensional search across 11,600+ texts from 660+ sources, filterable by canon (大正藏, 卍續藏, 嘉興藏, 補編, 藏外, 寺志 …) |
| Read the full text online | 10,000+ texts with 25,000+ volumes of full content, CBETA-style layout, page/column/line references and tables of contents |
| A verified line a day | Daily passage (/daily) — one complete sentence a day, verbatim-checked against the canon, linked to its exact line, with a plain-language reading and a share card |
| Compare translations | Parallel reading in 30+ languages side by side |
| Compare sutras across Buddhist canons | Trilingual cross-canon parallel reading — 4,000+ LLM-verified chunk alignments across Chinese / Pali / Tibetan covering Heart Sutra, Vimalakīrti, Lotus Sutra (法华 ↔ Toh 113, 259 pairs), 8,000-verse Prajñāpāramitā (小品般若 ↔ Toh 11, 127 pairs), Satipaṭṭhāna + the full Āgama ↔ Nikāya corpus (MN/DN/SN/AN), Dhammapada |
| Look up Buddhist terms | 39 dictionaries, 747K entries (Chinese/Sanskrit/Pali/Tibetan/English) |
| Explore relationships | Knowledge graph with 110K+ entities and 27,900+ relations (22K+ lineage chains) |
| Discover similar texts | Semantic similarity powered by 660K+ embedding vectors (pgvector + HNSW) |
| Explore Buddhist geography | Knowledge Graph Map — geo-enabled entities, monastery locations, lineage arcs on Deck.GL |
| Track source updates | Activity Feed — real-time updates from 660+ data sources |
| Explore history visually | Timeline & Dashboard — dynasty charts, translation trends, category analytics |
| Save and organize | Collections, bookmarks, annotations, personal excerpts (select a passage, keep it with a note) |
| Cite in research | CBETA-standard line citations ((CBETA, T08, no. 235, p. 749a9-10)) for every CBETA collection on FoJin, plus BibTeX / RIS / APA export |
git clone https://github.com/xr843/fojin.git
cd fojin
cp .env.example .env # edit POSTGRES_PASSWORD before starting
docker compose up -d # database migrations run automatically
Then visit: http://localhost:3000
API docs at http://localhost:8000/docs
After first startup, the platform has the database schema and source metadata but no text content. To import texts from public data sources:
# Import CBETA catalog (auto-scans local xml-p5 directory or fetches from remote)
docker exec fojin-backend python scripts/import_catalog.py
# Import CBETA full text for the Taishō (T) and Xuzangjing (X) (requires the xml-p5 repository)
docker exec fojin-backend python scripts/import_content.py --collection T --xml-dir /data/xml-p5
docker exec fojin-backend python scripts/import_content.py --collection X --xml-dir /data/xml-p5
# Critical apparatus + page/column/line anchors (for line-level citations)
docker exec fojin-backend python scripts/import_apparatus.py --collection T --xml-dir /data/xml-p5
docker exec fojin-backend python scripts/import_apparatus.py --collection X --xml-dir /data/xml-p5
# The other CBETA collections (嘉興藏, 補編, 藏外 …) — insert-only, skips the copyright-restricted
# collections, stops by itself when the disk reaches 86% and resumes where it stopped. Run --plan first.
docker exec fojin-backend python scripts/import_cbeta_canons.py --xml-dir /data/xml-p5 --plan
docker exec fojin-backend python scripts/import_cbeta_canons.py --xml-dir /data/xml-p5
# Generate embeddings for AI Q&A (supports incremental processing)
docker exec fojin-backend python -m scripts.archive.misc.generate_embeddings --source cbeta
# Import SuttaCentral Early Buddhist Texts
docker exec fojin-backend python scripts/archive/imports/import_suttacentral.py
# See all available importers (one-off importers live under archive/)
ls backend/scripts/archive/imports/
Each importer downloads data directly from the original source (CBETA, SuttaCentral, etc.) — no data is bundled in this repository.
FoJin's verified, cross-canon corpus is callable directly from AI assistants (Claude Desktop, ChatGPT, or any MCP client) via the published fojin-mcp server — so the assistant answers Buddhist questions from FoJin's cited passages instead of hallucinating.
Point any MCP client at the hosted endpoint — nothing to install, no key to get:
claude mcp add --transport http fojin https://mcp.fojin.ai/mcp
Or run it locally over stdio against your own instance:
uvx fojin-mcp # zero-install run
# or: pip install fojin-mcp && fojin-mcp
It exposes nine read-only tools over the public API, each returning passages with a stable, resolvable cross-canon URN (fojin:cbeta/T0001.1):
| Tool | What it does |
|---|---|
search_corpus | Semantic search across the aggregated canon |
read_passage | Read a specific text / volume |
get_parallels | Cross-canon parallels (汉 ↔ 巴利 ↔ 藏) for a passage |
lookup_dictionary | Term lookup across 39 dictionaries |
lookup_entity | Knowledge-graph entity facts |
resolve_urn | Resolve a FoJin URN to its source location |
A skill that builds AI teaching personas of specific Buddhist masters, grounded in Buddhist scripture texts and tested for fidelity to their teachings. It includes ethics gates for boundaries on what the persona will say.
Gives you a research agent that breaks a question into parallel sub-tasks, keeps notes across sessions, and runs code safely, so you can hand off literature review and data analysis instead of doing each step yourself.
Researches what people say about a topic over the last month by pulling posts and engagement from Reddit, X, YouTube, TikTok, Hacker News, Polymarket, GitHub, and the web. Useful for tracking current discussion on any subject.
Helps researchers move a project through the academic pipeline, from literature search and citation handling to drafting, reviewing and checking a paper, with you confirming each stage. You stay the author of every claim.
Gives AI agents a library of ready-made skills for scientific research, covering areas such as bioinformatics, cheminformatics, literature review and molecular dynamics. Each skill lets the agent run a specialized analysis or query a scientific database instead of writing that workflow from scratch.
Install it with the command on its page. It includes sutra-commentary. Its skills do not fire on their own yet. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it