Md
Save the previous assistant response as a local Markdown file.
Invocation
/md
/md my-file.md
Behavior
- Identify the last assistant response before the user's
/mdrequest. - Write only the text shown to the user. Do not include tool calls, hidden reasoning, system messages, or the
/mdrequest itself. - Preserve the response formatting exactly, including headings, lists, and code fences.
- Write to
tmp-docs/<filename>under the current working directory. Createtmp-docs/if needed. - If the user supplied a filename, use it as the filename. If it has no
.mdsuffix, add.md. - If no filename was supplied, generate a 2-4 word kebab-case filename from the response content.
- Overwrite any existing file with the same path.
- After writing, report
Wrote {n} bytes to {filepath}. - Open the file in Chrome:
open -a "Google Chrome" {filepath}
Errors
- If there is no previous assistant response to save, say:
Error: no previous response to save. - If the path is invalid or unwritable, show the filesystem error message.