PostgreSQL Semantic Model Integration
SkillDatabases & dataUse for ANY PostgreSQL interaction — queries, schema exploration, metrics, or business data questions. MUST be used before postgres tools to load semantic models containing business context, field mappings, and validated metric formulas.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the PostgreSQL Semantic Model Integration skill
What this skill tells your AI
The instructions your AI receives, as published by conveyordata/data-product-portal in demo/agents/agent/skills/postgres-semantic/SKILL.md and read by ahel’s review.
Load semantic models before any database operation. They contain business rules, exact field expressions, and validated metrics that make queries correct.
Workflow
Step 1: Check for semantic models (MANDATORY FIRST STEP)
Before calling any database tool, list the semantic models at /products:
list_files(path="/products")
If the directory is empty or missing, skip to Step 5 and query directly.
Step 2: Load relevant models
Load model files matching the user's question:
| Question contains | Load |
|---|---|
| orders, revenue, transactions, payments, pricing | sales-transaction-ledger/osi.yml |
| customers, users, sessions, acquisition, behavior | customer-demographic-master/osi.yml |
| inventory, stock, warehouse, products, SKUs | inventory-snapshot/osi.yml |
| unclear or multi-domain | all models |
read_file(path="/products/sales-transaction-ledger/osi.yml")
read_file(path="/products/customer-demographic-master/osi.yml")
read_file(path="/products/inventory-snapshot/osi.yml")
Step 3: Extract from each model
ai_context.instructions(top level) — critical business rules for all queriesdatasets[].source— actual schema.table name to querydatasets[].fields[].expression— exact SQL expression to use (never guess)metrics[].expression— pre-validated SQL calculation (use as-is)relationships[]— correct join conditions across domains
Step 4: Apply context
- Apply domain instructions (e.g., divide cents by 100 for dollar amounts)
- Use exact field
expressionvalues — never invent column names - Use pre-defined metric expressions verbatim
- Use
relationshipsfor cross-domain joins - Respect field-level
ai_contextwarnings
Step 5: Query the database
show_tables() # list available tables
describe_table(table="schema.table") # table structure
run_query(query="SELECT ...") # execute SQL
Always cite which semantic rule or metric you applied in your response.
Signals
- GitHub stars
- 202
- Forks
- 59
- Last commit
- Sep 2026
ahel review
S4info
community integration — published by conveyordata, not postgres
Automated review, not a security audit. Ruleset v1.
Advanced
- Catalog kind
- skill
- Gateway key
postgres-semantic- Source
- github.com/conveyordata/data-product-portal