Announcing sanskrit-skills: A Sanskrit Toolkit for AI Agents

23 views
Skip to first unread message

Krishna Thapa

unread,
Feb 1, 2026, 8:35:48 PM (9 days ago) Feb 1
to sanskrit-programmers
Namaste everyone,

I am excited to share a new open-source project called sanskrit-skills. It is a modular skill suite that helps AI agents (Claude, Cursor, Gemini, etc.) respond more reliably on Sanskrit.

What is it?
Current LLMs often hallucinate when asked about complex Sanskrit grammar or prosody. sanskrit-skills addresses this by combining deterministic Python tooling (such as sanskrit_parser, vidyut, and chanda) with structured traditional references. 

Key Features:
Sloka: Automated Padachheda, Anvaya, and rigorous Chandas identification using the chanda engine.
Vyakarana: Accurate Paninian analysis of Sandhi, Samasa, and Vibhakti.
Kosha: Lexicon lookups based on Amarakosha and online dictionaries
Sahitya: Context on Mahakavyas, Natakas, and major authors.

Installation

    npx skills add https://github.com/thapakrish/sanskrit-skills -g

Example prompts

> "Analyze the meter of this verse..."
> "Analyze this shloka: वागर्थाविव संपृक्तौ वागर्थप्रतिपत्तये..."
> "What is the sandhi in devālayaḥ?"
> "List synonyms for moon from Amarakosha"

GitHub Repothapakrish/sanskrit-skills

I’d really appreciate feedback, issue reports, and suggestions for additional corpora/golden cases.

Dhanyavadah,
Krishna

Anunad Singh

unread,
Feb 4, 2026, 9:41:40 AM (6 days ago) Feb 4
to sanskrit-p...@googlegroups.com
Thank you for taking this project and taking it to this point. Hope many more such projects will come for Indian languages.

As far as installing and testing it is concerned, I used Google colab to install and run it. I submitted the following prompt to the Gemini assistant there-
"I want to install and use "Sanskrit Skills Suite for AI Agents" whose installation and use is defined at https://github.com/thapakrish/sanskrit-skills . Please do the needful so that I can install and see its performance."

....and it did the whole thing for me.  I see many things done by it are OK but I feel the following is NOT OK . It also does not show sufficient intelligence (or experience) here.

Sandhi analysis: devālayaḥ
==================================================

Found 5 possible split(s):
  1. devālayas
  2. de + vālayas
  3. devā + alayas
  4. deva + alayas
  5. devā + layas

This is my first feedback.

I would suggest to also provide an example colab notebook so that anybody 
(who has google account) can use it in colab and enjoy.

-- anunAda


--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sanskrit-programmers/b3f50844-4d8b-4030-ac3b-86fab8e94fd4n%40googlegroups.com.

Krishna Thapa

unread,
Feb 6, 2026, 12:56:24 AM (4 days ago) Feb 6
to sanskrit-programmers
Thank you for the feedback!

Do you mind sharing a collab notebook to reproduce the output you received? I tried on my end and I was unable to setup gemini to leverage skills. At a first
glance it looks like the output from a internal tool call (sanskrit_parser library) which is one of the steps taken before reaching a final answer.

As a sanity check, please ask the agent what skills they have before your query. If sanskrit-skills is not among the listed skill then make sure install it.

Below are two example outputs from Codex and Gemini for same query:
a) Codex
> using sanskrit skill, perform Sandhi analysis: devālayaḥ
I’ve loaded the skill instructions; next I’ll verify the split with the local sandhi.py tool so the analysis is grounded in the configured Sanskrit workflow.
• Ran cd /Users/krishna/.agents/skills/sanskrit-skills/shared/scripts && uv run python sandhi.py --split "devālayaḥ"
  └ [engine] backend=sanskrit_parser (+ indic_transliteration) call=Parser().split(to_slp1(text), limit=10)
    … +7 lines
      4. devā + layas
      5. de + vālayas
• Explored
  └ Read sandhi.md
    Search savarna|savarna|dirgha|dIrgha|a \+ A|visarga|विसर्ग|दीर्घ in sandhi.md
-------------------------------------------------------------------------------
• Using sanskrit-skills (routed to vyakarana) because this is a Sandhi request.


  devālayaḥ Sandhi analysis:

  1. deva + ālayaḥ -> devālayaḥ
     Rule: savarṇa-dīrgha sandhi (a + ā -> ā), cf. akaḥ savarṇe dīrghaḥ (6.1.101).
  2. Practical split (with ending shown in parser form): deva + ālayas
     The final -s is surface-realized as -ḥ in pausa, giving devālayaḥ.

  Meaning: “temple” (literally, “abode of a deity”).

b) Gemini
> using sanskrit skill, perform Sandhi analysis: devālayaḥ
I will use the sandhi.py script to confirm the join of "deva" and "ālayaḥ" and then provide a complete analysis.
│ ✓  Shell uv run python sandhi.py --join "deva" "ālayaḥ" [in /Users/krishna/.gemini/skills/sanskrit-skills/shared/scripts]                                                        
│ [engine] backend=internal_sandhi_rules (+ indic_transliteration) call=join_sandhi(word1, word2)                                                                                  
│ Joining: deva + ālayaḥ                                                                                                                                                          
│ Result:  devālayaḥ        
                                                                                                                                                     
✦ The Sandhi analysis for devālayaḥ (देवालयः) is as follows:
  1. Component Words (Padapāṭha)
  The word is formed by joining:
  deva (देव) + ālayaḥ (आलयः)
   * deva: Nominal stem meaning "god" or "deity".
   * ālayaḥ: Nominal stem meaning "abode", "house", or "receptacle".

  2. Phonetic Analysis
   * Pūrva-varṇa (Final sound of 1st word): अ (a)
   * Para-varṇa (Initial sound of 2nd word): आ (ā)
   * Sandhikārya (The change): The two similar vowels combine to form a single long vowel (Dīrgha).
   * Resulting Sound: आ (ā)

  3. Grammatical Rule
  This is a Savarna-dīrgha Sandhi (सवर्णदीर्घ सन्धि) — Similar Vowel Lengthening.
   * Pāṇini Sūtra: अकः सवर्णे दीर्घः (akaḥ savarṇe dīrghaḥ — 6.1.101).
   * Rule: When a vowel of the ak pratyāhāra (अ, इ, उ, ऋ, ऌ) is followed by a similar vowel (savarṇa), both are replaced by a single long vowel.

  4. Meaning
  devālayaḥ = "The abode of the gods" (Temple).

  In terms of Samāsa (Compound), this is a Ṣaṣṭhī-Tatpuruṣa compound:
   * Vigraha: देवानाम् आलयः (devānām ālayaḥ) — The house of the gods.

As you can see, different agents present the final answer a slightly differently but their analysis follows a pattern baked into the skills (trace of library calls, web searches, citations). 

-- Krishna


Anunad Singh

unread,
Feb 6, 2026, 1:28:47 AM (4 days ago) Feb 6
to sanskrit-p...@googlegroups.com
Please find the colab notebook and its pdf version attached.

-- anunAda

Sanskrit_Skills_Suite_for_AI_Agents.ipynb
Sanskrit_Skills_Suite_for_AI_Agents.pdf
Reply all
Reply to author
Forward
0 new messages