The Chion blog
Find Chion's Postgres SQL, agent-skill, and safety guides
Three clusters, written for teams running a real Postgres warehouse: how a plain-English question becomes a SELECT you can read, how a promoted query compiles into a skill file, and what the read-only boundary does and does not cover.
Read-only SELECT. Row caps enforced. The policies on the role you supply are honored. Each chart carries the query that produced it.
See how Chion worksGuides and worked examples, newest first
ai analytics
Trace an Analytics Answer Back to Its SQL
An AI answer you cannot trace is a guess with good grammar. How to ground answers in SQL and photographs, so every claim ships with evidence you can open.
agent skills
Claude Code Data Analyst With Read-Only SQL
Build a Claude Code data analyst per role: each skill answers from your Postgres with a chart and the read-only SELECT a reviewer saved and reviewed.
ai sql
SKILL.md SQL Example With a Read-Only SELECT
One complete SKILL.md example: YAML frontmatter plus a read-only SELECT, with the paths Claude Code and Codex each read it from.
ai agent configuration
CLAUDE.md for SQL: Route to Saved Queries
CLAUDE.md loads on every turn, so keep query bodies out of it. Pair the always-on file with scoped SKILL.md bodies holding saved, read-only Postgres SQL.
agent skills
Claude Code SQL Skill From Saved Queries
Claude Code skills for Postgres break when schemas change. Get the SKILL.md YAML frontmatter right and ground the body in saved, read-only queries.
ai sql
Preserve Team SQL in a Reviewed Query Library
Reviewed team SQL disappears into chat threads. A saved query library keeps the SELECT, its business context, and the reviewer who signed it off.
ai sql
Read-Only SQL Agent: 4 Production Checks
The four properties a read-only SQL agent must prove before production: code-enforced read-only, a credential vault, an audit row, and saved queries.
ai analytics
Audit Postgres Analysis Before Trusting the Chart
The checks to run on a Postgres AI answer before you act on it: read the executed SELECT, test the grain, and confirm the filter matches the question.
data architecture
Semantic Layer for SQL: Map Business Terms
A semantic layer for SQL makes grain, joins, filters, and metrics explicit, so a business term resolves to the same table and column on every question.
ai sql
Text-to-SQL Hallucination: Why Valid SQL Is Wrong
Six ways text-to-SQL hallucinates on Postgres: joins, grain, filters, dates, definitions, and refusal. Executable SQL can still answer the wrong question.
claude-code
Fix “SKILL.md must start with YAML frontmatter” at byte 1
Fix the Claude Code error SKILL.md must start with YAML frontmatter (---): the valid shape plus five ways files fail it, with broken vs fixed examples.
security
Text-to-SQL prompt injection still has to pass the SQL gate
How Chion handles text-to-sql prompt injection (OWASP LLM01): a prompt escaper, two code validators, and a 1,000-row capped database role.