Write a handoff document summarizing the current conversation so a fresh agent can continue the work. Save it to the user's operating system temporary directory, not to the current workspace.
Include a "suggested skills" section in the document, stating which skills the next agent should invoke using the Skill tool.
Do not repeat content already captured by other artifacts (specs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
Remove any sensitive information, such as API keys, passwords, or personally identifiable information.
If the user passed in arguments, treat them as a description of the focus for the next session and adjust the document accordingly.