dbcli-comparelisted
Install: claude install-skill DrOlu/agent-skills
## Command Style (Use PATH)
All examples use the plain command name `dbcli` (no directory prefix).
Ensure `dbcli` is on PATH instead of hardcoding paths like `.\.claude\skills\dbcli\dbcli.exe`.
# DbCli Compare Skill
Compare results of two SQL queries to verify complete data consistency.
## When to Use This Skill
- User wants to compare results of two SQL queries
- User needs to verify query equivalence (e.g., before/after refactoring)
- User asks to validate if two queries produce identical results
- User needs to check if a view matches a complex query
- User wants to verify query optimization didn't change results
- Comparing query results across different time periods or conditions
## Comparison Process
The comparison performs five checks:
1. **Structure Check** - Verify column names, types, and order match
2. **Record Count** - Compare total number of rows
3. **Data Diff (Direction 1)** - Find records in query1 not in query2
4. **Data Diff (Direction 2)** - Find records in query2 not in query1
5. **Result Summary** - Report complete status
## Command Syntax
```bash
dbcli compare "QUERY1" "QUERY2" [-c CONNECTION] [-t DBTYPE]
```
### Parameters
- First SQL query (required)
- Second SQL query (required)
- `-t, --db-type`: Database type (optional, default: "sqlite")
- Environment variables:
- `DBCLI_CONNECTION`: Database connection string
- `DBCLI_DBTYPE`: Database type (alternative to -t)
## Usage Examples
###