data-investigation
A workflow for conducting rigorous, reproducible data investigations and ad-hoc analyses.
Skill by Pedro / Kilo Code
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/kilo-org-data-investigation
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, marketing, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/data-investigation
What's inside
- Skill name
data-investigation- Description
- A workflow for conducting rigorous, reproducible data investigations and ad-hoc analyses. This skill should be used when investigating a business question, explaining a metric anomaly, validating a hypothesis, performing root cause analysis, or preparing a one-off investigation dashboard or memo.
- License
- Apache-2.0
- Metadata
- author: Pedro / Kilo Code · category: data
- Instructions
- 188 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Data Investigation
Use this skill to produce investigations that are fast, correct, reproducible,
and communicate a clear conclusion rather than a pile of charts.
## Purpose
Every investigation should be answerable in one sentence before the first SQL
query is written.
## Phase 1: Frame Before Querying
### 1. Write the one-sentence answer first
Before writing any SQL, write the sentence the conclusion is expected to be.
Example: `The cohort size gap is a definition problem rather than a product behavior problem.`
If the sentence cannot be written, the question is not yet understood.
### 2. Classify the investigation type
| Type | Trigger | Approach |
|---|---|---|
| Gap analysis | Why do A and B not match? | Establish the gap, localize it, explain it |
| Root cause | Why did this metric change? | Confirm real, isolate segment, align timing, validate mechanism |
| Hypothesis test | Is X causing Y? | Define what must be true, test sub-claims, confirm or reject |
| Feasibility check | Is this number trustworthy? | Check grain, joins, nulls, definition overlap |
### 3. State 2-3 competing hypotheses before querying
Never investigate with a single hypothesis. That creates confirmation bias.
Order hypotheses by plausibility and note which one is currently expected to be
correct and why.
## Phase 2: Build Queries In Escalating Specificity
### 1. Establish first, explain second
Step 1 always confirms the anomaly is real and measures its magnitude.
Do not jump to cause until the effect is confirmed.
```sql
select
<time_bucket>,
<source_a_count> as metric_a,
<source_b_count> as metric_b,
<source_a_count> - <source_b_count> as gap,
round(100.0 * (<source_a_count> - <source_b_count>) / nullif(<source_a_count>, 0), 1) as pct_gap
from ...
order by 1
```
### 2. Localize by breaking one dimension at a time
After confirming the gap, break it down along one dimension per step:
- By time: when did it appear?
- By segment: who is affected?
- By signal/source: which path is missing?
### 3. Align timing with upstream changes
Once the anomaly start date is known, check:
- git commits to relevant models, ETL jobs, or application code
- schema migrations or source changes
- metric definition changes
- external events such as launches, campaigns, or pricing changes
A credible root cause must explain why the metric changed when it did.
### 4. Validate the mechanism
After identifying a candidate cause, confirm it mechanically:
- Does the affected population match the predicted population?
- What does the counterfactual look like?
- Does a second independent signal support the explanation?
Do not stop at correlation.
### 5. Quantify each hypothesis before concluding
For every candidate explanation, produce a number.
Examples:
- `H1 accounts for 1,240 users`
- `H2 accounts for 1,050 users`
If a hypothesis cannot be quantified, it is not yet validated.
## Phase 3: SQL Hygiene Rules
### Use stable time bounds for investigations
Investigation SQL should be reproducible. Favor fixed bounds over rolling
windows unless the analysis is intentionally operational and evergreen.
```sql
-- Prefer fixed investigation scope
where created_at >= '2026-02-16'
and created_at < '2026-04-04'
```
### Add explicit grain comments in important CTEs
```sql
-- grain: one row per user
with users as (
...
)
```
### Prefer named comparison outputs over raw aggregates
Bad:
```sql
select count(*) from ...
```From Kilo-Org/kilo-marketplace, Apache-2.0.
More from Kilo-Org/kilo-marketplace
- 0.795score
database-redshift
christopher huffman
Amazon Redshift expert.
SkillAFreshness: A★ 195Claude Code +9 - 0.795score
cortex-code
Snowflake Integration Team
Routes Snowflake-related operations to Cortex Code CLI for specialized Snowflake expertise.
SkillAFreshness: A★ 195Claude Code +9 - 0.795score
dbt-analytics-engineering
dbt-labs
Builds and modifies dbt models, writes SQL transformations using ref() and source(), creates tests, and validates results with dbt show.
SkillAFreshness: A★ 195Claude Code +9 - 0.795score
dynamic-tables-tutorial
Snowflake
Interactive tutorial that teaches Snowflake Dynamic Tables hands-on.
SkillAFreshness: A★ 195Claude Code +9 - 0.791score
jupyter-notebook
Kilo
Use whenever the user works with Jupyter notebooks (`.ipynb`), including creating, inspecting, editing, executing, or visualizing notebook content for…
SkillAFreshness: A★ 195Claude Code +9 - 0.791score
gcp-event-driven-architecture-review
github: Raishin
Review GCP Pub/Sub, Eventarc, Cloud Tasks, Cloud Scheduler, and Workflows designs — dead-letter topics, message ordering, idempotency, fan-out blast radius…
SkillAFreshness: A★ 195Claude Code +9 - 0.789score
dbt
dbt-labs
Skills for analytics engineering with dbt - building models, writing tests, querying the semantic layer, troubleshooting jobs, and more.
SkillAFreshness: A★ 195Claude Code +9 - 0.786score
prefect
terminal-skills
Prefect is a modern workflow orchestration framework for Python data pipelines.
SkillAFreshness: A★ 195Claude Code +9 - 0.786score
dagster
terminal-skills
Dagster is a data pipeline orchestrator built around the concept of software-defined assets.
SkillAFreshness: A★ 195Claude Code +9 - 0.786score
apache-arrow
terminal-skills
Expert guidance for Apache Arrow, the cross-language columnar memory format for analytics workloads.
SkillAFreshness: A★ 195Claude Code +9 - 0.786score
cassandra
terminal-skills
Apache Cassandra is a distributed NoSQL database designed for high availability and linear scalability.
SkillAFreshness: A★ 195Claude Code +9 - 0.783score
dbt-migration
dbt-labs
Skills for migrating dbt projects - moving from dbt Core to the Fusion engine or across data platforms.
SkillAFreshness: A★ 195Claude Code +9
Signals
- Stars
- 195
- Forks
- 328
- Open issues
- 18
- Last commit (this folder)
- Jun 25, 2026 (4 months ago)
- Last release
- Sep 28, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/Kilo-Org/kilo-marketplace
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Cite this page
data-investigation skill. Agent Mart. https://agentmart.dev/skills/kilo-org-data-investigation (last updated 2026-10-24)