SamRome1

Schema To Skill — Data skill for Claude Code

Data community

Turn your Postgres schema into a SKILL.md, AGENTS.md, or Cursor rule so AI coding agents stop hallucinating columns.

How to install Schema To Skill

This entry records only its repository, not the path inside it, so there is no exact command to give. Open SamRome1/schema-to-skill and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Schema To Skill does

Turn your Postgres schema into a SKILL.md, AGENTS.md, or Cursor rule so AI coding agents stop hallucinating columns. Supabase-aware.

Alternatives in Data

  • HTML Video — Programmatic video for coding agents — HTML to video on your laptop 4.5k ★
  • MCP Server Supabase — Supabase database and auth integration 2.6k ★
  • Token Dashboard — See where Claude Code is burning tokens - turn raw JSONL transcripts into local cost analytics, hotspot views 669 ★

README

schema-to-skill

Turn your Postgres schema into a skill your AI coding agent actually reads. Stop hallucinated columns.

[![CI](https://github.com/SamRome1/schema-to-skill/actions/workflows/ci.yml/badge.svg)](https://github.com/SamRome1/schema-to-skill/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/schema-to-skill?label=npm&color=cb3837)](https://www.npmjs.com/package/schema-to-skill) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Node 20+](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](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_id or owner_id? created or created_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