schema-exploration

List database tables, columns, data types, and foreign key relationships.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/dotlab-hq/torque --skill schema-exploration-dotlab-hq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: schema-exploration
Source: https://github.com/dotlab-hq/torque/tree/main/.agents/skills/schema-exploration
Command: npx skills add https://github.com/dotlab-hq/torque --skill schema-exploration-dotlab-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users discover the structure of a relational database by listing tables, describing column names and data types, identifying primary and foreign keys, and mapping how entities relate to support query planning, ERD creation, and schema validation.

Core Features & Use Cases

  • List tables: Retrieve a complete list of tables with short descriptions of their purpose.
  • Describe schemas: Provide column names, data types, primary key and foreign key information, and a few sample rows for context.
  • Map relationships: Identify foreign key links, parent-child relationships, and recommended JOIN paths for queries.
  • Use Case: When preparing analytics queries, building an ERD, or validating schema assumptions during migrations, use this Skill to quickly understand table structure and relationships.

Quick Start

List all tables and show the schema, sample rows, and foreign key relationships for the Customer and Invoice tables.

Frequently Asked Questions about schema-exploration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I list all tables and columns in a relational database schema?

To explore a database schema, you use introspection tools like sql_db_list_tables and sql_db_schema to retrieve table names, column data types, primary keys, and sample rows for structural context.

What is the best way to map foreign key relationships for SQL query planning?

The best way to map foreign key relationships is by retrieving schema metadata to identify parent-child links between entities, which helps map recommended JOIN paths and build accurate entity-relationship diagrams.

Can I generate an ERD from existing database tables and foreign keys?

You can prepare an ERD by listing existing database tables, describing their column data types, and identifying primary and foreign key relationships to map how entities relate within the relational database.

Do I need database introspection tools to show sample rows and schema details?

You need database introspection tools such as sql_db_list_tables and sql_db_schema to retrieve schema metadata, column data types, and sample rows required for accurate relationship mapping.

How do I validate schema assumptions during database migrations?

To validate schema assumptions during migrations, list your database tables and describe their column names, data types, and foreign key relationships to confirm the structure matches your expected data model.