time-travel is a premortem agent for Claude Code and Codex. You hand it a plan. It travels six months ahead, finds the plan dead, and comes back with the autopsy: what killed it, month by month, traced to the exact line of your plan that let it happen. Then it rebuilds the plan, plays your rival, and sets one measurable alarm per cause of death so you see it coming.
It never tells you the plan is great. A deterministic gate refuses the trip if it tries.
A real Claude Code session, recorded in the terminal with VHS; only the shell setup line is hidden. The four waits where only the thinking spinner moves are cut and labelled on screen; nothing is sped up. Whole session in real time (178 s): docs/demo-full.mp4. How it was recorded: recorded-session/run.md.
Why
A premortem (Gary Klein, Harvard Business Review, 2007) flips the question from "will this work?" to "it failed; why?". Klein builds on research on prospective hindsight (Mitchell, Russo and Pennington, 1989): imagining that an event has already happened raised the number of reasons people found for it by 30%. Language models are polite by default, so a premortem done by asking nicely comes back as seven generic risks and a compliment. time-travel turns the method into five legs with a checklist between each, so the output is specific enough to act on.
Install
You need Python 3.10+, gh logged in (the repository is private), and Claude Code, Codex or both.
gh auth login && gh auth setup-git
gh api repos/Pierry/time-travel/contents/install.sh -H "Accept: application/vnd.github.raw" | bash
The installer finds which CLIs you have and installs into each. Open a new session afterwards.
Install by hand, or into one host only
| Host | Install | Update |
|---|
| Claude Code | claude plugin marketplace add Pierry/time-travel
claude plugin install time-travel@time-travel | claude plugin marketplace update time-travel && claude plugin update time-travel@time-travel |
| Codex | codex plugin marketplace add Pierry/time-travel
codex plugin add time-travel@time-travel | codex plugin marketplace upgrade time-travel |
| Any other agent | clone the repository and point the agent at AGENTS.md | git pull |
Installer options: TARGET=claude|codex|both, SCOPE=user|project|local (Claude Code), REPO=owner/name for a fork.
Use
In Claude Code:
/time-travel:premortem launch my SaaS in 8 weeks with $5k, aiming for 200 customers in 6 months
/time-travel:premortem docs/plans/q1-migration.md
premortem the plan we just discussed
In Codex, mention the skill or just ask:
$premortem I'm quitting my job in March to open a coffee shop. Savings: 9 months.
run a premortem on ROADMAP.md
If the plan has no goal, timeline, budget or definition of success, it asks for them once, in one message, at most three questions. Whatever you leave out is written as not given, and a missing answer is often cause of death number one.
The five legs