AI Prompts
Curated prompts for AI coding assistants to help you integrate KalimaLab into your projects faster.
These prompts are designed to give AI coding assistants the right context about KalimaLab's API so they can generate accurate integration code. Copy them into your project's AI instructions file or paste them directly into your assistant.
Where to Place Prompts
Each AI coding tool reads instructions from a specific file in your project root:
| Tool | File |
|---|---|
| Cursor | .cursor/rules/*.mdc |
| GitHub Copilot | .github/copilot-instructions.md |
| Claude Code | CLAUDE.md |
| Windsurf | guidelines.md |
| Codex | AGENTS.md |
| Gemini CLI | GEMINI.md |
✓Universal approach
Curated Prompts
Arabic Word Search Integration
Use this prompt when building search interfaces that query Arabic words.
# Arabic Word Search IntegrationYou are integrating KalimaLab's Arabic Words API for word search functionality.## API Details- Base URL: https://api.kalimalab.com/v1- Auth: x-api-key header with klmt_ prefixed key- Endpoint: GET /words?q={query}&limit={limit}&offset={offset}## Requirements- Implement debounced search (300ms) to avoid excessive API calls- Display results in RTL layout with dir="rtl" on the container- Show word, root, pattern, and English meaning for each result- Handle pagination with limit/offset query params- Show loading skeleton while fetching- Handle empty states and API errors gracefully- Cache results for repeated queries using a Map or TanStack QueryArabic Text Analysis
Use this prompt for features that analyze Arabic text content.
# Arabic Text AnalysisYou are building a text analysis feature using KalimaLab's API.## API Details- Base URL: https://api.kalimalab.com/v1- Auth: x-api-key header with klmt_ prefixed key- Endpoints: - POST /text/tokenize (0 DP) — split text into tokens - POST /text/normalize (0 DP) — strip diacritics, standardize Hamza/Alef variants - POST /text/lookup (1 DP/match) — tokenize + dictionary-lookup each token - POST /morphology/analyze (2 DP) — full morphological analysis of a single word- Body: { "text": "Arabic text here" }## Response from /text/lookup includes- tokens: array of tokens with matched lemma, root, pattern, POS, and definition- unmatched: tokens that don't exist in the lemma database## Requirements- Accept Arabic text input via a textarea with dir="rtl"- Show /text/normalize first to clean the input before processing- Call /text/lookup to get per-token dictionary data- Display statistics: total tokens, matched vs unmatched- Show a breakdown table of identified words with their roots and POS- Highlight words in the original text when hovering over table rows- Handle texts up to 5,000 charactersRTL UI with Arabic API
Use this prompt to ensure correct right-to-left layout when displaying Arabic data.
# RTL UI with Arabic APIYou are building a UI that displays Arabic language data from KalimaLab.## API Details- Base URL: https://api.kalimalab.com/v1- Auth: x-api-key header with klmt_ prefixed key## RTL Guidelines- Set dir="rtl" on containers displaying Arabic text- Use logical CSS properties: ps/pe (padding), ms/me (margin), start/end- Use Tailwind RTL modifiers: rtl:rotate-180 for directional icons- Arabic text should use a system Arabic font stack: font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui- Mix LTR (code, English) and RTL (Arabic) with proper isolation: use <bdi> or unicode-bidi: isolate for mixed-direction content- Test with both LTR and RTL layoutsKalimaLab MCP Integration
Use this prompt to give your AI assistant full knowledge of all 7 MCP tools and their parameters.
# KalimaLab MCP IntegrationYou have access to the KalimaLab MCP server — a comprehensive Arabic language intelligence API with 117 endpoints across 25 modules.## Available Tools### search_wordsSearch Arabic lemmas by query string, root, pattern, or POS.Params: q (string), root (string), pattern (string), pos (string), limit (number), page (number)### get_lemmaGet full linguistic details for a specific lemma at a given data tier.Params: lemma (string, required), tier (basic|standard|enriched|full)### get_daily_wordGet the deterministic word of the day (same result all day, resets at midnight UTC).Params: none### get_random_wordsGet random Arabic lemmas for quizzes or discovery.Params: count (number, 1–20)### analyze_morphologyFull morphological analysis: POS, root, pattern, features (case, gender, number, state, voice, mood).Params: word (string, required)### conjugate_verbGet the full conjugation table for an Arabic verb (all persons, genders, numbers, tenses).Params: root (string, required), form (number)### parse_iraabإعراب parse: full dependency tree with classical Arabic grammar labels (فاعل، مفعول به، ...).Params: sentence (string, required)### get_quran_ayahGet a Quran ayah with text in multiple scripts and word-by-word morphology.Params: surah (number, 1–114), ayah (number), morphology (boolean)### search_quranFull-text search across all 6,236 Quran ayahs.Params: q (string, required), limit (number)### get_lemma_formsAll surface forms for a given lemma.Params: lemma (string, required)### validate_wordsCheck if given Arabic strings exist in the lemma database.Params: words (string[], required, max 100)### get_statsReturn API statistics: lemma count, root count, form count, citation count.Params: none## Billing ModelUsage is metered in Data Points (DP), not request counts:- basic tier (1 DP): lemma, POS, primary definition- standard tier (3 DP): + senses, synonyms, patterns- enriched tier (8 DP): + forms, roots, dialects, examples- full tier (20 DP): + all citations, all source metadata- Top 5,000 common words served at 0 DP from server-side cache- Morphological analysis: 2 DP · إعراب parse: 8 DP · Quran ayah: 1–2 DP## Usage Notes- All responses follow { data, error, meta } envelope format- Arabic text is returned in UTF-8 with full diacritics (tashkeel) where available- DP budget: check X-RateLimit-Remaining response header- Free plan: 500 DP/day, no credit card requiredArabic Vocabulary App
Use this prompt when building vocabulary learning or flashcard applications.
# Arabic Vocabulary AppYou are building a vocabulary learning app with KalimaLab's API.## API Details- Base URL: https://api.kalimalab.com/v1- Auth: x-api-key header with klmt_ prefixed key## Key Endpoints- GET /words/daily — deterministic word of the day (0 DP if cached)- GET /words/random?count=10 — random lemmas for quizzes (1 DP each)- GET /words/:lemma?tier=basic — lemma + POS + primary definition (1 DP)- GET /words/:lemma?tier=standard — + senses, synonyms, patterns (3 DP)- GET /words/:lemma/forms — all surface forms for a lemma- GET /words/:lemma/relations — synonyms and antonyms- GET /words?q={query} — full-text search- GET /words/autocomplete?q={prefix} — prefix search (0.5 DP/result)- GET /roots/:root/words — all lemmas sharing a root- POST /morphology/analyze — full morphological breakdown (2 DP)## Features to Implement- Daily word card with lemma, root, pattern, definition, and example- Flashcard mode using random words endpoint (basic tier to minimize DP cost)- Quiz mode: show Arabic word, pick correct English meaning from 4 options- Root explorer: show all words derived from a root- إعراب viewer: POST /iraab/parse to show grammatical parse for example sentences- Progress tracking with localStorage- Bookmark/favorite words for review- Use spaced repetition (SM-2 algorithm) for review scheduling