validate-data

Validate SQLite congressional trading pipeline data integrity and report quality issues.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/danny0926/NLP-data-for-trading --skill validate-data-danny0926
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-data
Source: https://github.com/danny0926/NLP-data-for-trading/tree/main/.claude/skills/validate-data
Command: npx skills add https://github.com/danny0926/NLP-data-for-trading --skill validate-data-danny0926

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validate congressional trading data integrity in SQLite database. Use when checking data quality, verifying pipeline output, or debugging data issues in senate_trades, house_trades, or ai_intelligence_signals tables.

Core Features & Use Cases

  • Table existence — Verify senate_trades, house_trades, institutional_holdings, ocr_queue, ai_intelligence_signals tables exist
  • Record counts — Report row counts per table
  • Recency — Show the most recent filing_date or timestamp per table to confirm freshness
  • Required fields — Check for NULL values in NOT NULL columns (politician_name, filing_date, ptr_link, data_hash)
  • Ticker format — Flag any ticker values that don't match ^[A-Z]{1,5}$
  • Duplicate hashes — Check for duplicate data_hash values in senate_trades and house_trades
  • Date sanity — Flag any transaction_date in the future or before 2020
  • AI signals — Check ai_intelligence_signals for NULL impact_score or missing source_name

Quick Start

Run the validator against data/data.db to perform all integrity checks.

Frequently Asked Questions about validate-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate data quality in a SQLite database for congressional trades?

Validate SQLite data quality by running deterministic checks on congressional trading tables like senate_trades and house_trades. The validator checks table existence, row counts, recency, required fields, ticker formats, duplicate hashes, and date sanity to report integrity issues.

What data validation checks are needed for AI intelligence signals in SQLite?

Data validation for AI intelligence signals checks the ai_intelligence_signals table for NULL impact_score values and missing source_name fields. This ensures AI signal integrity alongside standard checks for table existence and record recency.

How do I find duplicate data_hash entries in house and senate trading tables?

Find duplicate data_hash entries by running a validation script against your SQLite database. The validator identifies duplicate data_hash values in both senate_trades and house_trades tables to help maintain data quality and prevent redundant records.

Can I check for NULL values in required fields like politician_name and filing_date in SQLite?

Yes, you can check for NULL values in required SQLite fields including politician_name, filing_date, ptr_link, and data_hash. The validator reports any NULL values found in NOT NULL columns across congressional trading pipeline tables.

How do I flag invalid ticker formats and future transaction dates in a trading pipeline?

Flag invalid ticker formats by checking values against the ^[A-Z]{1,5}$ regex pattern, and flag future transaction dates by checking if transaction_date occurs in the future or before 2020. The validator reports both issues for SQLite trading data.

Does this data validation approach work for institutional holdings and OCR queue tables?

Yes, this data validation approach works for institutional_holdings and ocr_queue tables alongside senate_trades, house_trades, and ai_intelligence_signals. It validates table existence and row counts across all congressional trading pipeline tables using Python's sqlite3 module.