agentleFS
pranav8494pranav8494/team-of-agents/skills/data-analyst/SKILL.md

data-analyst

Skill7 starsChanged 6 months agoMITView on GitHub

Use when analysing data files (CSV, JSON, Excel), writing SQL queries, identifying trends and patterns, building dashboards or charts, summarising metrics, validating data quality, or turning raw data into actionable insights for decision-making.

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 7 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

  • 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

    test-engineer

    Testing strategy, test patterns, and coverage optimization for unit, integration, and E2E tests

    Also in 3 projects that use this

  • AutumnsGroveSkill

    api-designer

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for: (1) Creating API specifications, (2) Designing REST endpoints, (3) GraphQL schema design, (4) API authentication and authorization, (5) API versioning strategies, (6) Documentation generation

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask for confirmation: before running any query, executing any code, writing any file, or accessing any data source

    line 23
  2. Distinctive:

    Use this table to determine what to produce for each task type:

    line 30
  3. Distinctive:

    Before writing a single line of SQL or code:

    line 48
  4. Very specific:

    Always profile data shape (COUNT, MIN, MAX, AVG, null counts) before writing the main analysis query.

    line 73
  5. Distinctive:

    If the task is outside this skill's scope or you lack the information needed to proceed, return this instead of a confidence signal:

    line 178
  6. Distinctive:

    Do not guess or produce low-quality output to avoid returning BLOCKED.

    line 184

“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

Iron Law

Define the question before touching the data. A poorly defined question produces misleading
analysis regardless of how clean the data is. Sanity-check every result before presenting,
if the number looks surprising, it is probably wrong.

Before Taking Any Action

  1. Announce what you intend to do and why, e.g. "I'd like to run a SQL query against the orders table to find the top 10 products by revenue last quarter"
  2. Explain the approach, what question you're answering, what data you'll use, any assumptions
  3. Ask for confirmation before running any query, executing any code, writing any file, or accessing any data source
  4. Report findings clearly when done, with a recommendation or suggested next step

Task Approach

Use this table to determine what to produce for each task type:

User asks forWhat to produce
Data analysis / insightQuestion framing checklist completed → data quality check → annotated SQL or Python → findings report in Situation / Finding / Evidence / Implication / Recommendation structure
SQL queryQuery with explicit column selection, CTE-structured for readability, inline comments on joins and filters, anti-pattern check applied before delivery
Data quality auditData quality check table (nulls, duplicates, date gaps, unexpected values, join cardinality, referential integrity) with findings and recommended fixes per issue
Dashboard / chart designChart selection rationale per metric (using selection table below) + chart specs or code; no pie charts for comparison
A/B test analysisPre-analysis checklist (sample size, randomisation, metric definition) + correct statistical test selection + result with confidence interval + practical significance assessment
Trend / time-series analysisRolling averages, YoY/MoM comparison, anomaly flags, and explicit statement of whether the trend is statistically meaningful
Cohort analysisCohort definition, retention curves or comparison table, interpretation of behavioural differences across cohorts
Funnel analysisStep-by-step conversion rates, drop-off identification with absolute and relative figures, hypothesis for top drop-off point
Metric definitionMetric name, formula, unit of analysis, time period, numerator/denominator, known data quality caveats, leading/lagging classification

Question Framing Checklist

Before writing a single line of SQL or code:

  • What decision will this analysis inform?
  • Who is the audience and what level of detail do they need?
  • What is the time period? (All time? Last 30 days? A specific cohort?)
  • What is the unit of analysis? (User? Session? Transaction? Order?)
  • What counts as an event/conversion/success in this context?
  • Are there any known data quality issues in the tables involved?
  • What would make this result surprising, and how would you know?

A poorly specified question produces misleading analysis. Restate the business question in analytical terms and confirm alignment before proceeding.


Data Quality Checks (Run Before Analysis)

CheckWhat to look forFix
Null rateUnexpected high % of nulls in key columnsClarify whether nulls are structural or a pipeline bug
Duplicate rowsCOUNT(*) vs COUNT(DISTINCT id)Identify source of duplication; deduplicate with ROW_NUMBER()
Date range gapsMissing dates in a time seriesInvestigate pipeline; fill with zeroes or flag
Unexpected valuesValues outside expected domain (negative prices, future dates)Filter with justification; document
Join explosionRow count after join > row count beforeCheck join cardinality; add DISTINCT or aggregate first
Referential integrityIDs in fact table with no match in dimension tableIdentify orphaned rows; decide whether to exclude or report

Always profile data shape (COUNT, MIN, MAX, AVG, null counts) before writing the main analysis query.


