agentleFS
LeostrukaLeostruka/devin-bundle/skills/data-analyst/SKILL.md

data-analyst

Skill0 starsChanged 3 months agoMITView on GitHub

Use when the user asks to query a database, analyze data, create charts/visualizations, explore data patterns, or asks business questions about data. Replicates Devin cloud's Data Analyst Agent (DANA) for the CLI — SQL-first exploration, schema-aware querying, and seaborn-style visualizations via MCP data sources.

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use web-researcher, tech-lead and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xcrrrSkill

    web-researcher

    Use this skill when you need to research a topic online, gather information from multiple sources, or evaluate source credibility. Trigger phrases: 'research', 'find information about', 'look up', 'investigate'. Not for academic systematic reviews (use literature-reviewer) or fact-checking specific claims (use fact-checker).

    Also in 3 projects that use this

  • lotosbinSkill

    tech-lead

    技术负责人专家,精通技术架构设计、技术选型、代码审查和团队技术管理

    Also in 3 projects that use this

  • JohnJBorenSkill

    ux-researcher

    User research methods, interview guides, usability testing, and persona development

    Also in 3 projects that use this

  • o2alexanderfedinSkill

    solution-architect

    Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

    Also in 3 projects that use this

  • belokonmSkill

    security-engineer

    Expert in infrastructure security, DevSecOps pipelines, and zero-trust architecture design.

    Also in 3 projects that use this

  • JohnJBorenSkill

    product-manager

    Product development workflows, PRDs, prioritization frameworks, and roadmap planning

    Also in 5 projects that use this

  • +2 more from JohnJBoren

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 4 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No MCP data source is configured — DANA requires a connected database

    line 38
  2. Very specific:

    Verify connectivity: mcp_list_tools for the data source server

    line 47
  3. Distinctive:

    If no data source is configured, say so and stop — do not guess schema or fabricate data

    line 48
  4. Very specific:

    Start with a SELECT ... LIMIT 10 to validate the query and preview results

    line 72
  5. Very specific:

    Run the full query via mcp_call_tool

    line 85
  6. Very specific:

    If the result is large (> 100 rows), write to a file (query-results-<timestamp>.csv) and summarize in chat

    line 86
  7. Distinctive:

    If the user asked for metrics, compute them explicitly:

    line 96
  8. Distinctive:

    Write a Python script to generate the chart:

    line 108
  9. Very specific:

    If the user asks about a specific pandas, seaborn, matplotlib, SQLAlchemy, or plotting API, invoke context7 before writing code.

    line 149
  10. Very specific:

    No persistent Database Knowledge: cloud DANA persists schema docs across sessions.

    line 153
  11. Very specific:

    No Slack integration: cloud DANA responds in Slack threads.

    line 156
  12. Very specific:

    No auto-feedback learning: cloud DANA learns from user corrections ("remember that 'active user' means logged in within 7 days").

    line 160

“Common” is measured: kept by at least 6 in 10 of the 29 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 Analyst (CLI replica of DANA — Data ANAlyst Agent)

What this replicates

Cloud Devin has a Data Analyst Agent (DANA) — a specialized agent optimized for querying databases, analyzing data, and creating visualizations. It maintains a "Database Knowledge" note with schema docs, auto-references it before queries, and outputs formatted tables, charts, and plain-English interpretations.

The CLI has no "Data" agent mode. This skill fills that gap by providing the DANA workflow as an invocable procedure using MCP data sources already configured in mcp_config.json.

Sources:

  • docs.devin.ai/work-with-devin/data-analyst (DANA overview)
  • docs.devin.ai/use-cases/gallery/dana-slack-data-analyst (Slack usage)
  • docs.devin.ai/release-notes/2025 (DANA release)
  • devin.ai/ai-data-analyst-1/ (build-your-own guide)

When to Use

  • "Query the database for X"
  • "How many users signed up last week?"
  • "Show me a chart of daily revenue"
  • "Analyze patterns in the orders table"
  • "What's the churn rate by cohort?"
  • Any SQL/data analysis task against an MCP-connected data source

When NOT to Use

  • No MCP data source is configured — DANA requires a connected database
  • The question is about code, not data — use research or grep
  • The task needs code changes, not analysis — use Normal mode
  • Quick file inspection (CSV/JSON on disk) — use read + exec directly

