JackReis avatar

date-validation

Use when editing Planning Hubs, timelines, calendars, or any file with day-name + date combinations

作者 JackReis|オープンソース

Date Validation Skill

Prevents day-of-week errors, countdown math mistakes, and timeline inconsistencies before they reach files.

Installation

Option 1: Direct Download

  1. Download the latest release ZIP from Releases
  2. Extract to your Claude Code skills directory:
    unzip date-validation-skill-v1.0.0.zip -d ~/.claude/skills/
    
  3. Restart Claude Code
  4. The skill will auto-activate for date-related files

Option 2: Git Clone

cd ~/.claude/skills/
git clone https://github.com/JackReis/date-validation-skill.git date-validation

Verify Installation

The skill should appear in your Claude Code skills list. It will automatically trigger when editing:

  • Files matching patterns: *Planning-Hub.md, *Timeline*.md, calendar/**/*.md
  • Any content with day-name + date combinations (Wed Nov 12)
  • Countdown phrases (18 days until)

Quick Start

Automatic Activation

This skill automatically triggers when editing:

  • Planning or timeline documents (*Planning-Hub.md, *Timeline*.md)
  • Calendar notes (calendar/day/*.md, calendar/week/*.md)
  • Any file containing day-name + date combinations or countdown phrases

No manual action needed - the skill loads before Edit/Write executes.

Manual Activation

Use this skill explicitly via Claude Code skills interface or when you notice date-related work.


What It Checks

1. Day-Name ↔ Date Matching

Catches: "Wed Nov 12" when Nov 12 is actually Tuesday

Example:

❌ Found: "TODAY - WEDNESDAY, NOVEMBER 13"
✓ Fixed: "TOMORROW - THURSDAY, NOVEMBER 13"
(When today is Wed Nov 12)

2. Relative Date Calculations

Catches: "tomorrow" pointing to wrong date

Example:

❌ Found: "tomorrow (Nov 14)" when today is Nov 12
✓ Fixed: "tomorrow (Nov 13)"

3. Countdown Math

Catches: "18 days until Dec 1" when it's actually 19 days

Example:

❌ Found: "Move Date: Dec 1 (18 days from today!)"
✓ Fixed: "Move Date: Dec 1 (19 days from today!)"
(When today is Nov 12)

How It Works

Step 1: Ground Truth Establishment

Verifies "today" using TWO sources:

  1. <env>Today's date: ...</env> tag
  2. System date command

Both must agree. If they don't, all edits are blocked.

Why: Baseline testing showed agents trust anchor dates without verification. If anchor is wrong, all calculations are wrong.

Step 2: Comprehensive Scanning

Scans entire content for ALL date references:

  • Day-name + date patterns
  • Relative dates (today, tomorrow, in X days)
  • Countdown phrases

Why: Baseline showed agents "fix obvious error" but miss others. Comprehensive scanning catches all.

Step 3: Individual Validation

Validates EACH date independently using Python datetime calculations.

Why: Baseline showed agents "trust sequential patterns" even when all wrong. Individual validation catches propagated errors.

Step 4: Interactive Correction

For each error:

❌ Error: Day-name mismatch
Found: "Wed Nov 12"
Truth: November 12, 2025 is Tuesday

Options:
1. Tue Nov 12 (correct day name)
2. Wed Nov 13 (correct date)
3. Something else

Your choice: _

Why: Baseline showed agents need correction options with context. Interactive prompts prevent blind fixes.


What Makes This Different

This skill was designed using Test-Driven Development for documentation:

RED Phase: Ran 4 pressure scenarios WITHOUT the skill

  • Documented exactly how agents fail naturally
  • Captured 10 specific rationalizations agents use to skip validation

GREEN Phase: Wrote skill addressing those specific failures

  • Two-source ground truth (prevents anchor trust)
  • Comprehensive scanning (prevents spot-fixing)
  • Individual validation (prevents pattern trust)
  • Auto-trigger (prevents "only when suspicious")

Design principle: If we didn't watch an agent fail without the skill, we didn't know what to prevent.


Troubleshooting

"Ground truth mismatch" Error

❌ GROUND TRUTH MISMATCH
Environment: 2025-11-11
System: 2025-11-12

Cause: <env> tag stale from context compression

Fix: Restart Claude Code session

Sequential Errors

If validation finds multiple sequential dates are wrong:

  • Skill validates EACH date individually
  • Don't trust "looks consistent" - consistent ≠ correct
  • All dates could be wrong together (baseline testing proved this)

Version History

v1.0.0 (2025-11-12)

  • Initial release
  • Two-source ground truth verification
  • Comprehensive date scanning
  • Individual date validation
  • Interactive error correction
  • Tested with TDD methodology (4 pressure scenarios, 10 documented rationalizations)

License

MIT License

Author

Jack Reis (jackareis@gmail.com)