Intelligent Data Analysis: Query Local Tabular Files with DuckDB in Agents

Introduction

When working with local CSV, Parquet, or Excel files and needing to perform quick aggregations, sampling, or ad hoc queries, the common workflow involves: spinning up Python to read files and write pandas code, or importing data into a database to write SQL. These steps are cumbersome, the environment is complex, and it is often difficult for conversational Agents to consistently select the correct libraries and syntax.

Below is an introduction to the SkillHub community Skill “Intelligent Data Analysis” (ID @user_af28adda/chat2duckdb-cloudcba). It encapsulates DuckDB capabilities on the Agent side, targeting tasks related to “direct SQL and analysis on local/common format files,” and is marked as requiring no API Key (requires_api_key=false).

What is this

“Intelligent Data Analysis” is a data-analysis Skill maintained by the community publisher user_af28adda. The current version is 1.0.0, and the source is labeled as community.

The official description summarizes it as: A data analysis tool based on the DuckDB engine. When users need to perform SQL queries, data analysis, or data sampling on files such as CSV / JSON / Parquet / Excel, or require query execution with automatic error correction, the Agent will invoke the corresponding capabilities according to the Skill’s instructions.

SkillHub Page: https://www.skillhub.cn/skills/user_af28adda/chat2duckdb-cloudcba
API Endpoint: https://api.skillhub.cn/user_af28adda/chat2duckdb-cloudcba

(SkillHub Display Data: Rating 100000, Downloads 10415, Installs 63.)

Core Features

The following capabilities are derived from the official description; details not appearing in the materials are not expanded upon:

  1. Multi-format Files: Supports common data files such as CSV, JSON, Parquet, and Excel as analysis objects.
  2. SQL and Analysis: Executes queries and routine data analysis on files under DuckDB semantics.
  3. Data Sampling: Suitable for viewing distributions and row samples on large files before deciding on a complete query.
  4. Query Execution and Error Correction: When a query fails or has syntax issues, the Skill guides the automatic correction and retry execution (specific error correction strategies are subject to the SKILL.md within the Skill package).

Installation and Activation

The installation process follows the general SkillHub instructions: https://skillhub.cn/install/skillhub.md

1. Check SkillHub CLI

command -v skillhub && skillhub --version

If not installed, you can use the official installation script (full installation includes CLI and default Skills):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

To install only the CLI:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

2. Install this Skill

When installing, you must use --dir to point to the current Agent’s skills directory; otherwise, it will default to ./skills/ and may not be recognized.

skillhub install user_af28adda/chat2duckdb-cloudcba --dir <your Agent skills directory>

You can also provide the prompt below to an AI that supports Skill installation and let it complete the installation according to skillhub.md:

Please install `@user_af28adda/chat2duckdb-cloudcba` based on https://skillhub.cn/install/skillhub.md.

3. Skills directories for various clients (Excerpted from SkillHub documentation)

Environment Typical Path
Cursor ~/.cursor/skills/
Claude Code ~/.claude/skills/
Codex ~/.codex/skills/ or .agents/skills/ under the project
Gemini CLI ~/.gemini/skills/

After installing to the corresponding directory, refresh or restart the Agent according to your client’s instructions to load the Skill.

Typical Usage

The official page does not include an independent command-line demo; the usage is consistent with the trigger conditions in the description: In a conversation where this Skill is enabled, describe the data file path and analysis goal in natural language, and the Agent will invoke the relevant DuckDB steps according to the Skill.

Reproducible interaction mode examples (statements need to be replaced with your actual paths and field names):

  1. Describe the location and format of the data file, e.g.: “The data/sales.csv under the project, use SQL to calculate the Top 10 sales by category.”
  2. When you need to inspect the data first, you can request sampling, e.g.: “Randomly sample 100 rows from this Parquet and explain the column types.”
  3. If a query reports an error, you can continue to ask the Agent to fix the SQL and rerun it—this aligns with the “automatic error correction query execution” scenario in the description.

Specific SQL dialects, file mounting methods, and dependency package installation are subject to the SKILL.md within the Skill package after installation; this article does not speculate on script names or configuration items.

Use Cases and Notes

Who it is for

  • Developers or data-related roles who are already using Skills in environments like Cursor, Claude Code, Codex, etc., and wish to quickly explore local tabular data using SQL.
  • Those who do not want to set up a separate database for one-time analysis but hope the analysis logic can be reproduced as SQL.

Limitations and Notes

  • Community Skill (community), behavior and maintenance rhythm depend on the publisher; before upgrading, you can check SkillHub to see if version 1.0.0 has updates.
  • Large file performance and memory usage are constrained by DuckDB and the local environment; for extremely large datasets, you still need to evaluate whether to partition or import into a database first.
  • “No API Key required” only means that is how the Skill is tagged; the data you analyze remains on your local machine or the path you specified, so pay attention to sensitive data permissions.
  • Incorrect installation directory is a common pitfall: ensure skillhub install ... --dir points to the current Agent’s skills path.

Conclusion

“Intelligent Data Analysis” integrates DuckDB’s file SQL capabilities into the Agent workflow, targeting queries, analysis, and sampling for CSV/JSON/Parquet/Excel, and covers error correction execution scenarios when queries fail. If you are already using SkillHub, you can install @user_af28adda/chat2duckdb-cloudcba as described above and directly describe your files and analysis needs in the conversation.

Official SkillHub Page: https://www.skillhub.cn/skills/user_af28adda/chat2duckdb-cloudcba

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye