
Data Context Extractor
OfficialFreeTailor data analysis skills to your company's needs.
Free · Opens the source repo
What Data Context Extractor does
The Data Context Extractor is designed to help organizations create and refine data analysis skills that are specific to their internal data environments. This skill operates in two distinct modes: Bootstrap Mode and Iteration Mode. In Bootstrap Mode, users can generate a new data analysis skill from scratch, allowing them to establish a foundation that reflects their unique data warehouse structure and terminology. This is particularly useful for teams that need to onboard new analysts or streamline their data querying processes.
In Bootstrap Mode, the skill begins by establishing a connection to the relevant data warehouse, whether it’s BigQuery, Snowflake, PostgreSQL, or Databricks. It then explores the schema to identify key datasets and tables that analysts frequently query. By asking targeted questions about entity definitions, primary identifiers, and key metrics, the skill captures essential tribal knowledge that helps to clarify data usage within the organization. Ultimately, it generates a structured skill package that includes documentation on entities, metrics, and common queries, ensuring that analysts have the context they need to work effectively.
Iteration Mode, on the other hand, is intended for users who already have a data skill in place but require additional context or updates. This mode allows users to load their existing skills and identify gaps in documentation or understanding. By engaging in targeted discovery, the skill can append new reference files or update existing ones, thereby enhancing the overall quality and usability of the data skill. This iterative approach ensures that the skill evolves alongside the organization's data landscape, keeping it relevant and useful.
Overall, the Data Context Extractor is ideal for data analysts and teams who want to ensure that their data analysis capabilities are closely aligned with their specific business needs and terminologies. It simplifies the process of creating and maintaining data skills, which can lead to more efficient data analysis and better decision-making across the organization.
When to use it
Use this skill when you need to create a new data analysis capability or improve an existing one by incorporating specific company context and terminology.
When not to use it
This skill may not be suitable for organizations with very simple data needs or those that do not require customization of their data analysis skills.
What you can build with it
Creating a New Data Skill
A data analyst needs to establish a new skill for their company's data warehouse, ensuring it reflects internal terminology and metrics.
Updating Existing Documentation
An analyst realizes that the current data skill lacks context for a new marketing domain and uses Iteration Mode to enhance it.
Onboarding New Analysts
A team uses the Data Context Extractor to create a comprehensive skill package that helps new analysts quickly understand the company's data.
How to install Data Context Extractor
View source1. Install with the skills CLI
npx skills add anthropics/knowledge-work-plugins/data-context-extractor --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by anthropicsData Context Extractor
A meta-skill that extracts company-specific data knowledge from analysts and generates tailored data analysis skills.
How It Works
This skill has two modes:
- Bootstrap Mode: Create a new data analysis skill from scratch
- Iteration Mode: Improve an existing skill by adding domain-specific reference files
Bootstrap Mode
Use when: User wants to create a new data context skill for their warehouse.
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:
- List available datasets/schemas
- Identify the most important tables (ask user: "Which 3-5 tables do analysts query most often?")
- 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
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
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
Phase 4: Package and Deliver
- Create all files in the skill directory
- Package as a zip file
- Present to user with summary of what was captured
Iteration Mode
Use when: User has an existing skill but needs to add more context.
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.
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
Step 3: Targeted Discovery
For the identified domain:
-
Explore relevant tables: Use
~~data warehouseschema tools to find tables in that domain -
Ask domain-specific questions:
- "What tables are used for [domain] analysis?"
- "What are the key metrics for [domain]?"
- "Any special filters or gotchas for [domain] data?"
-
Generate new reference file: Create
references/[domain].mdusing the domain template
Step 4: Update and Repackage
- Add the new reference file
- Update SKILL.md's "Knowledge Base Navigation" section to include the new domain
- Repackage the skill
- Present the updated skill to user
Reference File Standards
Each reference file should include:
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
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
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.)
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
Frequently asked questions about Data Context Extractor
Similar skills
Power BI Semantic Modeling
Optimize your Power BI data models with best practices.
Power BI Performance Troubleshooting
Systematic guidance for optimizing Power BI performance.
Power BI Model Design Review
Optimize your Power BI data models with expert reviews.
Power BI DAX Formula Optimizer
Optimize your DAX formulas for better performance and clarity.
Fabric Lakehouse
Optimize your data solutions with Lakehouse best practices.
VSS Query Analytics
Read video analytics metrics and incidents via VA-MCP.
