Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

schema-exploration

Skill by timescale

Explores an existing PostgreSQL database with read-only catalog queries before answering data questions or writing SQL. Aimed at users working with unfamiliar schemas.

  • Score 87
  • 1.9k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install schema-exploration

Built from the published package, never by AI.

git clone --depth 1 https://github.com/timescale/pg-aiguide /tmp/pg-aiguide && mkdir -p ~/.claude/skills && cp -r /tmp/pg-aiguide/skills/schema-exploration ~/.claude/skills/schema-exploration

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install schema-exploration in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The schema-exploration skill helps an AI assistant learn an existing PostgreSQL database before it answers questions about the data or writes SQL. It starts with a small inventory of the database, server version, role, and relevant schemas. It then reads only the reference that matches the objects under review, such as tables, views, routines, triggers, RLS, or extensions. It relies mainly on read-only pg_catalog queries.

The skill is meant for unfamiliar schemas, such as finding where a business concept lives, checking counts or failed records, or explaining joins. It asks for approval before inspecting data-derived statistics or rows. It separates observed facts from inferences and open questions. It is not a guide to schema design or migrations. The skill is published by timescale under Apache-2.0.

Written from the project's SKILL.md and checked against it.

What it can do

  • Database inventoryConfirms the current database, server version, role, and scope before exploring.
  • Object drill-downReads matching references for tables, views, routines, triggers, RLS, or extensions.
  • Concept lookupFinds the schema-qualified objects where a business concept is likely stored.
  • Query authoringEstablishes join keys and grain, then validates a vetted read-only query with plain EXPLAIN.
  • Approval-gated data checksRequests approval before inspecting data-derived statistics, values, or rows.

What you need

  • A PostgreSQL database connection available to the assistant

Try asking

  • Find where customer orders are stored in this PostgreSQL schema
  • Explain how the orders and accounts tables join in this database
  • Check which views and triggers touch the invoices table

Good to know

  • Targets PostgreSQL 18; older majors have alternative notes where applicable
  • Does not call discovered functions or run EXPLAIN ANALYZE on unknown queries
  • Data-derived statistics and rows require user approval first
  • Not a schema-design or migration guide

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/schema-exploration/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md4 KB
  • references/data-values.md6 KB
  • references/extensions.md2 KB
  • references/foreign-tables.md4 KB
  • references/overview.md6 KB
Show all 13 files
  • references/partitioning-and-inheritance.md7 KB
  • references/psql.md2 KB
  • references/query-authoring.md2 KB
  • references/routines.md3 KB
  • references/security.md2 KB
  • references/tables.md8 KB
  • references/triggers.md2 KB
  • references/views.md2 KB

Alternatives to schema-exploration

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

schema-exploration: common questions

Does this skill change my database?

The source says not to change schema, data, roles, or session settings without authorization. It recommends read-only transactions where the client supports them.

Can it look at my table data?

Only after approval for the specific columns and access method. The skill says sampling should be limited and used only when necessary.

Which PostgreSQL version does it support?

Its queries target PostgreSQL 18, and version-sensitive sections note alternatives for older majors where applicable.

How do I install schema-exploration?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is schema-exploration free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is schema-exploration safe to use?

It scores 87 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to schema-exploration?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

schema-exploration Install

Add to stack

Loading.