Automated summary
This skill provides data validation patterns with custom functions, schema evolution handling, and test assertions for data pipelines.
Strengths
- Modular approach with reusable validators and configurable pipelines.
- Test assertions integrated for easy quality assurance in unit tests.
- Supports Pydantic, Pandera, and Great Expectations depending on use case.
- Enables checking referential integrity, duplicates, and date ranges.
Limitations
- Requires basic pandas knowledge to configure pipelines.
- Examples focus on DataFrames, less suited for streaming data.
- Documentation does not cover production error handling (logging, alerts).
Use this skill when you need to implement custom business rule validation on DataFrames in an ETL pipeline or for data quality tests.
Avoid this skill if you work with real-time streaming data that requires on-the-fly validation without pandas.
Security analysis
SafeThe skill describes data validation patterns using pandas and custom Python functions. It does not instruct or perform any harmful actions, network operations, or execution of arbitrary commands. The allowed tools (Read, Write, Edit, Bash) are listed but not exploited for risky purposes in the provided examples. No exfiltration, obfuscation, or destructive instructions are present.
No concerns found
How this analysis is madeExamples
I have a DataFrame 'df' with column 'id'. Use the validate_no_duplicates function to check for duplicate rows and print the failed rows.Create a DataValidator that checks for no duplicates on 'id' and ensures 'created_at' is within 2020-01-01 to 2025-12-31. Apply it to df and print failed checks.In a pytest test, assert that columns 'id' and 'email' have no null values using assert_no_nulls.name: data-validation description: Data validation patterns and pipeline helpers. Custom validation functions, schema evolution, and test assertions. allowed-tools: Read Write Edit Bash
Data Validation
Audience: Data engineers building validation pipelines.
Goal: Provide validation patterns for custom business rules.
Framework-specific skills:
pydantic-validation- Record-level validation with Pydanticpandera-validation- DataFrame schema validationgreat-expectations- Pipeline expectations and monitoring
Scripts
Execute validation functions from scripts/validators.py:
from scripts.validators import (
ValidationResult,
DataValidator,
validate_no_duplicates,
validate_referential_integrity,
validate_date_range,
validate_value_in_set,
run_validation_pipeline,
validate_with_schema_version,
assert_schema_match,
assert_no_nulls,
assert_unique,
assert_values_in_set
)
Framework Selection
| Use Case | Framework | |----------|-----------| | API request/response | Pydantic | | Record-by-record ETL | Pydantic | | DataFrame validation | Pandera | | Type hints for DataFrames | Pandera | | Pipeline monitoring | Great Expectations | | Data warehouse checks | Great Expectations | | Custom business rules | Custom functions (this skill) |
Usage Examples
Basic Validation
from scripts.validators import validate_no_duplicates, validate_referential_integrity
# Check duplicates
result = validate_no_duplicates(df, cols=['id'])
if not result.passed:
print(f"Error: {result.message}")
print(result.failed_rows)
# Check referential integrity
result = validate_referential_integrity(df, 'user_id', users_df, 'id')
Validation Pipeline
from scripts.validators import DataValidator, validate_no_duplicates, validate_date_range
validator = DataValidator()
validator.add_check(lambda df: validate_no_duplicates(df, ['id']))
validator.add_check(lambda df: validate_date_range(df, 'created_at', '2020-01-01', '2025-12-31'))
results = validator.validate(df)
if not results['passed']:
for check in results['checks']:
if not check['passed']:
print(f"Failed: {check['message']}")
Config-Driven Pipeline
from scripts.validators import run_validation_pipeline
config = {
'unique_columns': ['id'],
'date_ranges': {
'created_at': ('2020-01-01', '2025-12-31'),
'updated_at': ('2020-01-01', '2025-12-31')
}
}
clean_df, results = run_validation_pipeline(df, config)
Test Assertions
from scripts.validators import assert_schema_match, assert_no_nulls, assert_unique
# In pytest
def test_data_quality():
assert_schema_match(df, {'id': 'int64', 'email': 'object'})
assert_no_nulls(df, ['id', 'email'])
assert_unique(df, ['id'])
Dependencies
pandas
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/data-validation-mm8o51xt/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/data-validation-mm8o51xt' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/data-validation-mm8o51xt/download' --output '.skill-downloads/data-validation-mm8o51xt/SKILL.md.part' && mv '.skill-downloads/data-validation-mm8o51xt/SKILL.md.part' '.skill-downloads/data-validation-mm8o51xt/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read Write Edit Bash
Original excerpt: Dependencies
pandas
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/data-validation-mm8o51xt/SKILL.md' && test -s '.skill-downloads/data-validation-mm8o51xt/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/data-validation' && cp -R '.skill-downloads/data-validation-mm8o51xt' '.claude/skills/data-validation'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/data-validation-mm8o51xt'openskills read 'data-validation-mm8o51xt'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/data-validation-mm8o51xt/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Create Interactive Maps with kepler.gl
Data & AI
Create interactive map visualizations and export standalone HTML using the keplergl Python package. Use to plot geospatial data from DataFrames, GeoJSON, or CSV.
Agent-Driven Parameter Optimization
Data & AI
Guide for optimizing configurable systems with a measurable objective, using bounded trials and evidence-based recommendations.
ICP Visitor Outreach
Data & AI
Identify signed-up users matching the ideal customer profile but stalled, and draft personalized outreach to re-engage them.