Skill Tracer
Skills › Knowledge Work Plugins › data-context-extractor

data-context-extractor

skill · 227 lines · Apache-2.0 · data/skills/data-context-extractor/SKILL.md

The facts

Its description

Generate or improve a company-specific data analysis skill by extracting tribal knowledge from analysts. BOOTSTRAP MODE - Triggers: "Create a data context skill", "Set up data analysis for our warehouse", "Help me create a skill for our database", "Generate a data skill for [company]" → Discovers schemas, asks key questions, generates initial skill with reference files ITERATION MODE - Triggers: "Add context about [domain]", "The skill needs more info about [topic]", "Update the data skill with [metrics/tables/terminology]", "Improve the [domain] reference" → Loads existing skill, asks targeted questions, appends/updates reference files Use when data analysts want Claude to understand their company's specific data warehouse, terminology, metrics definitions, and common query patterns.

The description the agent reads to decide when to use it.

From its settingsline 3

When it starts

The agent picks this when a data analyst wants to create a company-specific data analysis skill for their warehouse, or wants to add more domain context to one that already exists. The description names two modes — bootstrap (build from scratch) and iteration (extend an existing skill) — and lists the phrases that trigger each.

Things a person might say (the model's guesses)

  • “Create a data context skill for our Snowflake warehouse”
  • “Help me set up data analysis for our database”
  • “The data skill needs more info about our marketing tables”

A model's summary of when it is used.

A model's reading

Files it mentions

references/skill-template.md, references/sql-dialects.md, references/domain-template.md

Files the text names, such as ones to read or write. Found by matching words, so treat them as pointers.

Found by matching wordsline 132 line 134 line 136

Licence

Apache-2.0, from data/LICENSE

The terms its author shares it under, which let it be shown here.

From the repositorylicence text
Other files in this skill (5) Close

The text

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1---
2name: data-context-extractor
3description: >
4 Generate or improve a company-specific data analysis skill by extracting tribal knowledge from analysts.
5
6 BOOTSTRAP MODE - Triggers: "Create a data context skill", "Set up data analysis for our warehouse",
7 "Help me create a skill for our database", "Generate a data skill for [company]"
8 → Discovers schemas, asks key questions, generates initial skill with reference files
9
10 ITERATION MODE - Triggers: "Add context about [domain]", "The skill needs more info about [topic]",
11 "Update the data skill with [metrics/tables/terminology]", "Improve the [domain] reference"
12 → Loads existing skill, asks targeted questions, appends/updates reference files
14 Use when data analysts want Claude to understand their company's specific data warehouse,
15 terminology, metrics definitions, and common query patterns.
16---
18# Data Context Extractor
20A meta-skill that extracts company-specific data knowledge from analysts and generates tailored data analysis skills.

Data Context Extractor

A meta-skill that extracts company-specific data knowledge from analysts and generates tailored data analysis skills.

Raw lines 1 to 21
22## How It Works
24This skill has two modes:
261. **Bootstrap Mode**: Create a new data analysis skill from scratch
272. **Iteration Mode**: Improve an existing skill by adding domain-specific reference files
29---

How It Works

This skill has two modes:

  1. Bootstrap Mode: Create a new data analysis skill from scratch
  2. Iteration Mode: Improve an existing skill by adding domain-specific reference files

Raw lines 22 to 30
31## Bootstrap Mode
33Use when: User wants to create a new data context skill for their warehouse.

Bootstrap Mode

Use when: User wants to create a new data context skill for their warehouse.

Raw lines 31 to 34
35### Phase 1: Database Connection & Discovery
37**Step 1: Identify the database type**
39Ask: "What data warehouse are you using?"
41Common options:
42- **BigQuery**
43- **Snowflake**
44- **PostgreSQL/Redshift**
45- **Databricks**
47Use `~~data warehouse` tools (query and schema) to connect. If unclear, check available MCP tools in the current session.
49**Step 2: Explore the schema**
51Use `~~data warehouse` schema tools to:
521. List available datasets/schemas
532. Identify the most important tables (ask user: "Which 3-5 tables do analysts query most often?")
543. Pull schema details for those key tables
56Sample exploration queries by dialect:
57```sql
58-- BigQuery: List datasets
59SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA
61-- BigQuery: List tables in a dataset
62SELECT table_name FROM `project.dataset.INFORMATION_SCHEMA.TABLES`
64-- Snowflake: List schemas
65SHOW SCHEMAS IN DATABASE my_database
67-- Snowflake: List tables
68SHOW TABLES IN SCHEMA my_schema
69```

Phase 1: Database Connection & Discovery

Step 1: Identify the database type

Ask: "What data warehouse are you using?"

Common options:

  • BigQuery
  • Snowflake
  • PostgreSQL/Redshift
  • Databricks

Use ~~data warehouse tools (query and schema) to connect. If unclear, check available MCP tools in the current session.

Step 2: Explore the schema

Use ~~data warehouse schema tools to:

  1. List available datasets/schemas
  2. Identify the most important tables (ask user: "Which 3-5 tables do analysts query most often?")
  3. Pull schema details for those key tables

Sample exploration queries by dialect:

-- BigQuery: List datasets
SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA

-- BigQuery: List tables in a dataset
SELECT table_name FROM `project.dataset.INFORMATION_SCHEMA.TABLES`

-- Snowflake: List schemas
SHOW SCHEMAS IN DATABASE my_database

-- Snowflake: List tables
SHOW TABLES IN SCHEMA my_schema
Raw lines 35 to 70
Uses an outside tool ~~data :47
Uses an outside tool MCP :47
71### Phase 2: Core Questions (Ask These)
73After schema discovery, ask these questions conversationally (not all at once):
75**Entity Disambiguation (Critical)**
76> "When people here say 'user' or 'customer', what exactly do they mean? Are there different types?"
78Listen for:
79- Multiple entity types (user vs account vs organization)
80- Relationships between them (1:1, 1:many, many:many)
81- Which ID fields link them together
83**Primary Identifiers**
84> "What's the main identifier for a [customer/user/account]? Are there multiple IDs for the same entity?"
86Listen for:
87- Primary keys vs business keys
88- UUID vs integer IDs
89- Legacy ID systems
91**Key Metrics**
92> "What are the 2-3 metrics people ask about most? How is each one calculated?"
94Listen for:
95- Exact formulas (ARR = monthly_revenue × 12)
96- Which tables/columns feed each metric
97- Time period conventions (trailing 7 days, calendar month, etc.)
99**Data Hygiene**
100> "What should ALWAYS be filtered out of queries? (test data, fraud, internal users, etc.)"
102Listen for:
103- Standard WHERE clauses to always include
104- Flag columns that indicate exclusions (is_test, is_internal, is_fraud)
105- Specific values to exclude (status = 'deleted')
107**Common Gotchas**
108> "What mistakes do new analysts typically make with this data?"
110Listen for:
111- Confusing column names
112- Timezone issues
113- NULL handling quirks
114- Historical vs current state tables

Phase 2: Core Questions (Ask These)

After schema discovery, ask these questions conversationally (not all at once):

Entity Disambiguation (Critical)

"When people here say 'user' or 'customer', what exactly do they mean? Are there different types?"

Listen for:

  • Multiple entity types (user vs account vs organization)
  • Relationships between them (1:1, 1:many, many:many)
  • Which ID fields link them together

Primary Identifiers

"What's the main identifier for a [customer/user/account]? Are there multiple IDs for the same entity?"

Listen for:

  • Primary keys vs business keys
  • UUID vs integer IDs
  • Legacy ID systems

Key Metrics

"What are the 2-3 metrics people ask about most? How is each one calculated?"

Listen for:

  • Exact formulas (ARR = monthly_revenue × 12)
  • Which tables/columns feed each metric
  • Time period conventions (trailing 7 days, calendar month, etc.)

Data Hygiene

"What should ALWAYS be filtered out of queries? (test data, fraud, internal users, etc.)"

Listen for:

  • Standard WHERE clauses to always include
  • Flag columns that indicate exclusions (is_test, is_internal, is_fraud)
  • Specific values to exclude (status = 'deleted')

Common Gotchas

"What mistakes do new analysts typically make with this data?"

Listen for:

  • Confusing column names
  • Timezone issues
  • NULL handling quirks
  • Historical vs current state tables
Raw lines 71 to 115
116### Phase 3: Generate the Skill
118Create a skill with this structure:
120```
121[company]-data-analyst/
122├── SKILL.md
123└── references/
124 ├── entities.md # Entity definitions and relationships
125 ├── metrics.md # KPI calculations
126 ├── tables/ # One file per domain
127 │ ├── [domain1].md
128 │ └── [domain2].md
129 └── dashboards.json # Optional: existing dashboards catalog
130```
132**SKILL.md Template**: See `references/skill-template.md`
134**SQL Dialect Section**: See `references/sql-dialects.md` and include the appropriate dialect notes.
136**Reference File Template**: See `references/domain-template.md`

Phase 3: Generate the Skill

Create a skill with this structure:

[company]-data-analyst/
├── SKILL.md
└── references/
    ├── entities.md          # Entity definitions and relationships
    ├── metrics.md           # KPI calculations
    ├── tables/              # One file per domain
    │   ├── [domain1].md
    │   └── [domain2].md
    └── dashboards.json      # Optional: existing dashboards catalog

SKILL.md Template: See references/skill-template.md

SQL Dialect Section: See references/sql-dialects.md and include the appropriate dialect notes.

Reference File Template: See references/domain-template.md

Raw lines 116 to 137
138### Phase 4: Package and Deliver
1401. Create all files in the skill directory
1412. Package as a zip file
1423. Present to user with summary of what was captured
144---

Phase 4: Package and Deliver

  1. Create all files in the skill directory
  2. Package as a zip file
  3. Present to user with summary of what was captured

Raw lines 138 to 145
146## Iteration Mode
148Use when: User has an existing skill but needs to add more context.

Iteration Mode

Use when: User has an existing skill but needs to add more context.

Raw lines 146 to 149
150### Step 1: Load Existing Skill
152Ask user to upload their existing skill (zip or folder), or locate it if already in the session.
154Read the current SKILL.md and reference files to understand what's already documented.

Step 1: Load Existing Skill

Ask user to upload their existing skill (zip or folder), or locate it if already in the session.

Read the current SKILL.md and reference files to understand what's already documented.

Raw lines 150 to 155
156### Step 2: Identify the Gap
158Ask: "What domain or topic needs more context? What queries are failing or producing wrong results?"
160Common gaps:
161- A new data domain (marketing, finance, product, etc.)
162- Missing metric definitions
163- Undocumented table relationships
164- New terminology

Step 2: Identify the Gap

Ask: "What domain or topic needs more context? What queries are failing or producing wrong results?"

Common gaps:

  • A new data domain (marketing, finance, product, etc.)
  • Missing metric definitions
  • Undocumented table relationships
  • New terminology
Raw lines 156 to 165
166### Step 3: Targeted Discovery
168For the identified domain:
1701. **Explore relevant tables**: Use `~~data warehouse` schema tools to find tables in that domain
1712. **Ask domain-specific questions**:
172 - "What tables are used for [domain] analysis?"
173 - "What are the key metrics for [domain]?"
174 - "Any special filters or gotchas for [domain] data?"
1763. **Generate new reference file**: Create `references/[domain].md` using the domain template

Step 3: Targeted Discovery

For the identified domain:

  1. Explore relevant tables: Use ~~data warehouse schema tools to find tables in that domain
  2. Ask domain-specific questions:
  3. "What tables are used for [domain] analysis?"
  4. "What are the key metrics for [domain]?"
  5. "Any special filters or gotchas for [domain] data?"
  1. Generate new reference file: Create references/[domain].md using the domain template
Raw lines 166 to 177
Uses an outside tool ~~data :170
178### Step 4: Update and Repackage
1801. Add the new reference file
1812. Update SKILL.md's "Knowledge Base Navigation" section to include the new domain
1823. Repackage the skill
1834. Present the updated skill to user
185---

Step 4: Update and Repackage

  1. Add the new reference file
  2. Update SKILL.md's "Knowledge Base Navigation" section to include the new domain
  3. Repackage the skill
  4. Present the updated skill to user

Raw lines 178 to 186
187## Reference File Standards
189Each reference file should include:

Reference File Standards

Each reference file should include:

Raw lines 187 to 190
191### For Table Documentation
192- **Location**: Full table path
193- **Description**: What this table contains, when to use it
194- **Primary Key**: How to uniquely identify rows
195- **Update Frequency**: How often data refreshes
196- **Key Columns**: Table with column name, type, description, notes
197- **Relationships**: How this table joins to others
198- **Sample Queries**: 2-3 common query patterns

For Table Documentation

  • Location: Full table path
  • Description: What this table contains, when to use it
  • Primary Key: How to uniquely identify rows
  • Update Frequency: How often data refreshes
  • Key Columns: Table with column name, type, description, notes
  • Relationships: How this table joins to others
  • Sample Queries: 2-3 common query patterns
Raw lines 191 to 199
200### For Metrics Documentation
201- **Metric Name**: Human-readable name
202- **Definition**: Plain English explanation
203- **Formula**: Exact calculation with column references
204- **Source Table(s)**: Where the data comes from
205- **Caveats**: Edge cases, exclusions, gotchas

For Metrics Documentation

  • Metric Name: Human-readable name
  • Definition: Plain English explanation
  • Formula: Exact calculation with column references
  • Source Table(s): Where the data comes from
  • Caveats: Edge cases, exclusions, gotchas
Raw lines 200 to 206
207### For Entity Documentation
208- **Entity Name**: What it's called
209- **Definition**: What it represents in the business
210- **Primary Table**: Where to find this entity
211- **ID Field(s)**: How to identify it
212- **Relationships**: How it relates to other entities
213- **Common Filters**: Standard exclusions (internal, test, etc.)
215---

For Entity Documentation

  • Entity Name: What it's called
  • Definition: What it represents in the business
  • Primary Table: Where to find this entity
  • ID Field(s): How to identify it
  • Relationships: How it relates to other entities
  • Common Filters: Standard exclusions (internal, test, etc.)

Raw lines 207 to 216
217## Quality Checklist
219Before delivering a generated skill, verify:
221- [ ] SKILL.md has complete frontmatter (name, description)
222- [ ] Entity disambiguation section is clear
223- [ ] Key terminology is defined
224- [ ] Standard filters/exclusions are documented
225- [ ] At least 2-3 sample queries per domain
226- [ ] SQL uses correct dialect syntax
227- [ ] Reference files are linked from SKILL.md navigation section

Quality Checklist

Before delivering a generated skill, verify:

  • [ ] SKILL.md has complete frontmatter (name, description)
  • [ ] Entity disambiguation section is clear
  • [ ] Key terminology is defined
  • [ ] Standard filters/exclusions are documented
  • [ ] At least 2-3 sample queries per domain
  • [ ] SQL uses correct dialect syntax
  • [ ] Reference files are linked from SKILL.md navigation section
Raw lines 217 to 227

From anthropics/knowledge-work-plugins at 2574e29, 2026-10-27. Skills read by DeepSeek V4.1 Flash on 2026-11-04. Summary and techniques by Claude Opus 5.5 on 2026-11-06.