agentsclimarketplace

Vyakarana

Skill thapakrish/sanskrit-skills/sanskrit-skills/vyakarana

Sanskrit grammar analysis including sandhi (euphonic combinations), samasa (compounds), vibhakti (case declensions), dhatu (verbal roots), pratyaya (suffixes), and lakara (tenses/moods). Use when explaining Sanskrit grammar rules, breaking down word formations, analyzing declensions or conjugations, identifying compound types, or teaching Paninian grammar concepts.From its SKILL.md

Install
npx -y skills add thapakrish/sanskrit-skills --skill vyakarana

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

7.1 KB, ~2.4k tokens by cl100k_base, as published. Nobody here has run it

Vyakarana (Sanskrit Grammar)

Analyze and explain Sanskrit grammatical constructions following the Paninian tradition.

Provenance & Accuracy

  • Narrate: Explain if you are using a local script (sandhi.py), a web lookup (Ashtadhyayi.com), or your own inference.
  • Verify: Check derived rules against references/sandhi.md or web sources. If a Sutra is not verified, describe the rule phonetically (e.g., "Guṇa: a + i = e") without inventing a Sutra number.
  • Label: Clearly mark inferred derivations or simplified analogies (e.g., "This is a simplified explanation...").

Analysis Workflow

When analyzing a word or explaining grammar:

1. Identify the Word Type

  • Subanta (nominal): Ends in a case suffix (सुप्)
  • Tiganta (verbal): Ends in a verbal suffix (तिङ्)
  • Avyaya (indeclinable): No inflection

2. For Subanta (Nominals)

प्रकृति (stem) + प्रत्यय (suffix) = पद (word)

Identify:

  • Pratipadika (nominal stem)
  • Linga (gender): पुंल्लिङ्ग, स्त्रीलिङ्ग, नपुंसकलिङ्ग
  • Vacana (number): एकवचन, द्विवचन, बहुवचन
  • Vibhakti (case): प्रथमा through सप्तमी + सम्बोधन

3. For Tiganta (Verbals)

धातु (root) + विकरण (class marker) + तिङ् प्रत्यय (personal ending)

Identify:

  • Dhatu (root) with gana (class 1-10)
  • Lakara (tense/mood): लट्, लिट्, लुट्, etc.
  • Pada (voice): परस्मैपद, आत्मनेपद, उभयपद
  • Purusha (person): प्रथम, मध्यम, उत्तम
  • Vacana (number)

4. For Samasa (Compounds)

Break down showing:

  • Component words (पूर्वपद, उत्तरपद)
  • Compound type (see references/samasa.md)
  • Vigrahavakya (dissolution)

5. Apply Sandhi Rules

When forms combine, identify:

  • Type of sandhi (स्वर, व्यञ्जन, विसर्ग)
  • Rule applied
  • Original forms

Quick Reference Tables

Vibhakti (Case) Meanings

CaseNameKarakaMeaningMarkers
1प्रथमाकर्ताsubject, nominative-स्, -औ, -अस्
2द्वितीयाकर्मobject, accusative-अम्, -औ, -अस्
3तृतीयाकरणby/with, instrumental-आ, -भ्याम्, -भिस्
4चतुर्थीसम्प्रदानto/for, dative-ए, -भ्याम्, -भ्यस्
5पञ्चमीअपादानfrom, ablative-अस्, -भ्याम्, -भ्यस्
6षष्ठीसम्बन्धof, genitive-अस्, -ओस्, -आम्
7सप्तमीअधिकरणin/on/at, locative-इ, -ओस्, -सु

Lakara (Tense/Mood) Overview

LakaraNameUsage
लट्वर्तमानPresent tense
लङ्अनद्यतन भूतPast (not today)
लुङ्सामान्य भूतAorist (general past)
लिट्परोक्ष भूतPerfect (unwitnessed past)
लुट्अनद्यतन भविष्यत्Periphrastic future
लृट्सामान्य भविष्यत्Simple future
लोट्आज्ञाImperative
विधिलिङ्विधिOptative (should)
आशीर्लिङ्आशीःBenedictive (blessing)
लृङ्सङ्केतConditional

Scripts

Utility scripts in shared/scripts/. Libraries: indic-transliteration, sanskrit_parser, vidyut.

cd shared/scripts
uv sync

Usage

# Transliteration
uv run python transliterate.py "संस्कृतम्" devanagari iast  # → saṃskṛtam
uv run python transliterate.py "rāma" iast devanagari       # → राम

# Sandhi
uv run python sandhi.py --split "devālayaḥ"
uv run python sandhi.py --join "deva" "ālaya"  # → devālaya

# Prakriya (Derivation)
uv run python prakriya.py subanta rAma Pum Prathama Eka
uv run python prakriya.py tinanta gam 1 Kartari Prathama Eka Lat

# Dhatu lookup
uv run python dhatu.py bhū
uv run python dhatu.py --gana 1
uv run python dhatu.py --search "to go"

References

For detailed rules, see:

Example Analysis

Word: गच्छति

Analysis:

धातु: √गम् (गतौ) - 1st gana (भ्वादि)
विकरण: शप् (→ अ)
लकार: लट् (वर्तमान)
पद: परस्मैपद
पुरुष: प्रथम
वचन: एकवचन

Formation: गम् + शप् + ति
           गम् + अ + ति
           गच्छ् + अ + ति  (गम् takes the present stem गच्छ्)
           = गच्छति

Word: राज्ञः

Analysis:

प्रातिपदिक: राजन् (m. king)
लिङ्ग: पुंल्लिङ्ग
वचन: एकवचन
विभक्ति: षष्ठी (genitive) OR पञ्चमी (ablative)

Formation: राजन् + अस् (षष्ठी/पञ्चमी एकवचन)
           राज् + ञ् + अस् (न् → ञ् before अस्)
           = राज्ञस् → राज्ञः (विसर्ग)

Compound: नीलोत्पलम्

Analysis:

समास: कर्मधारय (विशेषणपूर्वपद)
विग्रह: नीलम् उत्पलम् (a blue lotus)
पूर्वपद: नील (adj. blue)
उत्तरपद: उत्पल (n. lotus)
सन्धि: नील + उत्पल → नीलोत्पल (गुण सन्धि: अ + उ = ओ)

Related Skills

NeedUse
Full verse analysissloka
Word meanings, synonymskosha
Literary contextsahitya
Shared scripts/referencesshared

What ships with it: 6 files

52.1 KB alongside SKILL.md

references/

Keep looking

Skills are one crate of 326,851. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.