langchain-ai avatar

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-code

Installs 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

More from langchain-ai/deepagents

All 12
1nvidia avatarcuopt-routing-formulationnvidia/skillsVehicle routing (VRP, TSP, PDP) — problem types and data requirements. Domain concepts; no API or interface.1.3Kskills.sh installs
2nvidia avatarnemoclaw-user-guidenvidia/skillsGuides human users' AI agents to the NemoClaw docs MCP server and canonical Fern documentation in Markdown form. Use when users ask how to install, configure, o1.3Kskills.sh installs
3quodsoler avatarue-sequencer-cinematicsquodsoler/unreal-engine-skillsUse this skill when working with Sequencer, LevelSequence, cutscene, cinematic, camera, movie scene, sequencer event, or Movie Render Queue in Unreal Engine. Se1.3Kskills.sh installs
4kostja94 avatarindexingkostja94/marketing-skillsWhen the user wants to fix indexing issues from Search Console, use noindex, or implement Google Indexing API. Also use when the user mentions "fix indexing," "1.3Kskills.sh installs
5omer-metin avatar3d-modelingomer-metin/skills-for-antigravityExpert 3D modeling specialist with deep knowledge of topology, UV mapping, game-ready and film-ready pipelines, DCC tool workflows (Blender, Maya, ZBrush, 3ds M1.3Kskills.sh installs
6nexscope-ai avatarecommerce-ppc-strategy-plannernexscope-ai/ecommerce-skillsCross-platform PPC strategy planner for ecommerce businesses. Analyzes your product and margins, recommends the right advertising platforms (Google Ads, Meta Ad1.3Kskills.sh installs