attach-db

Attach a DuckDB database file for interactive querying and session persistence.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/chrishuffman5/skills --skill attach-db-chrishuffman5
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: attach-db
Source: https://github.com/chrishuffman5/skills/tree/main/attach-db
Command: npx skills add https://github.com/chrishuffman5/skills --skill attach-db-chrishuffman5

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill simplifies the process of attaching a DuckDB database file, making it ready for interactive querying.

Core Features & Use Cases

  • Attach Database: Seamlessly attach a DuckDB database file for use in queries.
  • Schema Exploration: Explore database schema, including tables and row counts.
  • State File Creation: Generates a state file for subsequent automatic session restoration.
  • Use Case: Ideal for quickly accessing and querying a local DuckDB database during development or analysis sessions.

Quick Start

Run the 'attach-db' skill with the path to your database file.

Frequently Asked Questions about attach-db

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I attach a DuckDB database file for interactive querying?

To attach a DuckDB database, provide the file path to initiate the session. This process establishes a connection for interactive querying and generates a state file for subsequent automatic session restoration.

What is the best way to explore a local DuckDB schema during development?

Exploring a DuckDB schema involves attaching the database file to access its tables and row counts. This action prepares the local database for immediate interactive querying during analysis sessions.

Does DuckDB support session state persistence for later analysis?

DuckDB session state persistence is achieved by generating a state file upon attaching the database. This file enables automatic restoration of subsequent sessions, maintaining your interactive querying environment.

Do I need DuckDB commands to access and query my database?

Yes, accessing and querying your DuckDB database requires access to DuckDB commands. Providing the database file path allows you to seamlessly attach the file and run interactive queries.

Can I use this approach to quickly access local DuckDB databases?

Yes, attaching a DuckDB database file is ideal for quickly accessing local databases during development or analysis. This mechanism simplifies preparation for immediate interactive querying.