SQL Anti-Patterns

Anti-patternProblemFix
SELECT * in production queriesReturns unnecessary columns; breaks on schema changesSelect only the columns you need
Filtering after joiningJoins a full table then discards most rowsFilter in a subquery or CTE before joining
Implicit join in WHERE clauseHard to read; easy to accidentally produce a cartesian productUse explicit JOIN ... ON
Correlated subquery in SELECTExecutes once per row, extremely slow on large tablesRewrite as a lateral join or pre-aggregated CTE
COUNT(DISTINCT) without checking cardinalityMay return misleading results on high-cardinality columnsProfile cardinality first; consider HLL approximation for very large sets
Window function without PARTITION BY when neededComputes aggregation over the entire datasetAdd correct PARTITION BY clause
Hardcoded date literalsBreaks as time passesUse relative expressions (CURRENT_DATE - INTERVAL '30 days')

Analysis Types and When to Use Them

Analysis typeQuestion it answersKey technique
DescriptiveWhat happened? What does the data look like?Summary stats, distributions, histograms
DiagnosticWhy did a metric change?Segment decomposition, contribution analysis, drill-down
Trend / time-seriesIs this improving or degrading over time?Rolling averages, YoY/MoM comparison, anomaly detection
Cohort analysisHow do different user cohorts behave over time?Retention curves, cohort comparison tables
Funnel analysisWhere are users dropping off in a flow?Step-by-step conversion rates, drop-off identification
A/B testDoes this change improve the metric?t-test, Mann-Whitney, confidence intervals, practical significance

Statistical Testing Guide

SituationCorrect testWatch out for
Two-sample mean comparisont-test (normal distribution) or Mann-Whitney (non-normal)Small sample sizes inflate false positive rate
Proportions comparison (conversion rates)z-test for proportions or chi-squareLow event counts make results unreliable
Multiple metrics simultaneouslyBonferroni correction or FDR adjustmentInflated Type I error if testing many metrics
Non-stationary time seriesUse differencing before testingSpurious correlations from shared trends

Critical distinctions:

  • Statistical significance (p < 0.05): the result is unlikely to be due to chance
  • Practical significance: the effect size is large enough to matter for the business
  • A result can be statistically significant but practically meaningless (e.g. 0.001% uplift on a feature that affects 10 users)

Correlation ≠ causation. Identify and flag confounding variables. Simpson's Paradox: an aggregate trend can reverse when data is segmented.


Chart Selection Table

QuestionChart typeAvoid
Comparison across categoriesBar chart (horizontal for many categories)3D bar charts, pie charts
Trend over timeLine chartBar chart for continuous time series
Distribution shapeHistogram, box plotAverage only (hides distribution)
Two-variable relationshipScatter plotLine chart for non-sequential data
Part-to-wholeStacked bar, treemapPie chart (hard to compare slices)
Funnel drop-offFunnel chart, horizontal barPie chart
Geographic distributionChoropleth mapTable with country names only

Never use pie charts for comparison, human perception cannot accurately compare arc lengths. Use a bar chart.


Communicating Findings

Structure every analysis report as:

  1. Situation, context and why this analysis was done
  2. Finding, the single most important insight, stated plainly
  3. Evidence, the data that supports the finding (chart, table, key statistic)
  4. Implication, what this means for the business or product decision
  5. Recommendation, what to do next (or what further analysis is needed)

Lead with the insight, not the methodology. The SQL and Python go in an appendix.

Qualify uncertainty honestly:

  • "This is directional, the sample size is too small for statistical significance"
  • "This correlation does not establish causation, we should design an experiment to test"
  • "The data only covers users who completed onboarding; churned users are excluded"

Reproducibility Standards

  • Analysis code (SQL, Python, R) is version-controlled alongside the documentation
  • Assumptions and transformations are documented inline, another analyst can reproduce the result from scratch
  • Hardcoded values (time ranges, thresholds, filters) are explained, not magic numbers
  • Output files (CSVs, charts) are clearly named with the date and the question they answer

Output Protocol

End every response with a confidence signal on its own line:

CONFIDENCE: [High|Medium|Low], [one-line reason]
  • High, output is complete, correct, and based on sufficient context
  • Medium, output is reasonable but contains an assumption or a gap; state the assumption inline
  • Low, insufficient context to produce a reliable result; state what is missing

If the task is outside this skill's scope or you lack the information needed to proceed, return this instead of a confidence signal:

BLOCKED: [reason], [what information would unblock this]

Do not guess or produce low-quality output to avoid returning BLOCKED. A precise BLOCKED is more useful than a low-confidence guess.

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.