agentscope-examples/agents/harness-examples/harness-quickstart/src/main/resources/workspace/skills/schema-exploration/SKILL.md
Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in the database. Use when the user asks about database structure, table layout, column types, what tables exist, foreign keys, or how entities relate to each other.
npx skillsauth add guanxuc/agentscope-java schema-explorationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use schema-exploration when the user:
Use sql_list_tables to see everything available.
Tool: sql_list_tables
(no parameters)
Use sql_get_schema with the table name(s) you need to understand:
Tool: sql_get_schema
tables: "Customer" # single table
tables: "Invoice,Customer" # multiple tables at once
This returns:
Look for columns ending in Id — they are almost always foreign keys.
Example for the Chinook database:
Customer.SupportRepId → Employee.EmployeeId
Invoice.CustomerId → Customer.CustomerId
Track.AlbumId → Album.AlbumId
Track.GenreId → Genre.GenreId
Provide:
sql_list_tablesThe Chinook database has 11 tables:
Music Catalog:
- Artist — 275 music artists
- Album — 347 albums (linked to Artist)
- Track — 3,503 tracks (linked to Album, Genre, MediaType)
- Genre — 25 music genres
- MediaType — 5 file formats (MP3, AAC, …)
Commerce:
- Customer — 59 customers from 24 countries
- Invoice — 412 purchase invoices
- InvoiceLine — 2,240 line items (linked to Invoice and Track)
Staff:
- Employee — 8 employees with reporting hierarchy
Playlists:
- Playlist — 18 playlists
- PlaylistTrack — join table linking Playlist ↔ Track
sql_get_schema with tables: "Customer"Customer table:
CustomerId INTEGER PK
FirstName TEXT
LastName TEXT
Company TEXT (nullable)
Address TEXT
City TEXT
State TEXT (nullable)
Country TEXT
PostalCode TEXT (nullable)
Phone TEXT (nullable)
Fax TEXT (nullable)
Email TEXT
SupportRepId INTEGER FK → Employee.EmployeeId
Sample rows show customers from Brazil, Germany, and Canada.
Map the full JOIN path:
Artist (ArtistId)
↓ 1:many
Album (ArtistId, AlbumId)
↓ 1:many
Track (AlbumId, TrackId)
↓ 1:many
InvoiceLine (TrackId, UnitPrice, Quantity)
↓ many:1
Invoice (InvoiceId, Total)
Then suggest using the query-writing skill to write the aggregation query.
tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
documentation
Writes and executes SQL queries ranging from simple single-table SELECTs to complex multi-table JOINs, aggregations, window functions, and subqueries. Use when the user asks to query the database, retrieve data, filter records, rank results, or generate reports.
documentation
Discover schema, write SELECT-only SQLite queries, execute, and explain results (aligned with harness-example).
documentation
Discover schema, write SELECT-only SQLite queries, execute, and explain results (aligned with harness-example).