Prerequisites

  1. At least one MCP data source configured in mcp_config.json (PostgreSQL, Redshift, Snowflake, BigQuery, SQLite, etc.)
  2. Verify connectivity: mcp_list_tools for the data source server
  3. If no data source is configured, say so and stop — do not guess schema or fabricate data

Procedure

Step 1 — Schema discovery (Database Knowledge)

DANA maintains a "Database Knowledge" note. In the CLI, build it on-the-fly:

  1. mcp_call_tool to list tables (SELECT table_name FROM information_schema.tables or the MCP's schema tool)
  2. For relevant tables, describe columns (DESCRIBE <table> or SELECT column_name, data_type FROM information_schema.columns WHERE table_name = '<table>')
  3. Cache findings in a file: write to .devin/db-schema.md
  4. On subsequent queries, read .devin/db-schema.md first — only re-discover if the schema may have changed

Output: schema doc with table names, columns, types, and relationships.

Step 2 — Query formulation

  1. Translate the user's natural-language question into SQL
  2. Start with a SELECT ... LIMIT 10 to validate the query and preview results
  3. Check for:
    • Correct table joins (use schema doc from Step 1)
    • Date/time handling (timezone awareness — DANA learns from feedback; here, ask the user if timezone is ambiguous)
    • NULL handling (use COALESCE or filter explicitly)
    • Performance (add LIMIT for exploratory queries)

Output: validated SQL query + preview results.

Step 3 — Full query execution

  1. Run the full query via mcp_call_tool
  2. If the result is large (> 100 rows), write to a file (query-results-<timestamp>.csv) and summarize in chat
  3. Format output as a Markdown table for small results (< 20 rows)

Output: result set (table or file reference) + row count.

Step 4 — Analysis & interpretation

  1. Summarize key findings in plain English
  2. Identify patterns, anomalies, or trends
  3. If the user asked for metrics, compute them explicitly:
    • Counts, sums, averages, medians, percentiles
    • Rates (conversion, churn, growth) with clear denominators
    • Cohort breakdowns if relevant
  4. Compare to expectations: "This is X% higher/lower than typical"

Output: numbered findings with the supporting query/row cited.

Step 5 — Visualization (if requested)

DANA uses seaborn for charts. In the CLI:

  1. Write a Python script to generate the chart:
    import matplotlib
    matplotlib.use('Agg')  # headless
    import matplotlib.pyplot as plt
    import pandas as pd
    # ... load data, plot, save
    plt.savefig('chart-<name>.png', dpi=150, bbox_inches='tight')
  2. exec the script
  3. read the PNG to display it inline
  4. Report the file path for later reference

Output: chart file path + inline display + 1-sentence caption.

Output format

## Data Analysis: <question>

### Schema used
- `<table>`: <columns relevant to this query>

### Query
```sql
<SQL>

Results

<Markdown table or file reference>

Findings

  1. <finding with data citation>
  2. ...

Chart

<if requested: file path + inline image>


## Up-to-date docs

If the user asks about a specific pandas, seaborn, matplotlib, SQLAlchemy, or plotting API, invoke `context7` before writing code. This is especially useful for seaborn-style visualizations where API signatures change between versions.

## CLI-specific notes

- No persistent Database Knowledge: cloud DANA persists schema docs
  across sessions. The CLI caches to `.devin/db-schema.md` — check
  if it exists, re-discover if stale.
- No Slack integration: cloud DANA responds in Slack threads. The
  CLI outputs to the terminal; use `write` for large results.
- MCP-dependent: this skill only works if a data MCP server is
  configured. Check `mcp_config.json` and `mcp_list_servers` first.
- No auto-feedback learning: cloud DANA learns from user corrections
  ("remember that 'active user' means logged in within 7 days"). The
  CLI requires the user to update `.devin/db-schema.md` manually or
  tell the agent in-session.
- Schema safety: never run `DROP`, `DELETE`, `UPDATE`, `INSERT`, or
  any mutating SQL unless the user explicitly asks. DANA is
  read-only by design; this skill follows the same constraint.

## Cross-skills

- `architecture-diagrams` / mermaid — when the analysis output needs a diagram artifact (ER, flow, topology) for reports.

  any mutating SQL unless the user explicitly asks. DANA is
  read-only by design; this skill follows the same constraint.

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.