sheet-schema-drift

Detect schema drift between TAB_MAP headers and Google Sheet columns.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/blucsigma05/tbm-apps-script --skill sheet-schema-drift
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sheet-schema-drift
Source: https://github.com/blucsigma05/tbm-apps-script/tree/main/.claude/scheduled-tasks/sheet-schema-drift
Command: npx skills add https://github.com/blucsigma05/tbm-apps-script --skill sheet-schema-drift

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents silent failures when the Google Sheet column order or headers drift away from what the code’s TAB_MAP expects, which can cause reads to return wrong types and writes to corrupt data.

Core Features & Use Cases

  • Daily schema verification: Compares expected TAB_MAP tab headers against live sheet header data.
  • Actionable drift reporting: Distinguishes missing, extra, and reordered columns with escalating alert priorities.
  • Operational guardrails: Stops and files an issue if the required getSheetHeaders endpoint is unavailable, avoiding false comparisons.
  • Audit trail: Appends results to a “Schema Drift Log” page for PM visibility.

Quick Start

Schedule and run the sheet-schema-drift task so it pulls TAB_MAP expectations from DataEngine.gs and verifies live headers via the getSheetHeaders endpoint.

Frequently Asked Questions about sheet-schema-drift

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

FAQPage Schema
How do I detect Google Sheets column drift before it causes silent data corruption?

To detect Google Sheets column drift, you can schedule a verification task that compares expected TAB_MAP headers against live sheet headers, distinguishing missing, extra, or reordered columns to prevent silent data corruption. It then escalates alerts and logs the results for review.

What is sheet schema drift and how does it affect scheduled data tasks?

Sheet schema drift occurs when Google Sheet column order or headers change without corresponding code updates, causing scheduled data tasks to read wrong types or write corrupted data. Detecting this drift involves comparing expected TAB_MAP tab headers against actual live sheet headers to identify mismatches early.

How do I validate Google Sheet headers against a predefined tab map automatically?

You can validate Google Sheet headers automatically by scheduling a task that parses your TAB_MAP expectations and calls the getSheetHeaders endpoint per tab to compare live header data. It distinguishes missing, extra, and reordered columns, escalating prioritized alerts if discrepancies are found.

Does this schema validation approach require specific dependencies or endpoints?

Yes, this schema validation requires parsing a TAB_MAP from your DataEngine.gs file and accessing a getSheetHeaders endpoint to retrieve live sheet headers. If the required getSheetHeaders endpoint is unavailable, the task stops and files an issue to avoid false comparisons.

What happens when the getSheetHeaders endpoint is unavailable during a scheduled verification?

When the getSheetHeaders endpoint is unavailable during scheduled verification, the task stops and files an issue rather than proceeding with false comparisons. This operational guardrail ensures that schema drift detection does not report inaccurate missing or extra columns due to endpoint failures.

Can I track historical schema drift alerts for PM visibility?

Yes, you can track historical schema drift alerts because the task appends verification results to a Schema Drift Log page. This audit trail provides PM visibility into daily schema verifications, allowing you to review when missing, extra, or reordered columns were detected and escalated.