Skip to content

Instantly share code, notes, and snippets.

@scgreenhalgh
scgreenhalgh / setup-claude-date-awareness.sh
Created January 13, 2026 16:26
Fix Claude Code's Outdated Solutions Problem Claude Code doesn't know the current date, so it often suggests deprecated APIs, old package versions, and outdated Stack Overflow solutions. This wrapper script fixes that by automatically injecting date context into your CLAUDE.md files. Every time you run `claude`, it updates your global CLAUDE.md …
#!/bin/bash
# setup-claude-date-awareness.sh
#
# Automatically injects current date context into Claude Code's CLAUDE.md files
# so Claude uses up-to-date solutions and documentation.
#
# Tested on: macOS (zsh/bash), Linux (bash/zsh/fish)
#
# Usage: