Ancient near east research

From tdimino/claude-code-minoan · View interactive version

Ancient near east research is an AI agent skill from the GitHub repository tdimino/claude-code-minoan. Academic research skill for Biblical Hebrew, Semitic linguistics, cuneiform studies, and comparative Ancient Near Eastern research. Provides Sefaria API for Hebrew Bible, CDLI/ORACC for cuneiform databases, and web discovery via Omnisearch, Exa, Firecrawl, and Obscura for finding scholarly sources a

How to use this skill

Skill file

Additional Triggers

This skill should also be activated for:

Ancient Near East Research

Academic research assistant for Biblical Hebrew, Semitic linguistics, and comparative Ancient Near Eastern studies.

Core Capabilities

  1. Sefaria API - Fetch Hebrew Bible passages with vocalization, translations, and commentaries
  2. Hebrew Text Handling - Proper display of Hebrew with cantillation marks (טעמים)
  3. Cross-referencing - Link Biblical texts to Talmud, Midrash, and commentaries
  4. Citation Formatting - Academic citation styles for primary sources
  5. Cuneiform Databases - Access CDLI and ORACC for Akkadian/Sumerian primary sources

Sefaria API Usage

Fetching Texts

To retrieve a passage, use the Sefaria API endpoint:

https://www.sefaria.org/api/v3/texts/{reference}

Reference Format:

Examples:

Running the Fetch Script

For formatted output with Hebrew text and translation:

python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_sefaria.py "Genesis 1:1-3"
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_sefaria.py "Exodus 20:2" --hebrew-only
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_sefaria.py "Isaiah 45:7" --with-rashi

Direct API Calls

# Basic verse fetch
curl -s "https://www.sefaria.org/api/v3/texts/Genesis.1.2"

# Search for Hebrew term
curl -s "https://www.sefaria.org/api/search-wrapper?query=תהום&type=text&filters=Tanakh"

Key Passages for ANE Comparative Research

See references/hebrew-passages.md for detailed passage tables and commentaries.

Core passages: Genesis 1:2 (Tehom), Isaiah 27:1 (Leviathan), 1 Kings 18:19 (Asherah), Amos 9:7 (Caphtor)

Cuneiform Database Resources

See references/cuneiform-databases.md for CDLI/ORACC API details and script commands.

Quick access:

Web Discovery & Source Extraction

Source Escalation Ladder

| Tier | Tool | When | ANE Examples |

|------|------|------|--------------|

| 0 | Sefaria / CDLI / ORACC | Known reference, free structured data | Genesis 1:2, P480701, deity lookup |

| 1 | Omnisearch --academic | Broad discovery, unknown sources | "Minoan Semitic connections Bronze Age" |

| 2 | Exa --domains (no category) | Domain-filtered neural search | --domains jstor.org,persee.fr |

| 3 | Firecrawl scrape / parse | Page extraction, PDF-to-markdown | Known URL, remote PDF |

| 4 | Obscura ane_stealth_fetch.sh | Bot-protected sites | JSTOR, Scholar, Persée |

| 5 | Scrapling | Cloudflare Turnstile | Last resort |

Tier 1: Omnisearch (Broad Discovery)

When the omnisearch skill is available, use it as the entry point for finding new scholarship. The --academic flag routes to Exa's publication index.

# Broad ANE topic discovery
python3 ~/.claude/skills/omnisearch/scripts/omnisearch.py "Minoan Semitic linguistic connections" --academic

# Parallel multi-provider search for corroboration
python3 ~/.claude/skills/omnisearch/scripts/omnisearch.py "Thera eruption Tempest Stela" --parallel --no-text

# News about recent archaeological finds
python3 ~/.claude/skills/omnisearch/scripts/omnisearch.py "Knossos excavation 2025" --news

Tier 2: Exa Neural Search (Domain-Filtered)

Direct Exa search with ANE-specific domain lists and the publication category. Use when omnisearch is unavailable or when more control over domains and filtering is needed.

python3 ~/.claude/skills/exa-search/scripts/exa_search.py "Asherah cult Ugarit" \
  --category publication \
  --domains jstor.org persee.fr perseus.tufts.edu academia.edu \
  -n 20 --no-text

ANE Domain List:

| Domain | Content |

|--------|---------|

| jstor.org | Journals: BASOR, JBL, JNES, JAOS, VT, IEJ |

| persee.fr | French academic: BCH, Syria, RHR |

| academia.edu | Pre-prints and working papers |

| perseus.tufts.edu | Classical texts (Greek, Latin primary sources) |

| sefaria.org | Hebrew Bible and rabbinic literature |

| cdli.earth | Cuneiform Digital Library |

| oracc.museum.upenn.edu | Open Richly Annotated Cuneiform Corpus |

| etana.org | Electronic Tools and ANE Archives |

| asor.org | American Schools of Oriental Research |

Pre-Built ANE Search Queries:

| Theme | Query |

|-------|-------|

| Thera | "Thera eruption" OR "Santorini eruption" Bronze Age |

| Knossos | "Knossos palace" OR "Minoan archaeology" ritual |

| Minos | "Moses Minos" OR "Daedalus Bezalel" OR "Minoan law" |

| Palestine | "Asherah Ugarit" OR "Athirat" OR "Tehom Tiamat" |

| Linguistics | "Semitic etymology" OR "Hellenosemitica" OR "begadkephat" |

Similar Page Discovery:

python3 ~/.claude/skills/exa-search/scripts/exa_search.py \
  "scholarship like Day, 'Asherah in the Hebrew Bible and Northwest Semitic Literature' (JBL 1986)" \
  --category publication -n 15 --highlights --no-text

Tier 3: Firecrawl (Page Extraction & PDF Parsing)

For extracting content from known URLs and parsing remote PDFs.

# Scrape an academic page
firecrawl scrape "https://www.persee.fr/doc/..." --only-main-content

# Parse a remote PDF (Fire-PDF v2.9)
python3 ~/.claude/skills/firecrawl/scripts/firecrawl_api.py scrape \
  "https://example.com/paper.pdf" --pdf-mode auto

# Search + scrape in one operation
firecrawl search "Cyrus Gordon Minoan Semitic" --scrape --limit 10

Tier 4: Obscura Stealth Extraction (Bot-Protected Sites)

For JSTOR, Google Scholar, Persée, Perseus, and Academia.edu. Extracts publicly visible metadata and abstracts — not for bypassing paywalls.

# Auto-detect site type from URL
bash ~/.claude/skills/ancient-near-east-research/scripts/ane_stealth_fetch.sh URL

# Google Scholar search
bash ~/.claude/skills/ancient-near-east-research/scripts/ane_stealth_fetch.sh \
  "https://scholar.google.com/scholar?q=minoan+semitic+etymology" scholar

Supported site types: scholar, pubmed, jstor, persee, perseus, academia, cdli, oracc, sefaria, general

See references/obscura-ane-patterns.md for site-specific extraction patterns and gotchas.

Complete Research Pipeline

Topic Question
    ↓
Tier 0: Check Sefaria / CDLI / ORACC (known references)
    ↓
Tier 1: Omnisearch --academic (broad discovery, titles only)
    ↓
Tier 2: Exa --domains [ANE list] (focused search; no --category publication)
    ↓
Pick URLs → Tier 3: Firecrawl scrape / parse (extract content)
    ↓
Bot-blocked? → Tier 4: Obscura ane_stealth_fetch.sh (stealth extraction)
    ↓
PDF downloaded → Mistral OCR → Quotations DB → Themed Compilation

Akkadian Terms and Enuma Elish

See references/akkadian-terms.md for comprehensive Akkadian terminology, Enuma Elish passages, and Hebrew-Akkadian cognate pairs.

Key cognate: תְּהוֹם (Tehom) ↔ Ti'āmat

Research Context

This skill supports comparative research across:

See references/gordon-papers/gordon-findings.md for Gordon's Minoan-Semitic connections.

Translation Philosophy

Always be literal. Preserve Hebrew terms rather than translating to generic English equivalents. This maintains etymological connections crucial for comparative ANE research.

| Hebrew | Literal | NOT Generic |

|--------|---------|-------------|

| אֱלֹהִים | Elohim | God |

| יהוה | YHWH | the LORD |

| תְּהוֹם | Tehom | the deep |

| תְּהֹמוֹת | Tehomot | the depths |

| תַּנִּינִים | Tanninim | sea monsters |

| לִוְיָתָן | Leviathan | — |

| רוּחַ אֱלֹהִים | Ruach Elohim / Spirit of Elohim | Spirit of God |

This approach preserves the cognate relationships (Tehom ↔ Tiamat, Tanninim ↔ Ugaritic tnn) that are obscured by conventional translations.

Classical Phoenician/Ugaritic Pronunciation

For etymological analysis, use pre-begadkephat pronunciation (פ as /p/ not /f/):

| Hebrew | Modern | Classical | Significance |

|--------|--------|-----------|--------------|

| תִּפְאֶרֶת | tif'eret | tip'art | Connects to πορφύρα via p-r root |

| כַּפְתּוֹר | Kaftor | Kaptaru | = Caphtor = Crete |

| פָּרוֹכֶת | parokhet | parukatt | Temple veil, cognate analysis |

This preserves etymological connections obscured by later pronunciation shifts (e.g., tip'eret → purpura).

Output Formatting

When presenting Hebrew text in research:

בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ
"In the beginning Elohim created the heavens and the earth" (Genesis 1:1)

For academic citations:

Integration with Research Workflow

This skill connects to the quotations compilation system at:

~/Desktop/Athirat, Knossos, & Minos/

Generated quotations can be added to the themed compilation by:

  1. Saving output as markdown in the Snippets/ directory
  2. Adding **Category: [Theme]** header (Thera, Knossos, Minos, Palestine, Linguistics)
  3. Running python3 compile_themed_quotations.py

Resources

Scripts

Mistral OCR Usage

Convert PDFs to Markdown using Mistral's Pixtral vision model:

# Basic usage (requires MISTRAL_API_KEY env var)
python3 ~/.claude/skills/ancient-near-east-research/scripts/mistral_ocr_pdf.py document.pdf

# Specify output file
python3 ~/.claude/skills/ancient-near-east-research/scripts/mistral_ocr_pdf.py document.pdf -o output.md

# OCR specific pages
python3 ~/.claude/skills/ancient-near-east-research/scripts/mistral_ocr_pdf.py document.pdf --pages 1-50

# Process large PDFs in chunks (requires PyMuPDF)
python3 ~/.claude/skills/ancient-near-east-research/scripts/mistral_ocr_pdf.py large.pdf --chunked --chunk-size 20

Requirements: uv pip install mistralai --system (and PyMuPDF for chunked mode)

References

Active Paper Project

This skill supports a 3-part academic paper series: "Thera, Knossos, and Minos: Minoan-Semitic Connections in the Ancient Mediterranean"

Part I: Thera (in progress): Thera eruption → Greek sources → Astour's etymologies → Tehom-Tiamat → Athirat of the Sea → Thera the Goddess → purple etymology (tip'eret)

Part II: Knossos/Knossot (planned): Palace culture, Linear A, Daedalus-Bezalel, kaftôrîm, priestess traditions

Part III: Minos/Manna/Moses (planned): Moses-Minos parallels, law-giver traditions, Gaza as Minoa, Manat the Goddess

Active repo: ~/Desktop/Thera-Knossos-Minos-Paper/

Cuneiform Script Usage

See references/cuneiform-databases.md for full script commands and ORACC project reference.

Quick commands:

python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_cuneiform.py cdli P480701
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_cuneiform.py deity tiamat
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_cuneiform.py oracc-projects

JSTOR Browser Automation

Prefer Obscura stealth fetch (Tier 4) or Exa search (Tier 2) for JSTOR metadata and abstracts. This script is retained for cases requiring authenticated full-text download.

Access JSTOR scholarly database using browser automation via agent-browser. Requires a JSTOR account with download privileges.

See references/jstor-research.md for URL patterns and search strategies.

First-Time Setup

Authenticate with JSTOR (opens browser for manual login):

python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_jstor.py login

Auth state is saved to ~/.jstor-auth.json and reused for subsequent commands.

JSTOR Commands

# Check authentication status
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_jstor.py status

# Search for articles
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_jstor.py search "minoan semitic etymology" -n 20

# List saved articles (My Library)
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_jstor.py saved

# List recently read articles
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_jstor.py recent

# Get article metadata
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_jstor.py article https://jstor.org/stable/12345

# Download PDF to specified directory
python3 ~/.claude/skills/ancient-near-east-research/scripts/fetch_jstor.py download https://jstor.org/stable/12345 -o ~/sources/

Research Pipeline

JSTOR integrates with the existing OCR and quotations workflow:

JSTOR Search → Download PDFs → Mistral OCR → Quotations DB → RAG Dossiers

Example workflow:

# 1. Search JSTOR
python3 fetch_jstor.py search "Cyrus Gordon minoan" --json > results.json

# 2. Download interesting article
python3 fetch_jstor.py download https://jstor.org/stable/528927 -o ~/sources/gordon/

# 3. OCR the PDF
python3 mistral_ocr_pdf.py ~/sources/gordon/jstor-528927.pdf -o ~/sources/gordon/article.md

# 4. Extract quotations and add to database
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.