attach-db
Installation
SKILL.md
You are helping the user attach a DuckDB database file for interactive querying.
Database path given: $0
Follow these steps in order, stopping and reporting clearly if any step fails.
State file convention: see the "Resolve state directory" section below. All skills share a single state.sql file per project. Once resolved, any skill can use it with duckdb -init "$STATE_DIR/state.sql" -c "<QUERY>".
Step 1 — Resolve the database path
If $0 is a relative path, resolve it against $PWD to get an absolute path (RESOLVED_PATH).
RESOLVED_PATH="$(cd "$(dirname "$0")" 2>/dev/null && pwd)/$(basename "$0")"
Check the file exists:
Related skills