Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
sql - Skill - OpenSmartRoute
Skillv1.0.0
sql
Ham SQL kuralları (PostgreSQL 16) - CTE zinciri kullan; iç içe subquery yazma. Her CTE'nin üstünde bir satır yorum: amacı.
Instruction file imported from halitkalayci/tcell-veri-scratch (.github/instructions/sql.instructions.md). Copyright stays with the author.
Ham SQL kuralları (PostgreSQL 16)
CTE zinciri kullan; iç içe subquery yazma. Her CTE'nin üstünde bir satır yorum: amacı.
CTE isimleri katmanı anlatsın: deduped, normalized, filtered, aggregated, current_subscribers.
Aggregate window'larda (sum/avg/count over) frame'i açıkça yaz (ROWS BETWEEN ...); default RANGE'e güvenme. Ranking fonksiyonlarında (row_number/rank/dense_rank) frame YAZMA — anlamsızdır.
Deterministik sıralama: ORDER BY'a her zaman tekil bir iş anahtarı tie-breaker ekle (ör. recharge_id, subscriber_id). ctid kullanma — fiziksel adres, VACUUM sonrası değişir.
Performans önerisi istenirse önce EXPLAIN (ANALYZE, BUFFERS) çıktısını iste; çıktısız index önerme.
Sorgunun sonuna -- DOĞRULAMA başlığı altında en az 2 kontrol sorgusu ekle.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slot
curl -s -X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.