AI agents debug the present. Production bugs live in the past.
An agentic skill that teaches your AI agent to time-travel through git history when debugging. No tools, no setup — just drop the skill in and it activates automatically when it detects temporal bug context.
---You paste an error trace into your AI agent. It scans the current code, confidently points to a line — but that line was rewritten after the crash. The actual bug was a missing null check that existed before yesterday's merge.
You just spent 45 minutes debugging code that didn't cause the failure.
Every agent today analyzes HEAD. But HEAD is not where the bug happened. The code that crashed in production at 3am is buried under 14 commits of hotfixes, refactors, and feature work that landed since.
Temporal Debug fixes this by giving your agent the ability to step back in time.
The skill activates automatically when your agent detects a time-anchored bug:
You: "We have a crash in production from 3 hours ago. The trace says
NullPointerException in PaymentService.java."Agent (with this skill):
- Runs
git log --before="3 hours ago" -1 --format="%H"→ gets commita1b2c3d- Runs
git worktree add /tmp/temporal-debug-a1b2c3d a1b2c3d→ isolated snapshot- Reads
PaymentService.javafrom the worktree, analyzes the historical code- Runs
git worktree remove --force /tmp/temporal-debug-a1b2c3d→ cleanup- Reports: "In commit
a1b2c3d(3 hours ago),PaymentService.java:42accessesuser.getEmail()without a null check.useris null for guest checkouts. Introduced in commitf8e9d0a."
Install via skills.sh (recommended)
npx skills add MeherBhaskar/temporal-debug-skillThis auto-detects your agents (Claude Code, Cursor, Codex, Windsurf, etc.) and installs the skill to the right directory. No manual setup needed.
If you don't want to use npx, you can manually clone this workflow and point your AI agent directly to the skill file:
git clone https://github.com/MeherBhaskar/temporal-debug-skill.git .agents/temporal-debugThen, simply tell your coding agent (Cursor, Claude Code, etc.) to use it:
"Load
.agents/temporal-debug/skills/temporal-debug/SKILL.mdas a persistent rule."
| ✅ Does | ❌ Doesn't |
|---|---|
| Detects temporal context in user messages | Need you to invoke a CLI tool |
| Resolves "3 hours ago", "v2.4.1", "last night" to commits | Require external scripts |
Creates isolated git worktree snapshots |
Touch your working directory |
| Guides analysis inside the historical snapshot | Analyze code for you (you already do that) |
| Cleans up worktrees automatically | Install dependencies (you already know how) |
| Works with any git repo, any language | Require Python, Node, or any runtime |
Agents already know how to:
- Read files, grep,
git log,git diff,git show - Trace execution paths, analyze code
- Install dependencies (
npm install,pip install, etc.)
Agents struggle with:
- Fuzzy time → commit resolution ("last night's deploy" →
a1b2c3d) - Clean
git worktreelifecycle (create, track, guarantee cleanup)
This skill bridges only that gap. It gives the agent the git commands to resolve time and manage worktrees. The agent does the rest.
You: "Crash from 3 hours ago:
NullPointerException in PaymentService.java" Agent: Resolves commit → creates worktree → analyzes historicalPaymentService.java→ finds missing null check → cleans up → reports root cause with commit reference
You: "Users on v2.4.1 report auth failures" (attaches error log) Agent: Resolves tag
v2.4.1→ worktree → analyzes auth middleware → finds regex bug skipping validation for/health-records→ reports fix from v2.4.2
You: "This endpoint 200'd last week, now 500s. Changelog shows nothing." Agent: Resolves "last week" → creates two worktrees (last week + HEAD) → diffs relevant modules → finds pool size config regression from 50 → 10
- Git 2.17+ (for
git worktreesupport) - A git repository with commit history
That's it. No Python, no Node, no install.
You could paste "use git log --before and git worktree add" into your agent every time. But:
- You'd have to remember to do it on every temporal bug
- You'd need to handle worktree cleanup (agents forget, leaving stale worktrees)
- You'd need to know the right git incantation for each clue type (tags vs. relative time vs. ISO dates)
- The agent would likely still default to analyzing HEAD and miss the historical context
This skill makes it automatic. The agent detects temporal context and activates the right workflow — no prompting required.
We welcome contributions! The entire skill lives in a single file: skills/temporal-debug/SKILL.md.
git clone https://github.com/MeherBhaskar/temporal-debug-skill.git
cd temporal-debug-skill
# Edit skills/temporal-debug/SKILL.mdSee CONTRIBUTING.md for guidelines and design principles.
MIT — use it, fork it, ship it.