
Schema Exploration
When you need to understand what's in a database before writing queries, this walks you through the discovery process systematically. It uses sql_db_list_tables to show all available tables, then sql_db_schema to examine columns, data types, and sample rows. The real value is in how it maps relationships by identifying foreign keys and documenting the JOIN paths between tables. If someone asks "what tables exist" or "how do Customer and Invoice relate", this handles that exploration work. It stops short of writing actual queries, which makes sense as a separation of concerns. Think of it as the reconnaissance step before you start querying.
- skills.sh installs
- 1.3K
- GitHub stars
- 31.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add langchain-ai/deepagents --skill schema-exploration --agent claude-codeInstalls into .claude/skills of the current project.
Files
Schema Exploration Skill
Workflow
1. List All Tables
Use sql_db_list_tables tool to see all available tables in the database.
This returns the complete list of tables you can query.
2. Get Schema for Specific Tables
Use sql_db_schema tool with table names to examine:
- Column names - What fields are available
- Data types - INTEGER, TEXT, DATETIME, etc.
- Sample data - 3 example rows to understand content
- Primary keys - Unique identifiers for rows
- Foreign keys - Relationships to other tables
3. Map Relationships
Identify how tables connect:
- Look for columns ending in "Id" (e.g., CustomerId, ArtistId)
- Foreign keys link to primary keys in other tables
- Document parent-child relationships
4. Answer the Question
Provide clear information about:
- Available tables and their purpose
- Column names and what they contain
- How tables relate to each other
- Sample data to illustrate content
Example: "What tables are available?"
Step 1: Use sql_db_list_tables
Sponsors
Details
- Repository
- github.com/langchain-ai/deepagents
- Categories
- Backend & APIs, AI & Agent Building, Databases
- First seen
- May 16, 2026