agentleFS
kayspiegelkayspiegel/survey-insight-skills/.agents/skills/data-check/SKILL.md

data-check

Skill2 starsChanged 3 months agoMITView on GitHub

Checks the data quality of a survey CSV before any substantive analysis: fill/completion rates, speeders (via completion time), straightlining, thinly filled columns. Gives a traffic-light assessment and recommendations. Result as Markdown to reports/. Use as the first step on a new file or when data quality is in doubt. Invoke with your request as the argument, e.g. /data-check [optional CSV path].

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run these from the project root.

    line 26
  2. Very specific:

    If a context document sits next to the CSV (<name>.context.md, or survey-context.md when the folder holds exactly one CSV), read it — and …

    line 39
  3. Distinctive:

    Verify contradictions with the engine before reporting them — a suspicion is not a finding.

    line 57
  4. Very specific:

    If no context document exists, run the check as before, and note in the report that the study design could not be verified — this is not a …

    line 63
  5. Distinctive:

    Check first, interpret later — this check is deliberately the first step.

    line 119

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “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-Quality Check

Goal: Before any substantive analysis, assess how trustworthy the data is, so that weak data doesn't lead to strong conclusions. Result as Markdown in reports/. A path in the user's request selects the CSV; otherwise the one in the folder.

Tool

python3 scripts/survey.py quality [--file CSV]
python3 scripts/survey.py profile [--file CSV]
python3 scripts/survey.py freq COL [--file CSV]

Run these from the project root. If scripts/survey.py is not there, check .claude/scripts/survey.py or locate survey.py in the project. quality directly returns:

  • Fill rate per column (thin columns < 50% flagged),
  • Completion time (median, range) and speeders (< 1/3 of the median duration),
  • Straightlining in detected rating batteries (identical answer across ≥3 shared scales).

freq is needed only to verify a suspected contradiction with the survey context (see below), not for the quality metrics themselves.

--json for structured values.

Survey context

If a context document sits next to the CSV (<name>.context.md, or survey-context.md when the folder holds exactly one CSV), read it — and then do something no other skill does: check it against the data. Everywhere else the context is background; here it is a claim under test.

A contradiction between what the context states and what the data show is a finding in its own right, often a more serious one than a handful of speeders:

  • Population vs. behavior. "Only active users were surveyed", but 12% say they never use the product → either the recruiting reached further than assumed, or the question is being read differently than intended. Both change how every later report must be worded.
  • Fieldwork vs. timestamps. The stated field period does not match the timestamps in the data → possibly the wrong export, a merge of several waves, or stale context.
  • Sample size vs. expectation. The context names a target group or a quota that the data cannot support (a segment that turns out to be n = 7).
  • Column notes vs. reality. A column named as the lead question is thinly filled, or a battery described as belonging together is not present in that form.

Verify contradictions with the engine before reporting them — a suspicion is not a finding. Describe what the context claims, what the data show, and what follows; do not decide which side is wrong. A contradiction that materially affects who the results speak for belongs in the overall verdict, not only in the details: data that are clean but describe a different population than assumed are not green.

If no context document exists, run the check as before, and note in the report that the study design could not be verified — this is not a defect of the data, but it is a limit of this check. Point at survey-context once at the end.

Approach

  1. Run quality (and profile if you need column types).
  2. Interpret the findings. For each dimension, judge whether it's harmless, worth watching, or problematic:
    • Thin columns → statements on those questions are only weakly supported.
    • Speeders → if a notable share, bias risk; consider exclusion.
    • Straightlining → sign of inattentive completion in batteries.
  3. Check the context against the data (see above), if a context document exists. Confirm every suspected contradiction with a concrete freq / profile output.
  4. Assign a traffic light (green / amber / red) with a short rationale.
  5. Derive recommendations (e.g. "avoid column X for detail questions", "review/exclude Y speeders", "treat results on Z with caution").
  6. Save the report to reports/ (date +%F_data-check, never overwrite) and give the traffic light + path in your reply.

Report format

# Data-quality check

**Data basis:** <file> · n = <…> · columns = <…> · <date>

## Overall verdict: 🟢 / 🟡 / 🔴
1–2 sentences: are the data fit for reliable analysis?

## Findings
| Dimension | Result | Assessment |
|---|---|---|
| Completeness | avg fill, thin columns: … | 🟢/🟡/🔴 |
| Completion time | median … min, speeders … % | … |
| Straightlining | … % in battery / none detected | … |

## Thinly filled columns
List of columns < 50% with the consequence for analysis.

## Context vs. data
Only when a context document exists. Per contradiction: what the context states, what the
data show (with the number), what follows from it. If nothing contradicts, one sentence
saying the stated study design is consistent with the data. Without a context document:
"not assessable — no context document; the study design could not be verified."

## Recommendations
Concrete do's/don'ts for the analysis ahead (including possible case exclusions).

## Method
`survey.py quality`: definitions (speeder < 1/3 median duration; straightlining =
identical answer across a whole rating battery). Name the context document if one was
checked against.

Rules

  • Check first, interpret later — this check is deliberately the first step.
  • Take metrics exactly from the quality output, don't estimate.
  • Clearly label missing timestamps/batteries as "not assessable", not as "good". The same goes for a missing context document — unverified is not the same as verified fine.
  • Name data-quality issues without dramatizing; make consequences concrete.
  • A contradiction with the survey context is reported, never resolved by picking a side — and never quietly dropped because the data look clean otherwise.
  • Report language default English.

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.