agentleFS
cyyehcyyeh/duckdb-data-agent/skills/analyze-data/SKILL.md

analyze-data

Skill1 starsChanged 9 months agoMITView on GitHub

Guides structured data analysis workflows using DuckDB. Use when the user asks to analyze, explore, summarize, or understand data in uploaded tables. Covers data profiling, quality checks, aggregations, trend analysis, comparisons, and visualization recommendations.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. Indium-AI-Labs/indium-agentkit★ 18same name
    2. Ionate-Technologies/indium-agentkit★ 17same name
    3. lalulali/vespyr★ 11same name
    4. gu-dsan6725/ai-assisted-coding★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always start by understanding the data before answering any question.

    line 12
  2. Very specific:

    Run these queries using mcp__duckdb-data-agent__execute_sql:

    line 14
  3. Very specific:

    If the user's question is ambiguous, ask one clarifying question using mcp__duckdb-data-agent__ask_user_question before running analysis.

    line 26
  4. Distinctive:

    Comparisons: Use CASE WHEN for segmentation, or PIVOT for cross-tabulation.

    line 36
  5. Very specific:

    Distribution: Use histogram() aggregate or manual bucket ranges with CASE WHEN ...

    line 38
  6. Very specific:

    Use mcp__duckdb-data-agent__render_chart with appropriate chart types:

    line 44
  7. Distinctive:

    Always include a descriptive title and axis labels in the chart spec.

    line 54

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Data Analysis Workflow

Required first step: Profile the data

Always start by understanding the data before answering any question.

Run these queries using mcp__duckdb-data-agent__execute_sql:

  1. List tables: SHOW TABLES
  2. Schema: DESCRIBE <table_name>
  3. Row count: SELECT COUNT(*) FROM <table_name>
  4. Sample rows: SELECT * FROM <table_name> LIMIT 5
  5. Null rates: SELECT column_name, COUNT(*) - COUNT(column_name) AS nulls, ROUND(100.0 * (COUNT(*) - COUNT(column_name)) / COUNT(*), 1) AS null_pct FROM <table_name>, LATERAL (VALUES <each_column>) AS t(column_name) -- use actual column references

For large tables (1M+ rows), use SELECT * FROM <table_name> USING SAMPLE 1000 instead of LIMIT.

Understand the question

If the user's question is ambiguous, ask one clarifying question using mcp__duckdb-data-agent__ask_user_question before running analysis. Prefer multiple-choice options.

Analyze (choose based on question)

Pick the appropriate analysis pattern:

Aggregation & summary: GROUP BY with COUNT, SUM, AVG, MIN, MAX. Use ROUND() for readability.

Trends over time: ORDER BY date column. Use DuckDB date functions: date_trunc('month', col), date_part('year', col). Window functions for running totals: SUM(x) OVER (ORDER BY date_col).

Comparisons: Use CASE WHEN for segmentation, or PIVOT for cross-tabulation.

Distribution: Use histogram() aggregate or manual bucket ranges with CASE WHEN ... BETWEEN.

Top-N / ranking: ROW_NUMBER() OVER (PARTITION BY ... ORDER BY ... DESC).

Visualize results

Use mcp__duckdb-data-agent__render_chart with appropriate chart types:

Data patternChart typeNotes
Categories vs valuesbarHorizontal if many categories
Trend over timelineUse date on x-axis
Part of wholepieOnly if ≤6 categories
Two numeric variablesscatterAdd trendline if relevant
DistributionhistogramBin width matters

Always include a descriptive title and axis labels in the chart spec.

Summarize findings

End with a plain-language summary:

  • State the key finding first
  • Support with specific numbers from the analysis
  • Note any data quality issues found during profiling
  • Suggest follow-up questions if relevant

DuckDB tips

  • DESCRIBE is faster than information_schema for schema inspection
  • USING SAMPLE n for random sampling without sorting
  • String matching: ILIKE for case-insensitive, regexp_matches() for regex
  • List columns: SELECT column_name FROM information_schema.columns WHERE table_name = '...'
  • DuckDB supports PIVOT and UNPIVOT natively

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.