mirror of
https://github.com/mattpocock/skills.git
synced 2026-11-06 05:17:24 +00:00
handoff: resolve the temp dir the same way every run and report the path
SKILL.md only said to save to the OS temp directory, so agents took several attempts on Windows and wrote to a different place on each run on macOS. Reuse improve-codebase-architecture's wording ($TMPDIR, falling back to /tmp or %TEMP%) and tell the user the absolute path. Re-sync the docs page. Closes #272. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c665c5559e
commit
4f4e9433bb
3 files changed
+8
-2
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"mattpocock-skills": patch
|
||||
---
|
||||
|
||||
`handoff` now says how to find the OS temp directory (`$TMPDIR`, falling back to `/tmp`, or `%TEMP%` on Windows) and tells you the absolute path of the handoff document it wrote. Agents used to take several attempts to find the temp dir on Windows, and wrote to a different place on each run on macOS. Thanks @hades200082 for reporting it (#272).
|
||||
@@ -42,7 +42,7 @@ It deliberately does not carry anything already written down. The document refer
|
||||
Each one preserves something different. `/compact` compresses this context and continues in a fresh window, so your intent survives. `/clear` empties the window and starts from nothing. That is correct when everything behind you is disposable, and you cannot undo it if it isn't. `/handoff` writes a portable file, so the work survives the move to somewhere else. All three turn a **[primary source](https://www.aihero.dev/ai-coding-dictionary/primary-source)** (the conversation as it happened) into a **[secondary source](https://www.aihero.dev/ai-coding-dictionary/secondary-source)** (a summary of it). Continuing is the only option that doesn't, which is why you rule it out first.
|
||||
|
||||
**Where did my handoff file go?**
|
||||
It goes to the temp directory, which is the most-reported problem with the skill. The paths are long, they differ per OS, and on Windows agents sometimes take several attempts to find the right one. Ask for the path back and keep it before you move on. Temp is deliberate, because a handoff is a document in transit, not an artifact you maintain. Temp is also not durable, as the next question explains.
|
||||
It goes to the temp directory: `$TMPDIR`, falling back to `/tmp` (or `%TEMP%` on Windows). The skill tells you the absolute path once it has written the file, so keep that before you move on. Temp is deliberate, because a handoff is a document in transit, not an artifact you maintain. Temp is also not durable, as the next question explains.
|
||||
|
||||
**My handoff vanished between sessions.**
|
||||
Some environments clear temp between sessions (Codex is the reported case), and a reboot empties `/private/tmp`. If the next session isn't starting within the hour, or is starting under a different harness, copy the file somewhere durable yourself as soon as it's written. The same applies to anything the document *points at*: if a dispatch references other files in temp, the next agent can't follow it.
|
||||
@@ -65,6 +65,7 @@ Both work; they suit different situations. As a skill, it ships and updates thro
|
||||
## It's working if
|
||||
|
||||
- The document is a small fraction of the conversation, and the specs, issues and diffs appear in it as paths and URLs rather than as copied text.
|
||||
- It ends by telling you the absolute path of the document, in your OS temp directory, without you having to ask.
|
||||
- You can read it cold, without the original session open, and know what to do next.
|
||||
- The fresh agent starts working instead of asking you to re-explain the setup.
|
||||
- In the fork case, your original session is unchanged when you come back to it.
|
||||
|
||||
@@ -5,7 +5,7 @@ argument-hint: "What will the next session be used for?"
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
|
||||
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save it to the OS temp directory, not the current workspace. Resolve the temp dir from `$TMPDIR`, falling back to `/tmp` (or `%TEMP%` on Windows), and tell the user the absolute path of the file you wrote.
|
||||
|
||||
Include a "suggested skills" section in the document, naming which skills the next agent should call the Skill tool for.
|
||||
|
||||
|
||||
Reference in new issue
Block a user