Agent skill
query-sqlite-db
Use when needing to inspect SQLite database directly, when debugging data issues, when environment variable expansion fails with APPDATA or similar paths, or when sqlite3 query returns "unable to open database"
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/query-sqlite-db
SKILL.md
Query SQLite Database
Overview
Direct SQLite queries for debugging data state. Critical: Environment variables don't expand in bash - always use full paths.
Database Paths
| Environment | Path |
|---|---|
| Dev | C:/Users/Dodo/AppData/Roaming/com.notavailable.kniha-jazd.dev/kniha-jazd.db |
| Prod | C:/Users/Dodo/AppData/Roaming/com.notavailable.kniha-jazd/kniha-jazd.db |
Quick Reference
# Query
sqlite3 "C:/Users/Dodo/AppData/Roaming/com.notavailable.kniha-jazd.dev/kniha-jazd.db" "SELECT * FROM vehicles;"
# Schema
sqlite3 "..." ".schema receipts"
# Tables
sqlite3 "..." ".tables"
Key Tables
| Table | Key Columns |
|---|---|
vehicles |
id, name, tp_consumption |
trips |
id, vehicle_id, start_datetime, end_datetime, fuel_liters |
receipts |
id, trip_id, receipt_datetime, liters, total_price_eur |
Common Mistakes
| Error | Fix |
|---|---|
%APPDATA% doesn't expand |
Use full path C:/Users/Dodo/AppData/Roaming/... |
$env:APPDATA fails |
Use full path (PowerShell vars don't work either) |
Column date not found |
Use receipt_datetime or start_datetime |
| "unable to open database" | Check path for typos, use forward slashes |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?