joeysim-skills

Lost the plot? Get the map.

I Lost the Plot is a skill for coding agents. After hours of side tasks, say "I lost the plot". Your agent reads the full session and the git state. You get the goal, a map of the open loops, and one next step.

npx skills add joeysim/joeysim-skills --skill i-lost-the-plot

Then tell your agent: I lost the plot.

Version 1.0.0. Made for Claude Code, where a script reads the session transcript. In Codex and other agents, the skill uses the conversation context. No Node.js? Download the ZIP.

You: "I lost the plot."

You set out to "stop the 429 storms" on the API gateway before Friday.
Right now the Redis counters are half done, and one test still fails.

Rate limits for the API gateway
├─ ✓ Token bucket middleware
├─ ▶ Redis counters                      ← you are here
│  └─ ○ 1  Fix the flaky counter test    fails 1 run in 5, cause is a guess
├─ ? 2  Limits per tenant or per key?    say "2 tenant" or "2 key"
├─ ○ 3  Write docs for the new headers   you said "later" at 13:40
├─ ✗ Limits in nginx
└─ ○ 4  Commit four changed files        branch rate-limit, last commit 13:55

▶ now   ○ open   ? needs you   ✓ done   ✗ dropped

Next: finish the Redis counters, because loop 1 is probably the same bug.
Say "go" to start that, a number to pick a different loop, or "drop 3" to close a loop.

  1. You are here. One line marks the work that was in progress at your last prompt.
  2. Each open loop is an action. The name starts with a verb. The note gives the evidence. A loop sits below the thread that caused it.
  3. Questions wait for you. The note gives the replies that answer the question.
  4. Done work takes one line. Finished and dropped work stays on the map, with no note.

This sample is fictional.

Answer in one word.

The plot ends with one recommended step. Until you reply, your agent only reads. It does not edit files, run tests, or continue a task.

  • Each reply is a normal prompt. The skill keeps no state file.
  • The numbers change with each plot. Thus your agent starts its answer with the name of the loop.
  • "drop" changes nothing in your files. The next plot shows the loop as dropped.
ReplyWhat your agent does
goDoes the step from the "Next:" line.
3Continues loop 3. First it tells what is left.
2 keyUses your answer for question 2. Then it continues the work that waited for it.
drop 3Marks loop 3 as dropped. No edits, no reverts, no deletes.
moreShows the older loops as a second map.

How your agent finds the plot

  1. Read the sessionA bundled script reads the transcript on disk. It also finds the prompts that context compaction removed.
  2. Read the workspaceThe same script gives the git state: the branch, the changed files, the stashes, and the new commits.
  3. Find the threadsEach line of work gets one status. The agent looks for the loops that you forget first.
  4. Show the plotTwo sentences, one map, and one next step, in 30 lines or fewer.
  5. Act on your reply"go", a number, an answer, "drop", or "more".

Install

  1. Run this in your project folder:
    npx skills add joeysim/joeysim-skills --skill i-lost-the-plot
  2. To add the skill for your user account instead, so that every project has it, add -g.
  3. In a long session, tell your agent: I lost the plot.
  4. Claude Code asks before it runs the bundled script. The script only reads: the session transcript and the git state.

No Node.js? Download the ZIP, and move the i-lost-the-plot folder into ~/.claude/skills/ for Claude Code, or into ~/.agents/skills/ for Codex and other agents.

Read the full skillThe complete instructions that your agent follows, and an example.

The user lost track of this session. Show where the session was headed, which threads are open, and the next step.

The user's words are about the full session, not about your last answer. Do not explain the last answer again.

Only read. Do not edit files, run tests, or continue a task until the user replies to the plot.

1. Get the evidence

Run the digest script from the user's working folder:

python3 <skill folder>/scripts/session_digest.py

The script prints each user prompt with its time, and the end of each agent turn. It reads the session transcript on disk. Thus it also shows the prompts that context compaction removed. It also prints the git state: the branch, the changed files, the stashes, and the commits since the session start. Do not run git again. Read the full output. Do not cut it with head or tail. The script keeps the output short. When the script cannot run or finds no transcript, use the conversation context and run git status --short --branch.

The script cannot see the task list, background tasks, or subagents. Check those too, when available.

2. Find the threads

A thread is one line of work: a request, a question, a problem, or a side idea. Read the digest from the first prompt to the last. Give each thread one status:

