Schema To Skill
Description
Turn your Postgres schema into a SKILL.md, AGENTS.md, or Cursor rule so AI coding agents stop hallucinating columns. Supabase-aware.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
schema-to-skill
Turn your Postgres schema into a skill your AI coding agent actually reads. Stop hallucinated columns.
[](https://github.com/SamRome1/schema-to-skill/actions/workflows/ci.yml) [](https://www.npmjs.com/package/schema-to-skill) [](LICENSE) [](package.json)
`schema-to-skill` connects to your real database, reads the catalog, and writes a `SKILL.md` for Claude Code, a section for `AGENTS.md`, or a Cursor rule. Tables, columns, relationships, enums, functions, triggers, indexes and Row Level Security policies, all in plain English with the exact identifiers. Supabase-aware.
Why
- Agents guess column names.
user_idorowner_id?createdorcreated_at? They pick one and move on. - Agents forget foreign keys and write joins that are almost right.
- Row Level Security blocks silently. The query "works" and returns zero rows, and the agent starts debugging the wrong thing.
- Hand-written schema docs drift the day after you write them.
- This tool generates from the only source that cannot drift: the database itself. Run it again and commit the diff.
Quick start
npx schema-to-skill --db "$DATABASE_URL" --supabase
Until the npm release lands you can run straight from GitHub:
npx github:SamRome1/schema-to-skill --db "$DATABASE_URL" --supabase
That writes `.claude/skills//SKILL.md`. Claude Code picks it up automatically the next time it touches your database code. Commit the folder.
Only reads. Introspection runs inside a `READ ONLY` transaction against `pg_catalog`; nothing is written to your database.
What it generates
An excerpt from a generated skill for the Supabase SaaS fixtu
Related Skills
mcp-server-postgres
Read-only PostgreSQL database access.
Data mcp-server-sqlite
SQLite database interaction and querying.
Data mcp-server-google-maps
Google Maps integration for location data.
Data Bitbucket Data Center
---
Data Private Gpt
Complete API layer for private AI applications on local models: RAG, skills, tools, MCP, text-to-sql, and more
Data Csv Data Summarizer
Automatically analyze CSV files and generate comprehensive insights with visualizations
Data