skills.vishalvoidskills/vishalvoid
Technical & DevelopmentIntermediate

query

Run SQL queries against attached databases or ad-hoc against files ...

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/duckdb/duckdb-skills --skill query

Overview

What This Skill Does

Run SQL queries against attached databases or ad-hoc against files using Friendly SQL dialect

Application

When to use this Skill

Documentation

Show Skills.md file

You are helping the user query data using DuckDB.

Input: $@

Follow these steps in order.

Step 1 — Resolve state and determine the mode

Look for an existing state file in either location:

STATE_DIR=""
test -f .duckdb-skills/state.sql && STATE_DIR=".duckdb-skills"
PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")"
PROJECT_ID="$(echo "$PROJECT_ROOT" | tr '/' '-')"
test -f "$HOME/.duckdb-skills/$PROJECT_ID/state.sql" && STATE_DIR="$HOME/.duckdb-skills/$PROJECT_ID"

If found, verify the databases it references are still accessible:

duckdb -init "$STATE_DIR/state.sql" -c "SHOW DATABASES;"

Now determine the mode:

Lines 1 - 25 of 199

Recommendations

Explore other random skills

All skillsMy patterns