MarkStatusMeaning
▶nowThe work that was in progress at the last prompt.
○openRequested or started, and not finished.
?needs youWaits for an answer or a decision from the user.
✓doneFinished, with evidence in the session or in git.
✗droppedThe user canceled it or replaced it.

Look for these open loops. The user forgets them first:

  • A request that the user made in passing: "also", "later", "at some point", "remind me".
  • A prompt that the user typed while the agent worked.
  • A question from the agent that the user did not answer.
  • A question from the user that the agent did not answer.
  • A task that an interruption or a new request stopped.
  • A step that the agent promised and did not do.
  • A problem that the agent found and did not fix: a failing test, an error, an unverified claim.
  • Work that is not committed, not pushed, or in a stash. A branch that is not merged.

Use only what the session and the workspace show. Do not invent a thread. When only the agent's own words say "done", and git or a test result disagrees, mark the thread open.

3. Show the plot

Print these four parts, in this order, and nothing else. Keep the answer to 30 lines or fewer.

  1. One sentence that starts with "You set out to". Use the user's own words where possible.
  2. One sentence that starts with "Right now". Tell where the work is.
  3. The thread map, in a code block. The map shows each thread and each open loop. Do not add a list of loops below it.
  4. One line that starts with "Next:", with one recommended step and the reason. Then the last line: Say "go" to start that, a number to pick a different loop, or "drop 3" to close a loop. Use a number from the map.

The map is a tree:

  • The first line is the session goal, with no mark. When the goal changed during the session, use the latest goal.
  • The next level shows the threads of that goal, in the order that they started.
  • Indent a thread below the thread that caused it: its parts, its side tasks, and its open loops.
  • Put a loop at the top level only when no thread caused it.
  • Show the earlier goals as one ✓ thread, such as ✓ Earlier: repo setup, 1.4.0, 1.5.0. Put their open loops below it.

Each line has a mark and a name. Some lines also have a note:

MarkNameNote
○A number, then the action that closes the loop. Start with a verb.The state or the evidence: a time, a quote, a file, or a result.
?A number, then the question.The replies that answer it, such as say "2 tenant" or "2 key".
▶The work in progress.← you are here
✓ or ✗The work that is done or dropped.No note.
  • Number the loops from 1, from the top of the map to the bottom.
  • Use six words or fewer for a name, and eight words or fewer for a note.
  • Align the notes in one column. Keep each line to 90 characters or fewer.
  • Use ▶ one time at most.
  • Show work that is not committed or not pushed as one ○ thread.
  • Show seven loops at most. Keep the loops of the latest goal, then the most important older loops.
  • When more loops exist, add one last line below the earlier goals: ○ + 4 older loops, with the note say "more".
  • When the map has more than 15 lines, join the ✓ lines of one level into one line, such as ✓ 5 smaller fixes.
  • End the block with an empty line and the legend line.

4. Act on the reply

ReplyAction
"go"Do the step from the "Next:" line.
A numberContinue that loop. First tell what is left, in one or two sentences.
A number and an answer, such as "2 key"Use the answer for that ? loop. Then continue the work that waited for it.
"drop" and a numberMark that loop as dropped. Change nothing: no edits, no reverts, no deletes.
"more"Show the older loops as a map in the same format, with new numbers. Use one ✓ thread for each earlier goal, with its loops below it.

Start the answer with the name of the loop, such as "Loop 3, docs for the new headers:". The numbers change with each plot. The name keeps the transcript clear for the next plot.

Example

This example is fictional.

You set out to "stop the 429 storms" on the API gateway before Friday. Right now the Redis counters are half done, and one test still fails.

Rate limits for the API gateway
├─ ✓ Token bucket middleware
├─ ▶ Redis counters                      ← you are here
│  └─ ○ 1  Fix the flaky counter test    fails 1 run in 5, cause is a guess
├─ ? 2  Limits per tenant or per key?    say "2 tenant" or "2 key"
├─ ○ 3  Write docs for the new headers   you said "later" at 13:40
├─ ✗ Limits in nginx
└─ ○ 4  Commit four changed files        branch rate-limit, last commit 13:55

▶ now   ○ open   ? needs you   ✓ done   ✗ dropped

Next: finish the Redis counters, because loop 1 is probably the same bug. Say "go" to start that, a number to pick a different loop, or "drop 3" to close a loop.