← Back to list

sherlock
by michaelbromley
Tooling for AI to analyze SQL data in your DB
⭐ 4🍴 1📅 Jan 23, 2026
SKILL.md
name: sherlock description: Allows read-only access to SQL databases for querying and analysis using natural language allowed-tools:
- Bash(~/.claude/skills/sherlock/sherlock:*)
Sherlock
Read-only SQL database access. Binary: ~/.claude/skills/sherlock/sherlock
Commands
All DB commands require -c <connection>. Output is JSON by default, use -f markdown for tables.
sherlock connections # List available connections
sherlock -c <conn> tables # List tables
sherlock -c <conn> describe <table> # Table schema
sherlock -c <conn> introspect # Full schema (cached)
sherlock -c <conn> introspect --refresh # Refresh cached schema
sherlock -c <conn> query "SELECT ..." # Execute read-only query
sherlock -c <conn> sample <table> -n 10 # Random sample rows
sherlock -c <conn> stats <table> # Data profiling (nulls, distinct counts)
sherlock -c <conn> indexes <table> # Table indexes
sherlock -c <conn> fk <table> # Foreign key relationships
sherlock # Show help (all available commands)
Constraints
- Read-only: Only SELECT, SHOW, DESCRIBE, EXPLAIN, WITH allowed
- Connection required: Always specify
-c <connection>(no default) - Quoting: PostgreSQL/SQLite use
"identifier", MySQL uses`identifier`
Workflow
- Run
connectionsto see available databases - Use
tablesorintrospectto understand schema (introspect is cached per-connection) - Use
fkto understand table relationships before writing JOINs - Use
sampleto see real data examples before writing queries - Write SQL based on user's question and schema
- Execute with
query, present results clearly
Tips
- Always use LIMIT to avoid large result sets
- Use
statsfor data profiling (row counts, null counts, distinct values) - Use
-f markdownfor human-readable table output - Warn user before potentially expensive queries (JOINs on large tables, no WHERE clause)
- Config:
~/.claude/skills/sherlock/config.json
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon